Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

colonna sinistra si ripete
 
foggiastyle
Member
 
Avatar
Total Posts:  38
Joined:  2010-09-28
Foggia
 

ciao a tutti
qualcuno sa perché la colonna sinistra del mio shop si ripete 2 volte?

Uso magento 1.4.1 e il file si trova app/design/frontend/default/f002/template/callouts/left_col.phtml

questo è il codice che ho usato:

<?php $_categories = $this->getCurrentChildCategories(); ?>

<div id="category-nav">
<h4>Categories:</h4>
<ul>
<?php
$obj = new Mage_Catalog_Block_Navigation();
$oLayer = null;
$store_cats = $obj->getStoreCategories();
$oCat = $obj->getCurrentCategory();
$current_cat = (is_object($oCat) ? $oCat->getName() : '');

// List all categories in subcategory view
if (!count($_categories)) {
// get the layer object
$oLayer = Mage::getSingleton('catalog/layer');
$oParentCategory = $oCat->getParentCategory();
// set the parent category as the current category
$oLayer->setData('current_category',$oParentCategory);
// load the child categories
$_categories = $this->getCurrentChildCategories();

foreach ($store_cats as $cat) {
if ($cat->getName() == $oParentCategory->getName()) {
echo '<li class="current"><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a>\n";
if(count($_categories)):
?>
<?php
// switch back the current category
if (null !== $oLayer) $oLayer->setData('current_category',$oCat);
?>
<ul>
<?php foreach ($_categories as $_category): ?>
<?php if($_category->getIsActive()): ?>
<li>
<a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?php echo $this->htmlEscape($_category->getName()) ?></a> (<?php echo $_category->getProductCount() ?>)
</li>
<?php endif; ?>
<?php endforeach ?>
</ul>
<?php
echo "</li>\n";
endif;
} else {
echo '<li><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a></li>\n";
}
}
} else {
// List all categories in parent category view
foreach ($store_cats as $cat) {
if ($cat->getName() == $current_cat) {
echo '<li class="current"><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a>\n<ul>\n";
foreach ($obj->getCurrentChildCategories() as $subcat) {
echo '<li><a href="'.$this->getCategoryUrl($subcat).'">'.$subcat->getName()."</a> (".$subcat->getProductCount().")</li>\n";
}
echo "</ul>\n</li>\n";
} else {
echo '<li><a href="'.$this->getCategoryUrl($cat).'">'.$cat->getName()."</a></li>\n";
}
}
}
?>
</ul>
</div>

<div class="box">
<a href="http://www.miosito.net/.../Assistenza-Supporto-Prodotti.html" >
<img src="<?php echo $this->getSkinUrl('...') ?>” width="195" alt="<?php echo __('...') ?>” style="display:block;" />
</a>
</div>

<div class="box">
<a href="http://www.miosito.net/.../spedizioni.html" >
<img src="<?php echo $this->getSkinUrl('...') ?>” width="195" alt="<?php echo __('...') ?>” style="display:block;" />
</a>
</div>

<div class="box">
<img src="<?php echo $this->getSkinUrl('...') ?>” width="195" alt="<?php echo __('...') ?>” style="display:block;" />
</div>

<div class="box">
<a href="http://www.miosito.net/.../index.php/autoradio/volkswagen.html" >
<img src="http://www.miosito.net/.../skin/frontend/default/f002/images/media/volkswagen.jpg" width="90" alt="volkswagen" />
</a>
<a href="http://www.miosito.net/.../index.php/autoradio/ford.html" >
<img src="http://www.miosito.net/.../skin/frontend/default/f002/images/media/ford.jpg" width="90" alt="ford" />
</a>
</div>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Black Cat
Moderator
 
Avatar
Total Posts:  3481
Joined:  2008-02-14
Assemini / Cagliari (Italy)
 

forse lo richiami due volte nell’xml..

 
Magento Community Magento Community
Magento Community
Magento Community
 
foggiastyle
Member
 
Avatar
Total Posts:  38
Joined:  2010-09-28
Foggia
 

sei sempre di grandissimo aiuto grin

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top