Book Image

Mastering Magento Theme Design

By : Andrea Sacca
Book Image

Mastering Magento Theme Design

By: Andrea Sacca

Overview of this book

Table of Contents (18 chapters)
Mastering Magento Theme Design
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing the main content


As you can see from the next screenshot, in the main content, we want to display the following points:

  • Some text information right at the top

  • A block with some products of a specific category

  • A block with text information after each product

First, we are going to develop the main block, which contains the products grid. Afterwards, we are going to insert the remaining text blocks.

Adding a block with some products of a specific category

To display some products of a specific category in a CMS page, we need to perform the following steps:

  1. Create the custom products list file called list-home.phtml in app/design/frontend/bookstore/default/template/catalog/product containing the following code snippet:

    <?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
    ?>
    <?php if(!$_productCollection->count()): ?>
    
    <p class="note-msg"><?php echo $this->__('There are noproducts matching the selection...