Posts Tagged ‘Product Attributes’

Creating a new Product Attribute and then using it on a page in Magento 0

September 29th, 2009

Creating a new product attribute and using it when you’re displaying a product turns out to be fairly simple – but I know for us at iFuel – and I think for lots of others based on the posts you see around the net, it ends up not being as simple as it seems.

For this example, we’ll create a new attribute called “ingredients”.  We need this to be a text field (text area to be exact) that Magento admins can enter the product ingredients.  Then we’ll need to be able to access this text when we display the product.

Attributes

Attributes are single pieces of information that can be assigned to any of the entities (models) in the Magento system.  There is an extensive user interface for creating and maintaining attributes and attribute sets for products.  But you can actually create attributes for other entity types, like categories, too.  (Creating an attribute for a category has to be done right in the database – I’ll try to cover that in a future post).

To create an attribute:

more