- Canadian eCommerce (91)
- Canadian eCommerce Benchmark Quarterly Reports (5)
- Canadian eCommerce Monthly Trends (20)
- Careers (5)
- Design & User Experience (32)
- eCommerce (191)
- eCommerce Toronto Meetup (23)
- Email Marketing (1)
- Inbound Marketing (10)
- Infographics (46)
- Integration (1)
- Magento Commerce (90)
- Magento Extensions Updates (11)
- Mobile (11)
- Press Releases (1)
- Project Management (9)
- Ramblings (40)
- Search Engine Marketing (12)
- Search Engine Optimization (11)
- Site Launches (7)
- Social Media (16)
- This Week in eCommerce (14)
- An Analysis on Canadian Responsive Websites
- [Mini Tutorial] – How to get product attribute with getAttributeRawValue() in Magento
- This Week in eCommerce: May 13 – May 17
- 5 Ways Tablets & Mobile Devices Influence Design Trends
- [Infographic Wednesday] – 10 Ways to Increase Online Sales
- The Basics of Integration between Business Vision Essentials and Magento in C#
- New Site Launch: Books for Christ
- Email Marketing: It’s Personal (or at least it should be)
- Are Canadian retailers ready for #responsive design websites? #ecommerce http://t.co/K9YX0PMbY8
- @walkerlucas sadly my schedule is pretty booked for the next 7 or so weeks. I may be at our next meetup tho. Could snag a few mins then.
- @mbertulli @blueacorn tried voodoo magic, cause Magento to turn into a oscommerce, 4/10 would not try again.
- @demacmedia @blueacorn thx! Yeah for multiple app servers on a load-balancer I think REDIS might be the best option. I'll post my findings!
- @jayelkaake @blueacorn It depends on each client's needs, we have different solutions that include the use of memcache, redis and tmpfs
- @DiallogTelecom thanks for sharing!
- RT @heyqule: @demacmedia office #security gives zero "crab" about whether the office is secured... Lol http://t.co/XSi8ldDt29
- Google Admits Defeat In Its 7-Year Battle With Amazon And PayPal #eCommerce http://t.co/QBDuBMPYJ8
[Mini Tutorial] – Adding a “Featured Products” Block to the Homepage

A common occurrence on any sort of eCommerce website is to find products listed on the homepage. Visitors to your site oftentimes are there to buy or at least browse, so being able to drill down into the catalog immediately is arguably an essential part in any website that sells products. Of course, there are many ways to allow potential customers to drill down on site content, but as mentioned before, products are a direct and effective way of doing so.
Placing a “featured products” block on your homepage is actually quite easy. The first thing to consider is that it will look and interact very similar to an actual page in the catalog. If you know your Magento templates, it will look specific to our catalog/product/list.phtml file. In fact, let’s copy this template and place it in our own template directory, naming it list-homepage.phtml. This will allow us to customize the actual content of the block by placing whatever we would like in the block.
The first thing we’ll need to rewrite is the beginning of the file, as there will be no product collection loaded by default via $this->getLoadedProductCollection(). We can load it simply via:
$_category = Mage::getModel(‘catalog/category’)->load($this->getCategoryId());
$_productCollection = Mage::getModel(‘catalog/product’)->getCollection();
$_productCollection
->addAttributeToSelect(‘*’)
->addAttributeToFilter(‘small_image’,array(‘neq’=>’no_selection’))
->addCategoryFilter($_category)
->setOrder(‘updated_at’, ‘ASC’)
->load();
You may also notice that we’re not retrieving a product collection without images. This is just a check to make sure customers can actually see products listed there.
*Note: We only want to output the columns that are necessary. You may also notice our max shown, column count and category ID variables. These are actually defined in where we tell Magento to output the block (in the page) instead of in the block class. Open up the backend of Magento and navigate to CMS > Manage Pages and click on Home. Place this line of code anywhere in this page’s code (adjusting whatever parameters you would like):
{{block type=”catalog/product_list” name=”home.catalog.product.list” alias=”products_homepage” max_shown=”10″ display_mode=”grid” column_count=”5″ category_id=”***” cat_name=”On Sale” template=”catalog/product/list-homepage.phtml”}}
Save this block and create a new category in Magento called “Featured Products” and place whatever products you would like ‘featured’, in this, to feature them on the homepage. Edit Home again and fill in the “***” with your category ID. Remember to dump the cache and perhaps even re-index. Then have a look at your homepage!






