Here’s a quick tip on how to disable notices like this one appearing on your site:

Deprecated: Function eregi() is deprecated in…

At the top of your application (bootstrap or index file) just add the following line of PHP:

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

This tells your application to show all errors EXCEPT for Notices and Deprecation errors.  Obviously you can show Notices if you prefer by removing & ~E_NOTICE from that function

Hope this helps!

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

Today I launched my first Magento widget.

Features

  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

Options

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.

Download

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

Screenshots

 

All products, Mixed mode

All products, Grouped by Category

Admin Configuration Screen

 

License

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.

Enjoy!

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

I just started writing a custom Magento widget for an upcoming Magento Template following the tutorial in the Magento knowledgebase.

As one of the options for the widget I needed a custom value provider, so decided to use the instructions provided to specify a source model using the source_model parameter.

However, by using the given format the widget options just wouldn’t load in the admin area.

<source_model>widgettwo/services</source_model>

I couldn’t easily find any results by searching Google for help, so after spending a bit of time with trial and error I found the solution to this problem. Instead of using the module/model structure, you actually need to provide the class name of your model e.g.:

<source_model>Cube_CategoryFeatured_Model_Categories</source_model>

After updating my widget.xml file to use the new source model parameter everything worked smoothly.

The widget I’m creating will be included in the next commercial Magento template, and I’ll also make it available on Magento Connect for free of charge!