Wednesday, November 27, 2013

How to create an attribute and apply it to products in magento

  1. Log into the Magento admin panel. Go to Catalog -> Attributes -> Manage Attributes magento_product_attributes_adding_1There you will see all the attributes used in your system.

  2. In the top right, click on “Add New Attributemagento_product_attributes_adding_2

  3. In the Properties tab you will need to configure the Attribute Properties:magento_product_attributes_adding_3
    • Attribute Identifier: the name of the attribute used by the system. E.g. material.

    • Scope: allows you to declare the attribute value saving scope like Global ( the value of this attribute for a given product must be the same for all websites and stores on this Magento installation), Store View (the value of this attribute for a given product can differ in all Websites and all Store Views), Website (the value of this attribute for a given product can differ in different Websites, however it cannot differ between Store Views contained under the same Website).

    • Catalog Input Type for Store Owner: describes what kind of data the attribute will store. For instance, if you want to manually enter the value for each product into a text field, select Text Field etc. In our case we want to use Dropdown.

    • Unique Value: select “yes” if you want the data saved in this attribute to be unique for each product. But we rather use “no”, because different product types may be made of the same material.

    • Values Required: we are using “yes”, since all our products are made of some material.

    • Input Validation for Store Owner: decides whether the data entered by the store owner is validated when the product is saved.  In our particular case, we don’t need validation on this field, so we’ll choose “None”.

    • Apply To: determines for which Product Types this attribute will display.  If you chose “Select product types” in the drop-down menu, you can set “material” to not apply to grouped/smple/configurable etc product or just use “All Product Types.


  4. And the settings for Frontend Properties:magento_product_attributes_adding_4
    • Use in quick/advanced search: If “yes”, the data saved in this attribute will be searchable in the front-end in the quick search and advanced search.

    •  Comparable on Front-end: If “yes”, this attribute will be displayed in a product comparison, if as at least one product in the Compare List contains a value for this attribute.

    • Use in Layered Navigation (can be used only with catalog input type Dropdown, Multiple Select and Price). Since we selected  “Dropdown”, this option is active  and we can select e.g. Filterable (with results).

    • Position: determines the position of this attribute in the Layered Nav menu.

    • Visible on Catalog Pages on Front-end: If “no”, this attribute will not be displayed in the product info page. The “visibility” only controls whether or not the attribute displays in the front-end. Keep in mind – if you set an attribute to “Visible: No”, and leave it as “Comparable: Yes”, this attribute will still show up in comparison charts.


  5. Click on the Manage Label/Options tab. Under this tab, you can name the attribute on the front-end by the attribute label. You can enter different labels for different.  If a store’s label is blank, this store will look to the default label and use this one.  Here we’ll enter “Material” under “Admin” and under “English”. Then, under the Manage Options (values of your attribute)  we’ll enter lycra, nylon, polyester, satin, lace, silk and sheer fabric. Click Add Option  each time you need a new line of fields for the attribute values. In the Position  row you can enter 1,2,3 enter to position them.magento_product_attributes_adding_5

  6. When you are ready, click Save Attribute in the top right corner.

  7. To apply this selectable attribute to a product, first add it to an attribute set. Go  back to the Catalog tab and select Manage Attribute Sets.magento_product_attributes_adding_6

  8. There you will see all the attribute sets created in your system. Click Add New Set.

  9. Give your new attribute set a name by entering the Name  filed. E.g. material. Let it be Based On -> Default. Click Save Attribute Set.magento_product_attributes_adding_7

  10. On the  next page you will see the attribute set you’ve just created in the third column labeled Unassigned Attributes. You will drag and drop it to one of the groups in the second column. For instance, to General.magento_product_attributes_adding_8

  11. Click Save Attribute Set in the top right.

  12. Now you can create new product under Catalog -> Manage Products -> Add Product and in the Attribute Set drop-down select the attribute set you’ve created.  Then click Continue.magento_product_attributes_adding_9

  13. Now you can proceed and create a new product based on the new product attribute group you created (“material”). Since you have added the new attribute to the General section, you will find it there in there under the General  tab in the same order it was added.  Once your new product is created, you can open it on the frontend to see the new attribute you have added among its details.


How to create an attribute and apply it to products in magento

No comments:

Post a Comment