How to offer products in various units

The following article describes how you can work with product units in Dynamicweb eCommerce.

 

Product units such as box and crate can be used to create variants of products, so that you can offer products to your customers in other quantities than single products.

 

The first thing you need to do is to create a range of product units in the Dynamicweb administration:

  1. Go to Settings > Product Units > New product unit
     
  2. Enter a name for the new product unit, e.g. box

Create as many product units as you like by following the procedure mentioned above.

 

When you are done creating product units, you should locate the product that you want to display in your web shop in different units.

Choose the Units tab and go through the following steps to add different units to the product:

  1. Choose a default unit among the created units categories form the Default dropdown menu. This unit will be selected as default in the menu displaying the different units.
     
  2. Determine which units should be active for the product by choosing the Active field next to the units in the Unit list.

Now you are ready to offer the product in the activated units.

 

A product in different units is considered as variations of the same product. This also means that when you activate the various units for the product a series of product variants will be created.

 

To output the variants in the webshop you will need to use the Units template loop. In the loop you can use the same tags as when outputting variants. (See the template tag reference for further information).

 

The following example shows how to create a dropdown menu using the Units loop:
 

<!--@LoopStart(Units)-->
<!--@HeaderStart-->
<h2 class="h2">Product units</h2>
<select name="Variants">
<!--@HeaderEnd-->
<option value="<!--@Ecom:VariantOption.ID-->" <!--@Ecom:VariantOption.Selected--><!--@Ecom:VariantOption.Name--></option>
<!--@FooterStart-->
</select>
<!--@FooterEnd-->
<!--@LoopEnd(Units)--">

Special considerations

  • The Product units functionality in Dynamicweb eCommerce cannot be used for advanced stock management. If you need to control your stock according to the sold units of a product, you will have to use other systems that are better suited for this kind of management, e.g. an ERP system.
Copyright 2010 Dynamicweb Software