skip to Main Content

I’m trying to change the order of specific categories using a php script. The script below runs fine, and I’m seeing the position change values in catalog_category_entity, but order is unaffected in the admin, and in the front.

2

Answers


  1. Please use drag and drop from admin
    And reindex than flush cache

    Login or Signup to reply.
  2. are you using your script like this ?

    <?php
        $_categories = $this->getStoreCategories();
    ?>
    
    <?php foreach ($_categories as $_category) : ?>
            <li class="<?php if($_category->getId() == $this->getCurrentCategoryId()) echo "active"; ?>">
                <a href="<?php echo $linkcot; ?>"><?php echo $_category->getName(); ?></a>
            </li>
    <?php endforeach; ?>
    

    if not use it like this.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search