Home > Zencart > Adding Options and Attributes to Zencart Products

Adding Options and Attributes to Zencart Products

A customer just asked me how to add options and attributes in the Zencart shopping cart system, so I wrote a quick tutorial on it and thought it may be useful to post here. The official Zencart help page is here http://tutorials.zen-cart.com/index.php?article=57

Adding Options and Attributes to Zencart Products

here are 3 places to create options and attributes.

Catalog ->

  • Option Name Manager
  • Option Value Manager
  • Attribute Manager

Option Name Manager

  • This is where you setup the option Name, e.g. Size, Colour. So go to this page.
  • At the top you see any Options Names added already, or none if you have not added any.
  • To add a new one you enter the name in the form, the order it will appear on the site, then the type of field for the options (e.g. Dropdown).
  • Click Insert

Option Value Manager

This is where the option you created above is given values, e.g. for Size: 38, 40, 42, 44, 46, 48, 50, 52, 54. So after you do the above, go to this page.

  • You can see a list of all option values for each option in the table is added already, or none if none are added, and under this there is a form.
  • In the form choose the option you want to add values for.
  • In the next text box enter one value for it, and choose the sort order to display on the page.
  • Repeat this for all values for an option.
  • Click Insert

Attribute Manager

Attribute manager is where we now assign the options and their values to each product. So when you have done the above click this page.

  • First choose the category you want to edit a product in. It will automatically load the page with products in this category.
  • It chooses the first product in the list by default, but you can change this by selecting the product in the box with the text “Select a Product to View and Press Display …”. So select a product and choose display.
  • Below this box where the product list is you will now see either a list of attributes assigned to the product, OR “No Attributes Defined for Product ID# – Product Name “
  • Below this list or sentence is the “ADDING NEW ATTRIBUTES” area. There are two boxes, the left allows you to choose the Option you want to add, and then this automatically shows you the values for that in the right box. So choose the value to add (so choose Size in the left, then say 28 in the right box.
  • Below this box you have some options to assign for this attribute:-
    • Price: The price of the option. You enter a + or – in the first box if it adds or subtracts the price you will enter, OR no + or – if the attribute is the actual final price of the product. Leave as is/blank for no price change.
    • Weight: The weight of the attribute if using some weight shipping cost, leave blank if weight is not a factor in selling this item. + or – minus weight is also used like price.
    • Order: The order to display the attribute in the list.
    • One Time: This is if this attribute is only charged once per order, I dont think you need it, leave blank.
    • Used For Display Purposes Only: I think if you do not want people to choose it, but to show the option, like a list of options with not choice to choose. I am not sure I have never used it so leave as No.
    • Attribute is Free When Product is Free: If product is free, then make attribute free, leave as is.
    • Default Attribute to be Marked Selected: When someone goes to the page for the first time, which attribute do you want selected already? Choose it by selecting this box. If none is default, then none is checked, so the customer could purchase without choosing so its best to have a default for all products.
    • Apply Discounts Used by Product Special/Sale: If you create a discount in the Specials/Sales area (e.g. 10% off) do you want that to apply to this price?
    • Include in Base Price When Priced by Attributes: If you choose a product to be Priced By Attributes, then do you want this attribute to be shown in the product price (e.g. as a Starting From price). This means if you create a product with 0 price, then add two attributes say, Small (£20) and Large (£22), selecting this option means the price on the site will show “Starting at £20″. Otherwise it will show £0. The other option is the Product is added as £20 and not choose Price by Attributes, then the Small is +£0 and the Large is +£2. It just depends on how you want to display the pricing.
    • Attribute Required for Text: Is this attribute required when using a text attribute, I think. Leave as is.
  • Click Insert

That’s it, check the site to make sure the option is displayed and the pricing is all correct and how you want it displayed. May take some playing around to get it right, even I get it wrong and the price is not right and have to go back and update the above settings.

To Edit the above settings follow the process in Attribute Manager to Display the product you want to edit an attribute for and click Edit next to it.

A Useful Shortcut for Multiple Products

Adding attributes can take time if you have lots of products and lots of attributes. BUT if many products have the same attributes, you do not need to follow the above process every time. You can copy the attributes from one product to another product, or even all products in one category.

When in Attribute Manager, choose the product you want to copy attributes FROM, then at the top you see these options:

  • EDIT PRODUCT
  • PRODUCTS PRICE MANAGER
  • TO DEFAULT ORDER
  • PREVIEW ATTRIBUTES
  • DELETE ALL
  • Copy to PRODUCT
  • Copy to CATEGORY

I only ever used the last 3.

  • DELETE ALL – this deletes all attributes for the product so you dont have to click Delete against every one.
  • Copy to PRODUCT – this will copy all this products attributes to another product you choose. So you click this, then on the next page choose the product to copy TO, choose how it should be handled (see below) and click Copy.
  • Copy to CATEGORY – this will copy all this products attributes to all products in the category you choose. So you click this, then on the next page choose the category to copy TO, choose how it should be handled (see below) and click Copy.

“How should existing product attributes be handled?

There are three options to choose:

  • Delete first, then copy new attributes – this deletes all attributes already added to the product and created new ones from this product
  • Update with new settings/prices, then add new ones – if the product already has the same attributes, but perhaps the price has changed, it just updates the same attributes with the new price, and also adds any new ones
  • Ignore and add only new attributes -this leaves all existing attributes on any product and adds only new ones.

The one I nearly always have to use is the last one, Ignore and add only new attributes.

A Couple of Tips

Some products may have the same attribute Size for example, but perhaps have different other attributes specific to a product. So what I do is sometimes create a “Dummy Product” that has only the common attributes you want to copy to all products, and not other ones that other products may have. This way you can just copy them to other products and either Update with new settings/prices or Ignore and add new ones, and only the common attributes from this dummy product are copied, leaving any specific ones on the products alone.

Sometimes you may get products that have nearly the same attributes, e.g.:
product 1 – Size: 28, 30, 32, 34
product 2 – Size: 28, 30, 32, 34, 36
product 3 – Size: 28, 30, 32

So in this case I would create a Dummy product with Size: 28, 30, 32, 34, 36, then copy it to the others, then DELETE the ones not needed in this product. Its quicker than adding the differences.

I hope all this helps, please have a read and try to understand and email or phone me with any questions.

Bookmark and Share


Author: Laurence Cope Categories: Zencart Tags: , ,
  1. June 19th, 2011 at 21:26 | #1

    Thanks for this article it has been really useful,although I knew most of the info here, you spell it out in an easy to follow manner!

  2. June 26th, 2011 at 17:50 | #2

    I’m a noob to Zen Cart so I’m not sure if I’m saying this correctly, but, what if an attribute requires an option? eg. Shirts – the colors are: red, blue, black, white….all of them have light coconut buttons but if you choose black, you then have the option of light or dark buttons. Or, embroidery design. eg. design A is an “as-is” design with no customization but design B has customizable text and thread color and they both go with the shirts above?
    ANY help with this would be GREATLY appreciated!
    Thanks,
    Jason

  3. June 29th, 2011 at 13:31 | #3

    Hi Jason. Do you mean if you select one option, e.g. red shirt, you will have options, but if you choose another, like a black shirt, you have different options to choose? If this is right then Zencart does not do this out of the box. You would either need some bespoke coding and Javascript to do this effect (maybe there is an add-on already) or you would need to create the Shirts in different colours as separate products, e.g. Red Shirt, Black Shirt, etc. then assign the different buttons to each shirt.

  4. December 6th, 2011 at 07:30 | #4

    It is great articles which explaining attributes and it is really helpful. Thank you for posting.

  1. May 24th, 2011 at 16:29 | #1