cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to design category page

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Trying to design category page

Hi everyone!
I'm trying to port the contents of a category page between two Magento stores using the same backend. Specifically, without much success.

 

The static block for the categories in .../smartphones looks as follows:

<?php
/**
 * @category    design
 * @package     mobildelsoutlet theme
 * @copyright   Copyright (c) 2014 Peter Johansson
 */
?>
<?php 
    $_helper    = $this->helper('catalog/output');
    $_category  = $this->getCurrentCategory();
    $_imgHtml   = '';
    if ($_imgUrl = $_category->getImageUrl()) {
        $_imgHtml = '<p class="category-image-brand"><img src="'.$_imgUrl.'" alt="'.$this->htmlEscape($_category->getName()).'" title="'.$this->htmlEscape($_category->getName()).'" /></p>';
        $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
    }
?>
		<div class="block category-brand-land-title">
    <?php if($_imgUrl): ?>
        <?php echo $_imgHtml ?>
    <?php else: ?>
    <div class="page-title block-title-default category-title title-r title-visible">
        <h1>
    				<span><?php echo $this->htmlEscape($_category->getName()); ?></span>
    		</h1>
		</div>
    <?php endif; ?>
    </div>
    <style type="text/css">
			.catalog-category-view-brand .block-layered-nav{
				display:none;
			}
			.category-view-brand img{
				/*height:55px;*/
				padding-bottom:12px;
			}
			
			.catalog-box div{
				width:142px;
				height:198px;
				padding-bottom:12px;
				padding-bottom:6px;
			}
			
			
		</style>

    
<?php $_categories = $this->getCurrentChildCategories() ?>
<?php 
		//	$_collectionSize = $_categories->count() 
?>

<ul class="subcategories">
<?php $i=0; foreach ($_categories as $_category): ?>

<?php
    $layer = Mage::getSingleton('catalog/layer');
    $layer->setCurrentCategory(Mage::getModel('catalog/category')->load($_category->getId()));
    $helper = Mage::helper('catalog/category'); 
    $_cols = 4;
?>

    <li class="category-list<?php //if($i % ($_cols) == 0){ echo ' first'; } 
    //	if($i >= ($_cols)){ echo ' additional-rows'; }
    	
	    	?>"><div class="category-box">
			        <?php $_img = $this->getCurrentCategory()->getImageUrl() ?>
			        <?php if($_img): ?>
			            <div class="category-img">
			                <a href="<?php echo $helper->getCategoryUrl($_category);?>">
			                    <img src="<?php echo $_img?>" title="<?php echo $_category->getName() ?>"/>
			                </a>
			            </div>
			        <?php endif; ?>
			        <div class="category-name<?php if (strlen($_category->getName()) > 32) echo ' small-category-name' ?>">
			            <a href="<?php echo $_category->getURL() ?>" alt="<?php echo $this->htmlEscape($_category->getName()) ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?> - Reservdelar och Tillbeh�r">
			            <?php echo $this->htmlEscape($_category->getName()) ?>
			            </a>
			        </div>
	        </div>
    </li>
<?php
    $i++;
    endforeach;
?>
</ul>

My question is how do I fix this design issue, as well as what could be the reason for the missing categories?

Thanks in advance