Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

Show Specific Categories On Magento Home Page

  1. #1
    New member
    Join Date
    Nov 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Show Specific Categories On Magento Home Page

    Hi

    Hope someone can help me with this. I need to show 3 specific categories on my Magento home page. I have created a "list-homepage.phtml" file and have the following code in this file.

    Code:
    <div class="row">
    <?php foreach ($this->getStoreCategories() as $_category): ?>
    <?php $open = $this->isCategoryActive($_category); ?>
    <?php
    $cur_category=Mage::getModel('catalog/category')->load($_category->getId());
    $layer = Mage::getSingleton('catalog/layer');
    $layer->setCurrentCategory($cur_category);
    if ($immagine = $this->getCurrentCategory()->getImageUrl()):
    ?>
    <div class="catalog-image">
    	<div class="col-sm-4">
    		<a href="<?php echo $this->getCategoryUrl($_category)?>">
    		<img src="<?php echo $immagine ?>" alt="<?php echo $this->htmlEscape($this->getCurrentCategory()->getName()) ?>" class="img-responsive" />
    		</a>
    	</div>
    </div>
    <?php endif; ?>
    <?php endforeach; ?>
    </div>
    And I have added this block to my home page in the back-end.

    Code:
    {{block type="catalog/navigation" name="catalog.category" template="catalog/category/list-homepage.phtml"}}
    The problem with this is that it displays all the categories I have, I just want to display 3, what do I have to do in order to achieve this?

    Many Thanks for your help

    View more threads in the same category:


  2. #2
    New member Marvel Commerce's Avatar
    Join Date
    Sep 2014
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Mumford,

    Check this out on how to display only 3 specific categories on the home page,

    http://www.magentocommerce.com/wiki/groups/248/display_products_on_home_page

    If this fails, drop me a mail to [email protected] , I'll get one of our certified devs to help you out!

    Cheers

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
  •