FREEBIE: Magento Featured Products Widget

UPDATE 4 FEBRUARY 2012: An updated version  of this widget is now available here

Today I launched my first Magento widget.


  1. Group by category.  Using this widget, you can specify the categories to display products from, and on the frontend you’ll be able to see the products grouped by those categories.
    This is a lot more useful to customers, plus provides more flexibility to you as a store owner – you could even show featured products for each category at the top of that category’s page.
  2. It’s free.  Need I say more?
  3. Feedback is welcome! This isn’t a one-hit-wonder. I will attempt to actively develop and add features to it according to user requests.
  4. Random products too.  It’s not only a featured products widget, if you prefer it can select any random product from a category (if specified), or from all your categories


Name Options Description
Frontend Template Categorised, Mixed Categories displays products grouped by category, Mixed displays all products in a single grid
Categories All active store categories Choose the categories from which products are selected. Only used for the “Categorised” Frontend Template. Has no effect on “Mixed”
Products Per Category Any number (default 3) The number of products to select from each category. Only used for the “Categorised” Frontend Template. Has no effect on “Mixed”
Products per row Any number (default 3) The number of products to display per row on the frontend.
Products to Display Featured, All Featured selects products only with the featured attribute, All selects all active products
Featured Attribute Code None. cube_category_featured by default To use Featured Products, create an Attribute (Catalog->Attributes->Manage Attributes) with a Yes/No input type. Enter the Attribute Code into this Featured Attribute Code field. Set this field to Yes for each featured product.


I’ve submitted the extension to MagentoConnect and will post the URL as soon as it’s live.
For now you can download it using the links below:

Zip file (upload all contents to server): download
Pear package: download



All products, Mixed mode

All products, Grouped by Category

Admin Configuration Screen



Basically, you can use this extension for free on your store.  You can include it with your Magento themes and templates (as I’m about to with my next template).

The only thing I ask is that you give credit where credit is due.


UPDATE 4 FEBRUARY 2012: An updated version  of this widget is now available here


  1. This extension has helped us so much! Thank you for sharing it with all of us! I was wondering if there was any way we could configure it to control product order? In the magento admin, “Manage Categories” I can view all assigned products to that category and then specify the order those products show up in.

    Is there a way to specify product order within the extension?
    Again, thank you!

  2. Awesome extension, thank you for sharing it! Is there a way to control product order? For example in my category view on a normal Magento layout, we can assign product list order in the grid. Is there a way to specify order within the extension?

    Thanks again!

  3. Hi,

    I got a error while installing this widget in Magento 1.7 version. I got the following error
    CONNECT ERROR: Package file is invalid
    Invalid package name, allowed: [a-zA-Z0-9_-] chars
    Invalid version, should be like: x.x.x
    Invalid stability
    Invalid date, should be YYYY-DD-MM
    Invalid channel URL
    Empty authors section
    Empty package contents section

    how to fix this. Please guide me for this installation

    Thanks in advance

  4. How do i display rating in featured product?
    Here getRatingSummary() function not working. Can anyone help me to sort out this problem?

  5. Hey folks,

    I’ve been VERY busy and had hardly opportunity to revisit this project despite meaning to. I have spent the past few nights looking over it again, improving the code base and adding a couple of new features.

    I’ll continue work on it throughout the week so stay tuned for the new release. I’ll announce on this blog and on Twitter too if you want to follow @cubewebsites

  6. I’ve uploaded all the files but when I insert the widget and reload the page; all the other content on the page as well as your widget disappears almost as though there is no closing tag.

  7. how can i show a rating-summary below the product titles?

    i tried

    getReviewsSummaryHtml(); ?>

    but it shows up nothing.. help is much appreciated! thanks

  8. Just installed this widget but found the category selection to be rather confusing as we have some category names that are the same across several stores so it was difficult to know which “Accessories” category I was selecting. Here’s what I did to fix it. Hope it helps someone else.

    In app/code/local/Cube/CategoryFeatured/Model/Categories.php…

    $collection = Mage::getModel('catalog/category')->getCollection()
    ->addAttributeToSort('parent_id', 'ASC')
    ->addAttributeToSort('name', 'ASC');
    $ret = array();
    foreach($collection as $category) {
    if ($category->getParentId() && $category->getParentId() > 1) {
    $parent_name = " (" . $this->getParentName($category->getParentId()) . ")";
    $ret[] = array(
    'value' => $category->getId(),
    'label' => $category->getName() . $parent_name
    return $ret;
    private function getParentName($parent_id) {
    $parent = Mage::getModel('catalog/category')
    $parent_name = $parent->getName();

    if ($parent->getParentId() && $parent->getParentId() > 1 ) {
    $parent_name = $this->getParentName($parent->getParentId()) . "/" . $parent_name;
    return $parent_name;

  9. This is a great Widget! I’ve been looking for something like this for a long time. I have one problem. I have multiple stores on my megento installation and when I use “Mixed” it pulls products from different stores. Is there a way to narrow it don so it only pulls from the store that the widget is put on?

  10. Hello,
    Very well, I use.
    Is it possible to add a carousel of products?
    If so you may have a code?
    Thank you for the widget

  11. Ah ha! Solved.
    Just like Steffen said: “extend the Mage_Catalog_Block_Product_Abstract instead of the Mage_Catalog_Block_Product for your Cube_CategoryFeatured_Block_List class”.

    Thanks Steffen.

  12. Great! It works nicely for me, but can you show me how to add the action section to the “block.phtml” to show the “Add to cart” button and “Add to wishlist”, “Add to Compare” links.
    Thanks a lot!

  13. Hey,
    thanks for the widget. I used it as a basis for an extension.

    PS: It’s better to extend the Mage_Catalog_Block_Product_Abstract instead of the Mage_Catalog_Block_Product for your Cube_CategoryFeatured_Block_List class. Then you can access the getPriceHtml function 🙂

    Thanks for the module

  14. Does nearly exactly what I need! Should be pretty simple for me to add an add to cart button, then it’ll be perfect for the website I’m working on.
    Thanks man! I’m using Magento, so it works in this version.

    1. Hey Paul, maybe you can help me, I uploaded all the files into the directories, but don’t get nothing in the backend, your help is appreciated, thanks

  15. i’m trying to use your widget but with my custom theme the css settings are not loaded.
    Where do you think the problem could be?

  16. Hi,
    Very really nice widget. Greate widget to have.
    But, i couldn’t download this from the above link.
    Can you email me it’s copy?
    Thanks a lot!

  17. Hi, i just uploaded all the files from the .zip and the widget does not show up after relogging. i checked under system->configuration->advanced and there is no cube_categoryfeatured in the list! Any ideas??

  18. Does this widget supports magento 1.4?
    I’ve unpacked it from zip file and when I’m trying to add it from wysiwyg editor it shows only widget type dropbox and no widget options, even for default magento widgets.

  19. Hi, your Widget looks very interesting!
    The Link to the zip File is the same as the pear package, so i can not test it, but what i’ve seen from the screenshots, this is exactly what i was looking for! Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *