I tried everything to make the categories get updated but it simply doesn't works. What I already did:

  • Refresh Cache
  • Refresh Indexes (admin and using shell/indexes.php)
  • Check if the store was using the right root category
  • Make sure that the categories are activated and anchor

The code that I'm using to load the categories is above:

<div class="home-side-menu-type2 hidden-xs hidden-sm hide side-categories side-block side-menu-type2" style="margin-bottom:20px;">
  <ul class="menu" align="left">
    <?php $helper = $this->helper('catalog/category') ?>
     <?php foreach ($helper->getStoreCategories() as $_category): ?>
        <a href="<?php echo Mage::getModel('catalog/category')->setData($_category->getData())->getUrl(); ?>" title="<?php echo $_category->getName() ?>"><?php echo $_category->getName() ?></a>
     <?php endforeach ?>

What I need to do?

| improve this question | | | | |

Your Code is perfect , Please just make sure that you does not have delete Default root Category (Category ID = 2 ) , and all other Categories are under Default Root Category... wish it could help

| improve this answer | | | | |
  • I'm sure that this is ok: categories and root :( – Rafael Miller Feb 10 '17 at 17:53
  • ok where did you use this code ? try with Mage::helper('catalog/category') instead of $this->helper('catalog/category') – Dharmesh Feb 11 '17 at 4:30
  • thanks but it didn't work :( – Rafael Miller Feb 11 '17 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.