for the new product list in magento 1.9 use this
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
or categorical list
The new RWD design has two child blocks for the product list. more details
<block type="core/text_list" name="product_list.name.after" as="name.after" /> <block type="core/text_list" name="product_list.after" as="after" />
You can first call your block on the CMS main page, as shown below:
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}
Now in your /product/list.phtml directory find line number 74: and 133
find this code
<?php $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren(); foreach($_nameAfterChildren as $_nameAfterChildName): $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName); $_nameAfterChild->setProduct($_product); ?> <?php echo $_nameAfterChild->toHtml(); ?> <?php endforeach; ?>
replace
<?php if($this->getChild('name.after')): $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren(); foreach($_nameAfterChildren as $_nameAfterChildName): $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName); $_nameAfterChild->setProduct($_product); ?> <?php echo $_nameAfterChild->toHtml(); ?> <?php endforeach; endif; ?>
go line no 188
add code to
if($this->getChild('after')):
source share