2010/02

Displaying Magento custom product attributes on the frontend

by Denis Margetic in Magento

The simplest way to display custom attributes is to enable them on product view pages, where they normally show up as a table. Design files can be edited to display custom product attributes elsewhere on the product view page. When a Magento product object gets loaded in a template file, any custom attributes that have been added to products are also accessible. The method used to retrieve the values depends on the type of attribute. For drop-down attributes you can use the following code:

Read More

Common Magento theming issues

by Denis Margetic in Magento

Breadcrumbs and page titles

Removing the breadcrumbs block should not be very difficult since it is just one line in the /layout/page.xml file. However, if you were to remove breadcrumbs by changing the /layout/page.xml file it will adversely affect page titles, which may not be what you expect.

The underlying issue is related to Magento's built-in flexibility that allows breadcrumbs to be used with page titles. The breadcrumbs block needs to be part of the page in order for page titles to be processed correctly. Removing the breadcrumbs block will result in products and categories to show the default store title, unless a title is explicitly defined in the backend. Since the aim is to only remove breadcrumbs from the design, the safest option is to modify the breadcrumbs template file:

Read More