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 MoreCommon 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 MoreAustralia Day Extension Release
by Chris Norton in Announcements
In addition to the feed generators, there are some incremental improvements to the rest of the extension, most notably in the BPAY and direct deposit functionality, which now have their own order statuses to help administrators determine at a glance which payment method was used to place an order.
We hope these changes will continue to provide Australian online retailers with commonly desired functionality for running a Magento website in Australia. We've had great feedback on the extension so far, and are keen to hear any comments or suggestions that members of the community may have for future versions.
Read MoreUsing jQuery with Magento
by Tom Greenaway in Magento
Installing jQuery
jQuery can be downloaded from jquery.com and to install it you need to copy the file to the following directory:
skin/frontend/default/your_theme/js
To include jQuery you need to edit layout/page.xml
where you need to add the following to the head block:
<action method="addItem"><type>skin_js</type><name>js/jquery.js</name></action>
Normally, this would be all you need to do, however because Magento also includes Prototype, there is a subtlety we need to deal with. jQuery uses '$' as shorthand for accessing the jQuery library. But Prototype also uses '$' to access itself. This causes a conflict in the global JavaScript namespace of the web browser. Fortunately jQuery provides a solution, the jQuery.noConflict();
function defines a new shorthand for jQuery, such as: