Magento Themes and Magento Extensions

Magento: Get Collection of Special Offer Products

Posted on March 7th, 2013 | Posted by admin

Magento: Get Collection of Special Offer Products

I recently had to create a collection of special offer products to list on the clients homepage. There’s a few different attributes that we need to filter to get the proper results.

1. The products visibility must NOT be set to 1. This means that the product is going to be visible individually. If we tried to link to a product that was not visible individually we might get a 404 or even worse, the mage error screen! See this post for a list of visibility options ->addAttributeToFilter(‘visibility’, array(‘neq’=>1))
2. In my case I don’t want to show products that have an empty special price field. ->addAttributeToFilter(‘special_price’, array(‘neq’=>”))
4. I want to set the number of products returned to 8. ->setPageSize(8)
5. Finally I set up my date filters.

Hide categories that have no products magento

Posted on December 13th, 2012 | Posted by admin

I have many sites that use the same root category of the Main Site. Each product that is added is added to the site it was added to (wow.) and also the Main Site. However, I would like categories on a per site basis to only appear if there are products on that site.

If I have:


But Site1 only has products in Category1 and Category2, whereas Site2 and Site3 have products in Category2 and Category3; I only want Category1/2 to appear on Site1 and only Category2/3 to only appear on Site2 and Site3.

Magento add Bestseller products by date range

Posted on December 2nd, 2012 | Posted by admin

Magento add Bestseller products by date range

Here is how to get a collection of products best sold in a given date range

03.$from = date("Y-m-d H:i:s", (time()-2592000));
04.$to = date("Y-m-d H:i:s", time());
06.$_productCollection= Mage::getResourceModel('reports/product_collection')
08.->addOrderedQty($from, $to, true)
09.->addAttributeToFilter('status', 1)
10.->setOrder('ordered_qty', 'desc')

How to import configurable products from CSV File into Magento System

Posted on November 5th, 2012 | Posted by admin

Unlikely the default Magento import module, this fully customizable bulk import module allows you to import configurable products through CSV feed.
Module features:

  • Import from CSV feed
  • Create CSV for import
  • Import configurable products and their associated simple products.
  • Import images / multiple images / gallery images from remote server.
  • Supports cron job
  • Copy the file Productwithconfigurablesandcategories.php located in (file attached to this post) to the folder /app/code/core/Mage/Catalog/Model/Convert/Adapter/.

Displaying New Products in Magento

Posted on October 9th, 2012 | Posted by admin

This method allow you to add new products to a Magento CMS page or Block.
Go to “CMS >> Manage Pages” and select “Your Page” from the list of pages.
Go to “CMS >> Static Blocks” and select “Your Block” from the list of blocks.

Use this code snippet to show new products on your front page:

{{block type="catalog/product_new" name="" alias="product_homepage" template=

To change the number of columns in the “New Products” view:

Page 1 of 612345»...Last »