Blog

latest news

Adding Custom Attributes to Product Categories in Magento

This is the first in a series of helpful quick posts which give short guides on how to deal with Magento, the open source e-commerce platform.

Today we are going to look at how to add custom attributes to products within category listings.  Magento can be a complete minefield to even the most experienced users, things which seem simple can often be quite difficult to achieve!

To display custom attributes paste this code into your list.phtml file

<?php echo $_product->getResource()->getAttribute(‘CustomAttribute’)->getFrontend()->getValue($_product); ?>

Make sure you change the ‘CustomAttribute’ section to the name of the chosen attribute you wish to display.

That’s all there is to it, hope you guys find this helpful!

Leave a Comment

You must be logged in to post a comment.