A+ Web Design

For affordable, custom web design.

Tutorial: Add Product Attributes in Zen Cart

Posted by A+ Web Design Categories: Zen Cart Print This Post Print This Post

In this tutorial you’ll learn how to add attributes like color and size to your products in your Zen Cart store.

There are 3 steps to adding attributes to a product:

  • Define Option Name – for instance “color”
  • Define Option Value – for instance “blue”, “white” and “black”
  • Set the Attributes for the product

1.1   Defining Option Names

Click Catalog > Option Name Manager

zencart06

On the empty line at the bottom:

zencart07

- enter the option name
- enter the sort order (this is the sort order the Option Name displays on the screen.)
- select option type:

  • Dropdown
  • Radio Button
  • Checkbox
  • TEXT (this does not get an Option Value)
  • FILE (This does not get an Option Value)
  • READONLY (this is for display purposes only. It is more or less an informational attribute.)

On some Option Names, based on the Type … there are more settings:
For Option Type TEXT:

  • Comments
  • Max Display Size (size of input box on screen)
  • Max Length (max number of characters/spaces)

For Option Type Radio buttons and checkboxes: There are choices of image layout

- select Insert

1.2   Defining Option Values

Now … you should have made all the Option Names you need, like “Color”, “Size” etc.
Now you have to set all the Option Values for these like: “Red”, “Orange”, “Yellow”, … and “Small”, “Medium”, “Large”, …

Click Catalog > Option Value Manager

zencart08

On the empty line at the bottom:

zencart09

-   Select  the Option Name

-  Give a Name like Red

-  Give a default Sort Order (I usually leave it at 0 and set these manually per product)

-  Click Insert

 

1.3     Attributes Controller

Now we have to add the attributes to the products.

Adding the Attributes to the Products
Click Catalog > Attributes Controller

zencart10

a) Select a Product to add Attributes to
You can look up a product in a couple ways …
- Either pick a Category or a Product
- When you pick a category, the ones with a * have products in them and this will display the first product Previous/Next
- When you pick a product,  click display … this sets the category to this product’s master category id … so you can now use the Previous/Next if you like.

b) Add the Attribute Option Name+Value Pairs
Once the Product is displayed that you want to add attributes to … go to the Add Attributes box

 zencart11

 1. Now select the Option Name, for instance color

 2. Next select a matching Option Value, the option nam between parentheses must match, for instance red [COLOR].
I always start with the value “please select ..” to make sure a buyer makes  conscious decision.

 3. Depending on what you want to do with attributes there are several methods to price, add weight, sort order, …
- Price can be entered with a prefix of + or – or blank. + and blank will add the attribute price – will subtract the attribute price
- Weight can be entered optionally if it effects the product weight with a prefix of + or – or blank.
- Sort order, to sort the option values in a certain order

4. Then there are the Attribute Flags in the colored boxes.
These are used to help distinquish other features of the attribute such as:

  • Use for display only (attribute cannot be selected and added to cart. Good for things like “Select from Below” to force the customer to make their own choice and not just hit Add to Cart and get a pink snail instead of a blue snail.
  • Attribute is Free when product is Free (Some products you may set to Free … but the some attributes are free and some attributes cost money.)
  • Default Attribute (Should be used especially on Radio buttons, or if you have an attribute you prefer the customer selects.)
  • Apply Discounts used by Product Sale/Special (this will apply the same type of discount that the product is getting from the products_price vs the special or sale price.)
  • Include in Base Price (when products are priced by attributes mark the attributes include in base price then the lowest price in each Option Name group are added together to make up the product price. NOTE: when not the product is not marked priced by attribute this setting has no effect on the price.)
  • Attribute Required for TEXT (Some text is required text and cannot be left blank by the customer.)

5. If this attribute is a downloadable file, enter the filename. This file needs to be uploaded with FTP to the “download” folder. 

6. Click Insert..

All the Product attributes will apear above the “add attribute” box.  

 zencart12

You can edit the attributes by clicking on the Edit button or clicking on the color coded buttons.

4 Responses so far.

  1. ashish says:

    How can i assign quantity to attributes like size or color of a particular model

  2. aplus says:

    To assign a quantity to attributes, you can download and use the “Stock by Attributes” mod. You can download it here:
    http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=310

  3. Rey Dorat says:

    Thanks a bunch for sharing this with all folks you really understand what you are speaking about! Bookmarked. Kindly also seek advice from my website =). We may have a hyperlink alternate contract among us!

  4. metasilk says:

    I have a product with more than one attribute (each with one or more option values). I can see easily how to sort the attribute values, but is that the only method to sort the attirbutes?

    Specifically, I want a text field (Camper’s Name) to appear above the dropdown menu (Camp Session). I could reset the default option id sort (which I did because this is probably how I need it to be anyway), but is there another way?

    Here’s the page I’m doing this on, if you are curious:
    http://vermontyarnco.com/store/index.php?main_page=product_info&cPath=75_121&products_id=607

    Thanks.