RSS

Show products on Magento Home Page

26 Jun
  • Go to your CMS->pages, select your home page and paste this block in the content:
    {{block type="catalog/product_list" category_id="category_id_to_show" column_count="number_of_columns" template="catalog/product/list.phtml"}}

    category_id_to_show: Go to Catalog -> Manage Categories, select the one you want to show on your home_page, and put your id on the block.

    number_of_columns: How many columns you want to show

  • If your new in this magento, this might help you .In phtml file test.phtml
    $collection = Mage::getModel('catalog/product')->getCollection();    
    $collection->addAttributeToSelect('orig_price');

    Get the collection by the required attribute. Then,

    {{block type="core/template" template="catalog/product/test.phtml"}}

    Use this code it will definitely work, 🙂

  • This is the layout way for the same, because in 1.4 version Layout update is different than in 1.3 version, you can use this example:

  <reference name=”content”>                                               <block type=”catalog/product_list” name=”featured” template=”catalog/product/list.phtml”>            <action method=”setCategoryId”><category_id>[category id here]</category_id></action></block>       </reference>

           It’s possible to add the ‘Root category’ ID here to show all products (Is Anchor Yes required!)

  • Adding New Products with Built in Magento Tools

    First, let’s set the record straight. It is possible to display a list of new products in Magento using a default block. You can do this without any coding changes or modifications to Magento itself. This code will allow you to bring up a list of new products on one of your CMS pages. It is also possible to use this to bring new products up within a template file or on your homepage, though we are not covering that here.

      {{block type="catalog/product_new" column_count="6" products_count="400" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}

Advertisements
 
Leave a comment

Posted by on June 26, 2013 in Magento

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: