Magento Expert Forum - Improve your Magento experience

Results 1 to 3 of 3

Sorted list with alphabetical order, with multiple columns

  1. #1
    New member
    Join Date
    Aug 2015
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sorted list with alphabetical order, with multiple columns

    I have actual the follow code:

    Code:
    <?php 
    $parentCategory = Mage::getModel('catalog/category')->load(3);
    $subcategoryCollection = Mage::getModel('catalog/category')
            ->getCollection()
            ->addFieldToFilter('level', ['lteq' => $parentCategory->getLevel() + 2])
            /*->addFieldToFilter('level', $parentCategory->getLevel() + 1)*/
            ->addFieldToFilter('path', ['like' => $parentCategory->getData('path') . '%'])
            ->addAttributeToSelect(['name'])
            ->setOrder('name', Varien_Data_Collection_Db::SORT_ORDER_ASC);
    foreach ($subcategoryCollection as $category): ?>
        <a href="<?php echo $category->getUrl() ?>"><?php echo $category->getName() ?></a>
    <?php endforeach; ?>
    And I like to have a sorted list, sorted like this (see http://www.outdoorequipped.com/info/our_brands )

    A

    Adidas Altra

    B

    Body Glove

    D

    Dakine etc

    I also have the issue, I not need to have the category "Brands" and "View all Brands" in the list.

    See the actual list I have: https://mag.outdoorequipped.com/allbrands

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    May 2015
    Posts
    50
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    i cant understand your question are you want to align the brands list as per this URL
    http://www.outdoorequipped.com/info/our_brands

  3. #3
    Junior Member paulsimmons's Avatar
    Join Date
    Apr 2014
    Location
    USA
    Posts
    213
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    I see you are looking forward for a solution to list brands alphabetically, Here is an extension that creates a separate brand page and list them not only in alphabetical order but in brand categories as well. Every brand can have its separate landing page to list all of its products under that page.

    For more details - http://www.fmeaddons.com/magento/sho...extension.html

    Quote Originally Posted by simonvetterli View Post
    I have actual the follow code:

    Code:
    <?php 
    $parentCategory = Mage::getModel('catalog/category')->load(3);
    $subcategoryCollection = Mage::getModel('catalog/category')
            ->getCollection()
            ->addFieldToFilter('level', ['lteq' => $parentCategory->getLevel() + 2])
            /*->addFieldToFilter('level', $parentCategory->getLevel() + 1)*/
            ->addFieldToFilter('path', ['like' => $parentCategory->getData('path') . '%'])
            ->addAttributeToSelect(['name'])
            ->setOrder('name', Varien_Data_Collection_Db::SORT_ORDER_ASC);
    foreach ($subcategoryCollection as $category): ?>
        <a href="<?php echo $category->getUrl() ?>"><?php echo $category->getName() ?></a>
    <?php endforeach; ?>
    And I like to have a sorted list, sorted like this (see http://www.outdoorequipped.com/info/our_brands )

    A

    Adidas Altra

    B

    Body Glove

    D

    Dakine etc

    I also have the issue, I not need to have the category "Brands" and "View all Brands" in the list.

    See the actual list I have: https://mag.outdoorequipped.com/allbrands

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •