Example - Adding a product with a Text option

The example demonstrates how you can add a product with a Text option to a Kentico site. The product is based on the Product - Book product type, and has one product option.

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 Books -> Technical 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 - Book 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: Developing Websites with Kentico
    • Price: 19.99
    • Department: Books
    • 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:

    • Option category name: Book inscription

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

    • Display name: Inscription

      The system uses this name on the live site.

    • Enabled: Yes (checked)

    • Type: Text

  3. Click Save.

  4. Enter the following values for the category’s properties in the Options and Validation sections:

    • User control type: Text field
    • Display price adjustment: Yes (checked)
    • Maximal text length: 50
  5. Click Save and close the dialog.

If you now switch back to the product’s Options -> Option categories tab, the system lists the product option category as assigned to the product. As an option category of type Text, the category automatically contains one option, which you can now modify.

Available option categories

Configuring the product option

  1. Edit () the Book inscription product option category and switch to its Options tab.

    Viewing the list of available options

  2. Enter the following value for the option’s Price adjustment property: 5.

  3. Click .

If your customers purchase the product together with the product option, they will have to pay an extra charge.

Reviewing the product on the live site

  1. Open the live site.

  2. Select Books -> Technical in your on-line store main menu.

    • The system displays a list of all technical books that you offer in your on-line store.
  3. Click Developing Websites with Kentico to view the product’s details page.

  4. Enter My inscription into the Inscription field.

    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