Example - Adding a product with Attribute options

The example demonstrates how you can add a product with Attribute options to a Kentico site. The product is based on the Product - T-shirt product type, has three product options, and only two of these options are enabled.

The example uses the sample E-commerce Site.

Adding a new product

First, you need to add a new product of the required type and representation to a selected part of your on-line store.

  1. Open the Products application.

  2. Select Clothing -> T-shirts in the product sections tree and click New ().

    • The system opens a dialog allowing you to specify the required type of your new product.
  3. Select Product -T-shirt in the Product types column.

    Selecting a product type

    • The system opens a page where you can specify product properties.
    • Alternatively, you can select some other product type, e.g. Product.
    • If the system doesn’t offer any product type (for example, if you deleted the default product types), create a new product type as described in Managing product types and product section types.
  4. Enter the following values for the product’s properties:

    • Product name: Kentico T-shirt
    • Price: 39
    • Department: Clothing
    • Image: upload an image file
    • Representing: Standard product
    • Allow for sale: Yes (checked)
    • Available items: 10
  5. Click Save.

The system adds the product to the selected part of your on-line store. Now you can add to the product a product option category.

Adding a product option category to the product

  1. Switch to the product’s Options -> Option categories tab and click New category.               

    • Alternatively, you can add to the product an existing category by clicking Add categories.
  2. Enter the following values for the category’s properties in the General section:

    • Option category name: Color of T-shirt

      The system uses this name in your on-line store administration interface.

    • Display name: Color

      The system uses this name on the live site.

    • Enabled: Yes (checked)

    • Type: Attribute

  3. Click Save.

  4. Enter the following values for the category’s properties in the Options section:

    • User control  type: Radio buttons in vertical layout
    • Default text: None (empty)
    • Display price adjustment: No (unchecked)
  5. Click Save.

The system adds to the product an empty product option category. You can now add product options to the category.

Adding product options to the category

Add three product options to the Color of T-shirt category, representing the red, green and blue color of the T-shirt.

  1. Switch to the Options tab.

  2. Click New option.

  3. Enter the following values for the first option’s properties:

    • Option name: Red
    • Allow for sale: Yes (checked)
  4. Click Save and create another.

  5. Enter the following values for the second option’s properties:

    • Option name: Green
    • Allow for sale: Yes (checked)
  6. Click Save and create another.

  7. Enter the following values for the third option’s properties:

    • Option name: Blue
    • Allow for sale: Yes (checked)
  8. Click Save and close the dialog.

The system adds to the option category three product options. Now you can specify which of these options the system is to offer to your customers while purchasing the product.

Selecting available options

Currently, all the three options are available for the product. However, you want your customers to be able to buy the Kentico T-shirt in blue or red color only. This means that you need to disallow the Green option.

  1. Click Select available options ().

    Available option categories

    • The system opens the Select available ‘Color of T-shirt (Color)’ options dialog. Here you can specify which options from the current category are available to your customers while purchasing the product.
  2. Select Allow only selected options.

  3. Enable the Red and Blue options.

    Selecting available options

  4. Click Save & Close.

The system indicates that your customers can purchase the product with only two options.

Available options

Reviewing the product on the live site

  1. Open the live site.

  2. Select Clothing ->** T-shirts** in your on-line store main menu.

    • The system displays a list of all T-shirts that you offer in your on-line store.
  3. Click Kentico T-shirt to view the product’s details page.

    • The system offers the T-shirt in red and blue color only. This is because you set the Green option as unavailable.
  4. Select the blue color of the T-shirt.

    Viewing the product details page

  5. Click Add to cart.

The system adds the product together with the product option to the shopping cart.

Viewing the shopping cart content