Peter Spiller

Tuesday
15 Jun


No Comments

Banners and the Banner Rotator Widget

Banners are a relatively new CMS feature of Magento Enterprise Edition that allow administrators to create, organise and display promotional content. In the past, this requirement was often addressed by manually creating static blocks and customising a site's layout. By using banners and the banner rotator widget, you can now create content and then control exactly how and where it is shown on your site in a much easier way.

Monday
8 Mar


2 Comments

Extending the Magento web services API

Magento provides a handy web services API for integration with other software systems, and it can be extended if you need it to do something that it doesn't do by default. However, incorrectly overriding core Magento code can cause incompatibilities when applying upgrades. The following is an example of how to extend the API in a way that attempts to avoid introducing problems with future releases.

Tuesday
13 Oct


2 Comments

Accessing product rating summaries

Product ratings are an important tool for gaining credibility and driving sales in any online store, and are yet another powerful feature built-in to the Magento core. Ratings can be a valuable criteria to make visible to people browsing the site, so rather than hide them away on product pages only, it can be desirable to display rating summary data elsewhere, or to use the data in developing other custom functionality. Review summaries work a little differently to other product data, so this post will demonstrate how to access them.

Monday
12 Oct


2 Comments

Adding order comments

For all orders, Magento keeps a Comments History of all activity on that order. This allows an administrator to track changes that have been applied to the order status, as well as to attach comments for internal use or to be sent to the customer. If you are writing a custom extension that modifies orders then it's best to work within this system and to have your code update orders with the results of any processing done on them. This information can be invaluable for debugging and auditing purposes.

Wednesday
7 Oct


5 Comments

Creating Magento products from a script

Magento allows several different ways to add products to the catalog, including manual editing, upload via spreadsheet and the web services Magento Core API. For developers who want to add products through PHP however, there are a few caveats to be aware of for the product to be displayed on the frontend.

Tuesday
14 Jul


4 Comments

Magento CMS static blocks

Static blocks in Magento are a useful way of making elements of your site easily configurable by administrators. If you have sidebar blocks, headers or other elements that can change from time to time, using a static block can be easier in the long run than hard-coding them.

Tuesday
7 Jul


1 Comment

Debugging Magento with Xdebug

Diagnostic print_r statements and logging might be quick and easy tools for investigating what Magento is doing, but a full debugger offers a lot more power and flexibility. This post demonstrates how to set up the xdebug debugger for use with the vim editor.

Wednesday
1 Jul


No Comments

Magento debugging - loading blocks, layouts and config files

Occasionally I've needed to take a closer look at exactly which block, layout or config file is being loaded by Magento. In this post I will demonstrate a "brute force" approach to checking exactly what is being processed.

Wednesday
24 Jun


3 Comments

API product IDs vs SKUs

The Magento web services API is quite flexible - a lot of the time, it can either take an ID (like a product ID) or a more human-readable identifier (like a product SKU). Unfortunately, the downside of this is that in certain circumstances these can be mixed up, in which case the the wrong product will be affected.

Tuesday
23 Jun


2 Comments

Web services API filter operators

Many of the Magento web services API methods facilitate listing certain types of data - customers, products, orders, etc. However, when using these methods we rarely want to retrieve every record. Luckily there are a number of filter operators that can be used to narrow the result set that will be returned.