Products

The Heart and Soul of any Ecommerce Solution

What’s a shop without products? What’s a product group?

Without products, your eCommerce solution is pretty dull and useless.

In Dynamicweb, products are very rich objects, with loads of properties, settings, options and abilities – and things can get pretty complicated.

In this article, you will learn more about products in Dynamicweb, starting with the basics – how to create and manage products – and all the way down to more advanced topics, like context sensitive pricing (the price matrix) or units and unit categories.

Products can be created from the product list toolbar of any product group (Figure 2.1), or by right-clicking a product group to open the context menu and then selecting New product.

Figure 2.1 Click the New product-button to create a new product

Creating a single product opens the product details view – where you can fill out the details of the product before saving it.

If you click Create multiple products in the toolbar you will be presented with a grid view like (Figure 3.1) where you can fill out the most basic details of the products.

Figure 3.1 Creating multiple products

To edit multiple products select a number of products in a product list and click Edit products (Figure 3.2). 

You will see the same grid as above – only with values already present. Change any values needed and click save to save your changes.

 

Figure 3.2 Bulk-editing products

You can customize the columns and fields in the grid-view by right-clicking a column in the product list and activate the columns you want to create or edit.

If you want to be able to bulk-edit extended variants go to Settings > Ecommerce > Advanced configuration > General and check the Include variants in bulk edit checkbox under the additional fields section.

From any product list you can right-click a product to open the context menu (Figure 4.1) and access a number of actions

Figure 4.1 The context menu allows you to access a number of actions related to products

With the context menu you can:

  • Copyeditmove or delete a product
  • Add a product to or detach a product from a product group
  • Activate or deactivate a product

On actions and primary/related groups

When you create a product it is attached to the group it is created in – this is the primary group – but it can also be featured in any number of related groups.

Deleting a product from a product group – related or primary – deletes it from ALL groups. A warning pops up and tells you that all language versions are deleted from all groups – even when it’s deleted from a related group.

When adding a product to a group, keep in mind that if the product already belongs to a group, the new group will be added as a related group on the product. In similar vein, a product which is detached from a group is not detached from all groups, but only the current group.

Products which are not attached to any groups have a red background in the all products list.

Activating or deactivating a product causes it to be active or inactive across all product groups and language versions it is attached to.

You can link directly to a product from e.g. your ERP system by using the product ID or number in the URL, as in yourwebsite.com/admin/?ProductID=123 or yourwebsite.com/admin/?ProductNumber=123QWER. If following this link while not logged in or with auto login disabled, the user will be prompted to log in then redirected to the product in question.

If frontend editing is enabled on your solution, you can use the @Ecom:Product.EditInBackendUrl tag to add URLs pointing directly at the backend setting of the product you are editing. 

The product details view (Figure 7.1) is the view you see when creating, viewing or editing a product.

It consists of:

  • A ribbon bar (1) from which you have access to advanced Ecommerce tools and actions
  • The basic product details (2) area
  • Below are a number of sections containing additional product details
Figure 7.1 The product details view

Most prominent are the basic product details information (Figure 7.2).

Figure 7.2 The basic product details

The basic product details area lets you view or edit:

  • The system ID (here PROD10), name and number of the product. The system ID is automatically assigned (or imported) and is not editable (except for newly created products when the advanced fields settings have been configured)
  • The price in your default currency and in loyalty points
  • The current stock level and the manufacturer dropdown/creator

Of course, you also have access to two rich text editors for entering a teaser text and a product description.

In the upper right corner, you can set the product to be active or inactive.

If an image has been set directly on the product it will also show up in the basic product details view - but if you use image patterns to assign an image to a product in frontend, no image will appear in the basic product details area.

Below the basic details you will find the sections with additional product details - there are described below.

In the basic product details area, you can select a manufacturer for your product. All products have a standard manufacturer field for storing information about the manufacturer.

You can also create new manufacturers directly from the product details view by clicking the "+" icon next to the manufacturer dropdown menu. Here you must create a manufacturer record by filling in the manufacturer details (Figure 8.1).

To manage and delete manufacturer records, go to Settings> Ecommerce > Product Catalog > Manufacturers. You can read more here.

Figure 8.1 Creating a manufacturer record from the product details view

A manufacturer record may contain:

  • Details about the manufacturer
  • logo and description

Don’t forget to save before exiting.

With the product images settings (Figure 9.1) you can:

  • Upload or select a small, medium and large image for the product
Figure 9.1 The Product Images settings

You can configure default images for products (and product groups) by going to Settings > Ecommerce > Advanced Configuration > Images (read more here).

Read more about image patterns and the image pattern hierarchy in this article.

Depending on your setup, you may have access to one or more types of custom fields (Figure 10.1) on a product:

  • Product fields are custom fields which occur on all products on a solution - read more below.
  • Product category fields are fields tied to a product category, which is then attached to one or more product groups. Products located in the group will then inherit the fields (and optionally field values) to their product details.

Both types of fields are used just like regular fields.

If the product category fields are inherited, you can restore the value inherited from the group by clicking the icon to the right of the field, or fill in your own values – whichever is appropriate. Learn more about product categories in the product groups documentation.

Figure 10.1 Your solution might employ custom fields, like these inherited product category fields

Back Catalog-fields

If your solution operates with more than 250.000 products, e.g. if you have a large back catalog, you may experience a dip in performance.

To combat that, you can enable the back catalog fields on your product details (Figure 10.2).

With the back catalog fields, you can:

  • Exclude a product from being indexed
  • Exclude a product from being accessible through a customized URLs
  • Exclude the product from the all products list

To enable the back catalog fields, go to Settings> Ecommerce > Advanced configuration > General and check the Show back catalog fields on products checkbox under the additional fields section (read more about the settings here).

Figure 10.2 The back catalog field allow you to exclude products from e.g. the all products list

The Stock settings (Figure 11.1) allow you to control more advanced aspects of stock management than the simple stock level field in the basic product details.

Figure 11.1 The stock settings

With the stock settings you can:

  • View and edit the stock status of the product
  • Select the default unit the product is available in (e.g. litres, pairs of barrels)
  • Set the weight and volume for the product - you can customize the weight and volume units used by going to Settings > Ecommerce > Advanced configurations > General
  • The default stock status setting on new products is set on the properties on either the shop or on each product group.

You can read more about stock, the stock matrix and unit below.

If the Stock level field in Details is read-only in the default language, it’s because it is set to sum up all variant stocks for a product with variants. If you are trying to create a variant, but the stock level is still greyed out, try saving the variant first – the stock level field should now be editable. Read more about variants here.

The Documents & Files fields (Figure 12.1) allow you to link to pages or files associated with the product, e.g. product images, datasheets, vector graphics, etc. You can select one of the added files/links as the default file - this is used by Dynamicweb PIM.

You may also write additional texts and associate them with the product, although you do not have access to a rich text editor here, and add a link or an alternative link to the product.

Figure 12.1 The Documents and Files fields

With the advanced configuration options (Figure 13.1) you can set a number of important (but not often edited) settings for the product.

Figure 13.1 Advanced Configuration options

You can:

  • View or edit the shop the product belongs to
  • Set the default VAT group the product belongs to - learn about VAT in Dynamicweb here
  • View (or select) a product type for the product

The meta-information fields (Figure 14.1) are used by search engines to index searches, and can have an effect on how your website is ranked in search results.

Figure 14.1 The meta information fields

You can provide:

  • A title and description
  • One or more keywords
  • A canonical URL, for search engine indexing purposes. The page-URL displaying the product will then be regarded as an instance of the canonical URL.
  • A user friendly URL for the product (if empty, the system will use the product name)

If you do not define any meta-information for your products, no information will be added to the frontend source output. This means that empty values in the keyword or description fields will not affect the performance of your site.

Search Engine Optimization

If you need help filling out the meta-information fields, you can use the optimize button in the tools-section of your ribbon bar. It can help you fill out the fields in a way which will improve your search-ranking.

Dynamicweb operates with four types of product:

  • stock item is usually a physical product (which you can, in theory, run out of, i.e. it has a limited stock)
  • service is usually a non-physical product, like support or billable hours – if selected, stock level and stock status are unavailable in the default information panel
  • parts list consists of several products and/or product groups, e.g. a computer with defined/selectable parts
  • gift card allows the gift card holder to purchase other goods or services using a gift card code

Stock items and services are self-explanatory - and parts lists and gift cards are explained below. 

Parts list are occasionally also known also as BOM – Bill of Materials. A BOM is a list of materials and parts required to manufacture an end product. In our template tags, BOM is used instead of parts list. 

A parts list is a special product type, which enables you to create products consisting of a list of other products or product groups already present in your product catalog.

A parts list can have its own description, price, etc. – and can be added to the Shopping Cart as either an single product or a bundle of products.

To create a parts list product, follow the normal procedure for creating products, but select the product type parts list under Advanced configuration (Figure 16.2).

Figure 16.2 Select the parts list product type to start creating a parts list

Save the product to access two things particular to parts lists:

  • The price calculation dropdown menu
  • The parts list button in the ribbon bar and the associated parts list overview

Parts lists may be priced in several ways, and you can select the most appropriate one using the price calculation dropdown (Figure 17.1).

Figure 17.1 The price calculation dropdown

You can select the following pricing methods:

  • Calculated price sums up the individual prices of all products added to the parts list
  • Fixed price uses only the default price, which you enter in the Default information section below, and it ignores any individual pricing on products added to the parts list
  • Fixed price plus changes combines the default price with the individual prices of all products added to the parts list

Parts lists may either contain a fixed set of products or a set of groups from which the customer can select products.

To add products or product groups to a parts list:

  • Click the arrow on the parts lists button (Figure 18.1) and click either product or groups
  • Select the groups or products you want to add
Figure 18.1 Adding products or product groups to a parts list

The selected products and product groups are then added to the parts list overview (Figure 18.2.

Figure 18.2 The parts list overview shows what's contained in the parts list

From the parts list overview you can:

  • Specify a quantity for each product in the parts list
  • If product groups are added, open each product group and specify a selection text – e.g. ‘Select your bike here’ – and select the product that you want to use as a default selected product in the group
  • Delete the product or product group from the parts list by clicking the red X-icon – or add additional products or product groups by clicking the plus icon.

Click the sort icon to sort the parts in the parts list. Product groups follow the sort order of the original group.

Gift cards provide a flexible way for your customers to buy a gift for someone from your web shop.

This has several advantages, for both you and your customers.

  • Full freedom of choice for the recipient of the gift card
  • Cash upfront for you, for goods not yet sold
  • New customers introduced to your web shop by happy customers

The gift card is added as an additional product type – similar to the Service product type – allowing you to place it in your web shop to have it bought like any other product. A unique gift card code is provided with the order receipt or by email.

You can provide your customers with a selection of fixed amount gift cards or allow them to type in a custom gift card amount. - they are then used in frontend by entering the unique gift card code in a gift card field.

The customer will:

  • Add a product to the shopping cart and proceed to checkout
  • Enter a valid gift card code in a gift card field
  • Fill out the standard order details – name, address, payment method, etc.
  • Complete the order

If the gift card total is larger than the order total, the remaining balance will be preserved and can be used another time. If the gift card total is smaller than the order total, the remaining order total is paid with the selected payment provider. 

Gift cards and currency

It is not possible to buy products in a different currency from the one the gift card was registered with on creation. By default, the current order setting is used for currency if none is given.

To create a gift card product, follow the standard procedure for creating product – but select the gift card product type under Advanced configurations (Figure 20.1):

Figure 20.1 To create gift card, select the gift card product type

A gift card does not have a stock state – and you must manually deactivate it if you don’t want it available in your shop anymore.

Other features not available with the gift card product type are Variants, Price Matrix, Discounts, Parts List, Units and VAT Groups.

Custom amount gift cards

If you sell fixed amount gift cards, you don’t need to change your product templates – the gift card is listed and bought like any other product.

If you want to allow your users to type in a custom amount for the gift card, you must render an input field instead of the price when the product is a gift card (Ecom:Product.Type=3).

To do so:

  • Navigate to the paragraph with your product catalog app attached and open the app settings
  • Modify your product template to render en input field if the product is a gift card – see ProductGiftCard.html for an example
  • Save

Your customers can now enter a custom amount for any gift card purchased before adding it to the shopping cart.

From the Gift Cards node in the Ecommerce tree you have access to an overview (Figure 21.1) of all the gift cards issued on the solution, as well as their current balance.

Figure 21.1 The gift cards overview

For each gift card issued on the solution you can see:

  • The name of the gift card product
  • The gift card code and currency
  • The creation and expiry date
  • The initial gift card amount and the remaining balance

Red cards are either expired or used – and with the search field and creation date filter you can identify either specific cards or cards created on a particular day, if need be.

The default expiration period is 24 months but if you want to, you can change that. Read more here.

Click "Cancel gift card" to easily set the expiry date to "now".

Click any gift card to see a list of order for which the card has been used (Figure 21.2)

Figure 21.2 Access a list of transactions in which each gift card has been used

Once a gift card has been purchased, you should display the unique gift card code in the order receipt.

During the order receipt step, you can also list any gift cards used during the transaction – including initial amount, remaining amount and expiry date.

For an example, please see the ReceiptGiftCard.html template.

To enable your users to use a gift card, you must create a field in the checkout flow (e.g. during the Information step) allowing them to enter their gift card codes during checkout.

The field must be an input field with EcomOrderGiftCardCode as the name and ID, and <!--@Ecom:Order.GiftCardCode-- > as the value.

Dynamicweb provides an Information-template to use with Gift cards:

  • Navigate to a page with the Shopping cart app and open the app settings
  • As your Information step template, select InformationWithStatesGiftCards.html (Figure 23.1) – or modify or create your own template to suit your needs

Save the app settings

Figure 23.1 You must creat a gift card field in the checkout process - for instance during the information step

From the ribbon bar you have access to more advanced tools for working with products in Dynamicweb Ecommerce.

Using these tools you can:

  • Assign discounts to a product
  • View and edit related groups and related products
  • Set up custom publication periods (campaigns)
  • Work with languages and localize or delocalize products
  • Access marketing tools such as personalization
  • Work with prices, stock and VAT groups in an advanced manner using the matrixes

 

If any of your order discounts are set to be assignable from product catalog, you can use the discounts-button (Figure 25.1) to add it directly from the product details view.

Figure 25.1 Assign discounts to a product using the discounts button

To add a discount:

  • Click the arrow-icon on the discount button and select Manage including discounts or Manage excluding discounts to view the assignable discounts.
  • Select the discount(s) you want to add to the product
  • Click save and close

The discount is then added to the discount matrix for the product (Figure 25.2)

Figure 25.2 The discounts overview

From the ribbon bar you have access to the related groups and related products buttons (Figure 26.1).

They are a convenient way for you to access information about how the product interacts with other parts of Dynamicweb Ecommerce. Specifically, you can see (and create) group membership and product relations – to both product relation groups and other individual products.

You can create and configure default related groups, products, product relation groups and searches at the group level, read about product groups here.

The related groups interface allows you to add the product to or remove the product from a product group.

You can also specify which product group is the primary group, which may be relevant for e.g. canonical URLs.

Figure 26.1 The ribbon bar gives you access to the related groups, products and searches buttons

The related products button (Figure 27.1) let's you select or create product relation groups for your products.

A product relation group is a kind of ad-hoc list with a label, like 'Matching ties' or 'Wheels for this bike', which you can add products to. 

Those products can then be displayed to customers visiting the product details page.

Figure 27.1 Create new related product groups with this dropdown menu

You can use the funnel icon at the related product to control which related products should be available in which language, country and shop context (Figure 27.3).

Product relation groups can be managed from Settings > Ecommerce > Product Catalog > Relation Groups.

Figure 27.3 The limitations window that opens when you click the funnel icon

Using the Options tab (Figure 28.1) you can:

  • Set a custom publication period for a product using the start and end date selectors
  • Add the product to a namned publication period/campaign
Figure 28.1 The options tab

To create a named campaign:

  • Go to Settings > Ecommerce > Product Catalog > Publication Periods
  • Click New Period in the toolbar to open the Edit campaign view (Figure 28.2)
  • Configure the campaign settings
Figure 28.2 Creating a campaign

You must:

  • Specify a name (e.g. ‘Christmas’ or ‘Halloween’)
  • Set a start date and end date for the publication period (or, if you want no end date, check the always valid checkbox).
  • Make it active (or deactivate it) for selection on your products
  • Choose to show products after the publication period has expired, if you want to show the product with the default price outside the publication period.

From the product ribbon (Figure 29.1), you have access to the Language and localization settings for the product.

Figure 29.1 The Language and Delocalize buttons

The Language dropdown shows the current working language. New product are created in both the default language and in the working language, but are only localized to the working language. To localize a product to another language, switch working language using the dropdown and save the product.

The Delocalize button can be used to remove a product from a non-default languages again.

Read more about working with languages under Internationalization.

The Price Matrix is a flexible and powerful way of customizing product prices according to various criteria, in a format similar to classic ERP systems.

Click the Prices button in the ribbon bar to open the price matrix view (Figure 30.1).

Figure 30.1 The price matrix for a product

The price matrix consists of a number of rows, each with associated criteria and a price:

  • If the criteria for a row are fulfilled, the price will be used by the system.
  • If more than one price row has fulfilled criteria, the lowest price will be used.

The columns in the price matrix can be customized by right-clicking a column and selecting or deselecting individual columns (Figure 30.2)

Informative prices

A price marked as informative is excluded from the prices loop – this makes it possible to add e.g. retail prices or previous prices to a product (and show them in the frontend with Ecom:Product.InformativePrice.* and Ecom:Product.InformativePrice.IsInformative), without ever applying them  (or temporarily make prices informative to show e.g. pre-sale prices).

To create a new price row in the price matrix, click Click here to add a new row on the price matrix.

This opens the edit price view (Figure 31.1) which allows you to specify a price and a number of criteria for the price to trigger.

Figure 31.1 Creating a row in the price matrix

You must provide a price and select a currency - read about currencies in Ecommerce.

You must then provide a number of price matrix criteria which will control when a price is triggered.

The price matrix can apply prices based on:

  • Product Variants
    • All Variants means the quantity criteria must be met using the same variant (e.g. 5 green shirts)
    • Any Variants all variants count towards the quantity criteria (1 yellow, 2 blue, and 2 green shirts)
  • User and user groups – or customer number
  • A specific time span
  • Whether a specific campaign is running or not
  • The product unit
  • The Ecommerce language or country
  • The particular shop the product is bought from
  • The quantity in which a product is bought

Don’t forget to save the product after you have created your price matrix rows.

Stock may physically be located in more than one location, and this may impact many things, e.g. shipping fees, delivery times, local availability, etc.

In Dynamicweb, you can create stock locations and use the stock matrix (Figure 32.1) to help you manage stock levels across locations and display the relevant information to your customers.

Figure 32.1 The stock button opens the stock matrix

When creating a new row in the stock matrix you can:

  • Specify a stock location
  • Specify a unit type, a variant, and an amount of this unit type you have in stock
  • Specify the weight and volume of the unit type – this is important if you use weight and volume to calculate shipping fees.
  • Provide a description (e.g. 5 pieces or 6 bottles for a stock unit called 'box')

You can limit the stock locations available here at the shop level. If a product belongs to more than one shop, the stock locations selected for both shops will be available.

Stock locations can be created from Settings > Ecommerce > Product Catalog > Stock location.

Stock locations and localization

You can only create new stock locations when your default language is selected in the toolbar. Once a stock location has been created, you can create language-specific version of it by changing the language and saving the stock location in the new language. If you don’t, no stock location label will be rendered in the frontend for that language. Read more about localization in Dynamicweb.

Back-in-Stock notifications are a feature, which lets customers add themselves to a notification list when they are interested in a product which is temporarily out of stock.

You can then set up a scheduled email to alert users on the notification list once the product is back in stock.

To set up Back-in-Stock notifications:

  • Edit your product details template to let both registered and anonymous users add themselves to the notification list
  • Create a recurring email using the back-in-stock recipient provider

Once a user – anonymous or registered – has signed up for a back-in-stock notification, they will appear on the Notifications list, which is accessible from the Notifications node in your backend product catalog area (Figure 33.1).

For anonymous users, the notification is tied to an email they provide – for registered users it is tied to the UserID. Once a notification has been sent, it is automatically removed from the list. In the notification email, you should include an unsubscribe link – this will cancel all pending notifications tied to the email or userID in question.

Figure 33.1 The Notifications-node and -list

Back-in-Stock notification entries are created by your users from the frontend, when they add themselves to the notification list for an out-of-stock product.

To allow them to do so, you should render an appropriate input (for anonymous users) or link/button (for registered users) once a product is out of stock:

@if (GetInteger("Ecom:Product.Stock") <= 0){ if (GetBoolean("Ecom:Product.NotificationRegistered") != true) { <span> @if (GetGlobalValue("Global:Extranet.UserName") != "") { <a href="/@if (GetInteger("Ecom:Product.Stock") <= 0){ if (GetBoolean("Ecom:Product.NotificationRegistered") != true) { <span> @if (GetGlobalValue("Global:Extranet.UserName") != "") { <a href="/default.aspx?id=@GetValue("Ecom:Product:Page.ID")&productid=@GetValue("Ecom:Product.ID")&VariantID=@GetValue("Ecom:Product.VariantID")&LanguageID=@GetValue("Ecom:Product.LanguageID")&cartcmd=createnotificationforthisproduct">@Translate("Create Notification", "Create notification")</a> } @if (GetGlobalValue("Global:Extranet.UserName") == "") { <form name="@GetValue("Ecom:Product.ID")" id="NotificationForm_@GetValue("Ecom:Product.ID")" method="post" action="/@if (GetInteger("Ecom:Product.Stock") <= 0){ if (GetBoolean("Ecom:Product.NotificationRegistered") != true) { <span> @if (GetGlobalValue("Global:Extranet.UserName") != "") { <a href="/default.aspx?id=@GetValue("Ecom:Product:Page.ID")&productid=@GetValue("Ecom:Product.ID")&VariantID=@GetValue("Ecom:Product.VariantID")&LanguageID=@GetValue("Ecom:Product.LanguageID")&cartcmd=createnotificationforthisproduct">@Translate("Create Notification", "Create notification")</a> } @if (GetGlobalValue("Global:Extranet.UserName") == "") { <form name="@GetValue("Ecom:Product.ID")" id="NotificationForm_@GetValue("Ecom:Product.ID")" method="post" action="/Default.aspx?ID=@GetValue("Ecom:Product:Page.ID")"> <input type="hidden" name="ProductID" id="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="VariantID" id="VariantID" value="@GetValue("Ecom:Product.VariantID")" /> <input type="hidden" name="LanguageID" id="LanguageID" value="@GetValue("Ecom:Product.LanguageID")" /> <input type="hidden" name="CartCmd" id="CartCmd" value="createnotificationforthisproduct" /> <label for="NotificationEmail">@Translate("Email", "Email")</label> <input type="email" required="required" id="NotificationEmail" name="NotificationEmail" value=""> <input type="submit" value="<!--@Translate(createnotification, "Create notification")-->"/> </form> } </span> } else { <br /> <br /> <span> @Translate("Notification created", "Notification created") </span> } } @GetValue("Ecom:Product:Page.ID")"> <input type="hidden" name="ProductID" id="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="VariantID" id="VariantID" value="@GetValue("Ecom:Product.VariantID")" /> <input type="hidden" name="LanguageID" id="LanguageID" value="@GetValue("Ecom:Product.LanguageID")" /> <input type="hidden" name="CartCmd" id="CartCmd" value="createnotificationforthisproduct" /> <label for="NotificationEmail">@Translate("Email", "Email")</label> <input type="email" required="required" id="NotificationEmail" name="NotificationEmail" value=""> <input type="submit" value="<!--@Translate(createnotification, "Create notification")-->"/> </form> } </span> } else { <br /> <br /> <span> @Translate("Notification created", "Notification created") </span> } } @GetValue("Ecom:Product:Page.ID")&productid=@GetValue("Ecom:Product.ID")&VariantID=@GetValue("Ecom:Product.VariantID")&LanguageID=@GetValue("Ecom:Product.LanguageID")&cartcmd=createnotificationforthisproduct">@Translate("Create Notification", "Create notification")</a> } @if (GetGlobalValue("Global:Extranet.UserName") == "") { <form name="@GetValue("Ecom:Product.ID")" id="NotificationForm_@GetValue("Ecom:Product.ID")" method="post" action="/@if (GetInteger("Ecom:Product.Stock") <= 0){ if (GetBoolean("Ecom:Product.NotificationRegistered") != true) { <span> @if (GetGlobalValue("Global:Extranet.UserName") != "") { <a href="/default.aspx?id=@GetValue("Ecom:Product:Page.ID")&productid=@GetValue("Ecom:Product.ID")&VariantID=@GetValue("Ecom:Product.VariantID")&LanguageID=@GetValue("Ecom:Product.LanguageID")&cartcmd=createnotificationforthisproduct">@Translate("Create Notification", "Create notification")</a> } @if (GetGlobalValue("Global:Extranet.UserName") == "") { <form name="@GetValue("Ecom:Product.ID")" id="NotificationForm_@GetValue("Ecom:Product.ID")" method="post" action="/Default.aspx?ID=@GetValue("Ecom:Product:Page.ID")"> <input type="hidden" name="ProductID" id="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="VariantID" id="VariantID" value="@GetValue("Ecom:Product.VariantID")" /> <input type="hidden" name="LanguageID" id="LanguageID" value="@GetValue("Ecom:Product.LanguageID")" /> <input type="hidden" name="CartCmd" id="CartCmd" value="createnotificationforthisproduct" /> <label for="NotificationEmail">@Translate("Email", "Email")</label> <input type="email" required="required" id="NotificationEmail" name="NotificationEmail" value=""> <input type="submit" value="<!--@Translate(createnotification, "Create notification")-->"/> </form> } </span> } else { <br /> <br /> <span> @Translate("Notification created", "Notification created") </span> } } @GetValue("Ecom:Product:Page.ID")"> <input type="hidden" name="ProductID" id="ProductID" value="@GetValue("Ecom:Product.ID")" /> <input type="hidden" name="VariantID" id="VariantID" value="@GetValue("Ecom:Product.VariantID")" /> <input type="hidden" name="LanguageID" id="LanguageID" value="@GetValue("Ecom:Product.LanguageID")" /> <input type="hidden" name="CartCmd" id="CartCmd" value="createnotificationforthisproduct" /> <label for="NotificationEmail">@Translate("Email", "Email")</label> <input type="email" required="required" id="NotificationEmail" name="NotificationEmail" value=""> <input type="submit" value="<!--@Translate(createnotification, "Create notification")-->"/> </form> } </span> } else { <br /> <br /> <span> @Translate("Notification created", "Notification created") </span> } }

Once you have made it possible for your users to add themselves to the Notifications list, you must create a scheduled email in the standard manner, using the back-in-stock recipient provider to pull recipients from the Notifications-list.

With the VAT group matrix you can assign country-specific VAT groups to a product in order to account for differences in how a product is classified by countries - read more about VAT and VAT groups in Dynamicweb.

To use the VAT Group matrix click the VAT Groups button in the ribbon bar (Figure 34.1).

Figure 34.1 The VAT Group matrix

To add a new VAT group to the product:

  • Click Click here to add a new row
  • Select a VAT group and a country and click OK
  • Click Save or Save and close

To edit a VAT group on the product click it and make your changes – to delete VAT group membership click the red X in the delete column.

The Marketing tab (Figure 35.1) gives you access to two of our marketing tools; Personalization and Social media publishing.

Figure 35.1 The Marketing tab

Product fields are a type of custom field which are added to all products - they are added to a special section on the product details view (Figure 36.1).

Figure 36.1 Product fields are added to all products on a solution, and serve many purposes

To create a custom product field:

  • Go to Settings > Ecommerce > Product catalog > Product fields
  • Click New field in the toolbar to open the Product field view (Figure 36.2)
Figure 36.2 The edit product field view

Fill in the values:

  • Specify a name and a system name for the field
  • Provide a template tag-value for the field - use this tag in your templates to render the field content in frontend
  • Select a field type (see below)
  • Enter a description -  a helptext which is shown next to the product field when editing a product
  • If this is an administrative field which should not be shown in frontend, check the Do not render checkbox

The field types available to you are: 

Field type

Function

Text (5-255)

Standard text field where you can type between 5 and 255 characters

Editor

Inserts a WYSIWYG editor where you write a text using various text editing tools.

Long text

Inserts a text box where you can type several thousand characters.

Checkbox

Inserts a checkbox

Date

Inserts a drop down where a date can be selected

Date/time

Inserts a drop down where a date and time can be selected

Integer

Inserts a field where integers can be entered

Decimal number

Inserts a field where decimal numbers can be entered

Link

Inserts a field where you can enter a link to another web page or a file in your File Manager

File Manager

Inserts a field where you can select a file from your File Manager

List box

Inserts a list of options that can be selected/deselected. This option comes with extra settings, see below.

List box options

If you create a list box field, you will have extra options available to you (Figure 37.3).

You must:

  • Select a list box type; radio button, checkbox, dropdown, and multiselect
  • Specify a name and a value for each of the list box options
  • Choose whether you want each option to be selected by default or not
Figure 37.3 List box fields come with extra configuration options

Some products are sold by the kilo, some are sold in pairs, and others are sold in boxes.

In Dynamicweb, you can create product units – like kilo, pair, and box - and use them both to render the correct term for a particular product (like a pair of glasses) and to make multiple product units available for one product and let customers choose between ordering e.g. a pack, a box and a pallet of pencils.

You can select a default unit for a product using the stock settings.

To create a product unit:

  • Go to Settings > Ecommerce > Product Catalog > Product units
  • Click New product unit in the toolbar
  • Provide a name for the product unit
  • Save

You can only create new product units when your default language is selected in the toolbar.

Once a product unit has been created, you can create language-specific version of it by changing the language and saving the product unit in the new language.

If you don’t, no unit category label will be rendered in the frontend for that language. Read more about localization in Dynamicweb.

There are several ways to use product units:

  • You can set a default unit for products which are customarily sold as e.g. pairs of trousers, glasses, gloves etc.
  • You can make a product available in several product units, and price them accordingly using the price matrix

To set a default unit on a product, go to the product and select the default unit under advanced configuration. It is then available from your product list template using the StockUnits loop, and from the product details template using the Units loop.

To use several units for a single product:

  • Open the stock matrix
  • Create a row per unit you want to make available (Figure 39.1)
  • Save

The units are now available from your product templates.

Figure 39.1 Making more that one unit available for a product

Adding a unit selector to the Add to cart form in the Product details template:

<select name="unitID"> @foreach(LoopItem stocklocation in GetLoop("Units")){ <option value="@stocklocation.GetValue("Ecom:VariantOption.ID")">@stocklocation.GetValue("Ecom:VariantOption.Name")</option> } </select>

Adding a unit selector to the Add to cart form in the Product List template:

<select name="UnitID" class="form-control"> @foreach(LoopItem unit in product.GetLoop("StockUnits")){ if(GetString("Ecom:Product.DefaultUnitID") == @unit.GetString("Ecom:StockUnit.UnitID") ){ <option value="@unit.GetValue("Ecom:StockUnit.UnitID")" selected>@unit.GetValue("Ecom:StockUnit.Unit")</option> } else{ <option value="@unit.GetValue("Ecom:StockUnit.UnitID")">@unit.GetValue("Ecom:StockUnit.Unit")</option> } } </select>

Different product units usually mean different prices per unit – you usually want a box of items to be more expensive than a single item.

To make that possible, open the price matrix and create one price per product unit (Figure 40.1) – if you can’t select any of your units, it’s because you haven’t added them to the stock matrix for the product as outlined above.

Figure 40.1 Creating prices based on stock units

You now have access to product unit prices from the Units loop in the product details template:

@foreach (LoopItem unit in GetLoop("Units")) @unit.GetValue("Ecom:VariantOption.Price.Price") }

To add a product (from product details page) to the shopping cart with the correct unit and price, you simply use cartcmd in the standard manner but include a unitID:

<form method="post" action=""> <div class="col-md-4 col-xs-4"> <select name="unitID"> @foreach (LoopItem stocklocation in GetLoop("Units")) { if (GetString("Ecom:Product.DefaultUnitID") == stocklocation.GetString("Ecom:VariantOption.ID")) { <option id="@stocklocation.GetValue("Ecom:VariantOption.ID")" value="@stocklocation.GetValue("Ecom:VariantOption.ID")">@stocklocation.GetValue("Ecom:VariantOption.Name")</option> } else { <option id="@stocklocation.GetValue("Ecom:VariantOption.ID")" value="@stocklocation.GetValue("Ecom:VariantOption.ID")">@stocklocation.GetValue("Ecom:VariantOption.Name")</option> } } </select> </div> <input type="hidden" name="Redirect" value="false" /> <input type="hidden" name="CartCmd" value="add" /> <input type="hidden" name="ProductID" value="@GetString("Ecom:Product.ID")" /> <input type="hidden" name="VariantID" value="@GetString("Ecom:Product.VariantID")" /> <input type="number" name="Quantity" value="1> <button type="submit" name="submit" >@Translate("Add to cart", "Add to cart")</button> </form>

You can use Javascript to change the price in frontend according to price, or show different units in table with the unit price, and add to cart buttons.

Please note, that orders in the backend do not show the unit for an order, but you can use an order line field to show the correct UnitID. Read more about order line fields here.

To do so add an order line field to add to cart command (if you have more than one order line field remember an if statement to use the right one):

@foreach (LoopItem orderline in GetLoop("Product.OrderLineFields")) { <input type="hidden" id="unitfield" name="@orderline.GetValue("Ecom:Product.OrderLineField.InputTextFieldName")" value="@GetString("Ecom:Product.DefaultUnitID")" /> }

Be aware!

Please be aware that using the Ecom:Product.Form.Clean tag to generate the hidden-fields automatically, the default unitID will always be used as the unitID.

So instead of using the tag simply create and submit the hidden-fields manually. An example of the hidden-fields you need to create can be seen in Figure 41.3 – the minimum requirements being product ID, variant ID, unit ID, and cartcmd=add

Figure 41.3 To ensure that you add the right unitID to cart, you must submit the fields usually rendered by Ecom:Product.Form.Clean manually

By default, all backend users have access to all product fields, and most fields cannot have different values across languages and variants.

However, you can control product field behavior by going to Settings > Ecommerce > Advanced configuration > Fields and modifying the field settings.

Read more about the Fields settings in advanced configuration in this article.

The ability to comment and rate products (Figure 43.1), and to compare two or more similar products, are features which many end-users have come to expect from an Ecommerce solution.

With Dynamicweb you can implement this with a minimum of effort – here’s how.

Figure 43.1 An example of how comments & ratings may be used

Comments & Ratings on pages & news articles

You can use the Comments & Rating functionality to rate and comment on pages and news articles as well.

Simply copy comment.cshtml from /Templates/eCom/Product to either your News article template folder or your design folder (/Templates/Designs/YourDesign/) - then open the template and comment the relevant sections in and out.

To add comments and ratings to your product catalog, you must include the standard Comment.cshtml file in your product template.

To do so:

  • Go to the paragraph with your Product Catalog app and open the app settings
  • Scroll down to the Templates section and open your product template (Figure 44.1)
Figure 44.1 The Product Catalog app templates section
  • Include the Comment.cshtml template where you want the comments to show up:
<div id="product-comments"> @Include("Comment.cshtml") </div>

Minimizing spam comments

By default the ability to make comments and ratings will be available to all your visitors. However, by using the If Defined() template tag, you can edit your product template to only allow logged-in users to comment and rate a product. This will likely minimize problems with spam or unwanted comments.

To add comparisons to your product catalog, you must select or modify the product list template and use the compare template.

To do so:

  • Go to the paragraph with your Product Catalog app and open the app settings
  • Scroll down to the Templates section and:
    • Select the list-template ProductListCompareAndRating.html
    • Select the compare-template CompareProducts.html (Figure 45.1)
Figure 45.1 The Product List template and the Compare template

On the frontend, you users will now be able to click compare on products to add them to a compare list (Figure 45.2).

Figure 45.2 Adding products to a compare-list

From the compare list, they will be able to click compare to go to a compare screen (Figure 45.3).

Figure 45.3 An example of two products compared

Once comment and rating functionality has been implemented, you will be able to view and moderate product comments from the backend by clicking the comment button in the ribbon bar.

This will take you to the comment window (Figure 46.1).

Figure 46.1 View and moderate comments from the comments window

From here you can view, delete, add or edit comments (by clicking it).

Note: Comments added from the backend will not show up until a comment has been added from the frontend.

Database

These are the database tables associated with Products and related features in Dynamicweb.

EcomProducts

Contains product data from Ecommerce. Identity is defined as a combination of ProductID, ProductVariantID and ProductLanguageID.

Field name Data type Length
ProductId nvarchar 30
ProductLanguageId nvarchar 50
ProductVariantId nvarchar 255
ProductDefaultShopId nvarchar 255
ProductNumber nvarchar 255
ProductName nvarchar 255
ProductShortDescription nvarchar Max
ProductLongDescription nvarchar Max
ProductImageSmall nvarchar 255
ProductImageMedium nvarchar 255
ProductImageLarge nvarchar 255
ProductLink1 nvarchar 255
ProductLink2 nvarchar 255
ProductPrice float 8
ProductStock float 8
ProductStockGroupId nvarchar 50
ProductWeight float 8
ProductVolume float 8
ProductVatGrpId nvarchar 50
ProductManufacturerId nvarchar 50
ProductActive bit 1
ProductPeriodId nvarchar 50
ProductCreated datetime 8
ProductUpdated datetime 8
ProductCustomFieldsXml nvarchar Max
ProductType int 4
ProductPriceType int 4
ProductPriceCounter int 4
ProductVariantCounter int 4
ProductVariantProdCounter int 4
ProductVariantGroupCounter int 4
ProductRelatedCounter int 4
ProductUnitCounter int 4
ProductDefaultUnitId nvarchar 50
ProductDefaultVariantComboId nvarchar 255
ProductPriceMatrixUnit int 4
ProductPriceMatrixVariant int 4
ProductPriceMatrixPeriod int 4
ProductPriceMatrixMultiplePrices int 4
ProductPriceMatrixQuantitySpecification nvarchar 255
ProductMetaTitle nvarchar 255
ProductMetaKeywords nvarchar Max
ProductMetaDescription nvarchar Max
ProductMetaUrl nvarchar Max
ProductCategoryFieldValues nvarchar Max
ProductOptimizedFor nvarchar 255
ProductCommentcount int 4
ProductRating float 8
ProductCost float 8
ProductAutoId bigint 8
ProductMetaCanonical nvarchar 255
ProductExcludeFromIndex bit 1
ProductExcludeFromCustomizedUrls bit 1
ProductExcludeFromAllProducts bit 1
ItemCode nvarchar 255
TaxCode nvarchar 512
ProductPoints float 8
ProductHidden bit 1
ProductShowInProductList bit 1
ProductApprovalState int 4
ProductWorkflowStateId int 4

EcomDetails

Contains data from the Ecom product details tab. Linked to product via DetailProductID, DetailVariantID, and DetailLanguageId.

Field name Data type Length
DetailId nvarchar 255
DetailProductId nvarchar 30
DetailVariantId nvarchar 255
DetailLanguageId nvarchar 50
DetailType smallint 2
DetailValue nvarchar Max
DetailSortOrder int 4
DetailAutoId int 4
DetailIsDefault bit 1
DetailsGroupId int 4

EcomPrices

Contains price matrix data for products as defined in prices section of backend product details. Product is identified by combining PriceProductId, PriceProductVariantID and PriceProductLanguageID.

Field name Data type Length
PriceId nvarchar 255
PriceProductId nvarchar 30
PriceProductVariantId nvarchar 255
PriceProductLanguageId nvarchar 50
PriceCurrency nvarchar 3
PriceQuantity int 4
PriceAmount float 8
PriceUnitId nvarchar 50
PricePeriodId nvarchar 50
PriceCustomerGroupId nvarchar 255
PricePriority int 4
PriceUserCustomerNumber nvarchar 255
PriceCountry nchar 2
PriceShopId nvarchar 255
PriceValidFrom datetime 8
PriceValidTo datetime 8
PriceUserId nvarchar 255
PriceUserGroupId nvarchar 255
PriceAutoId int 4
PriceIsInformative bit 1
PriceStockLocationID bigint 8

EcomManufacturers

Contains manufacturer data from Settings -> Ecom -> Product Catalog -> Manufacturers.

Field name Data type Length
ManufacturerId nvarchar 50
ManufacturerName nvarchar 255
ManufacturerAddress nvarchar 255
ManufacturerZipCode nvarchar 255
ManufacturerCity nvarchar 255
ManufacturerCountry nvarchar 255
ManufacturerPhone nvarchar 255
ManufacturerFax nvarchar 255
ManufacturerEmail nvarchar 255
ManufacturerWeb nvarchar 255
ManufacturerLogo nvarchar 255
ManufacturerDescription nvarchar Max
ManufacturerAutoId int 4

EcomPeriods

Contains publication periods for products as defined in backend product details.

Field name Data type Length
PeriodId nvarchar 50
PeriodName nvarchar 255
PeriodStartDate datetime 8
PeriodEndDate datetime 8
PeriodAlways bit 1
PeriodActive bit 1
PeriodShowProductsAfterExpiration bit 1
PeriodAutoId int 4
PeriodHidden bit 1

EcomProductItems

Links items (ProductItemId) with products (ProductItemProductId).

Field name Data type Length
ProductItemId nvarchar 50
ProductItemProductId nvarchar 30
ProductItemBomProductId nvarchar 30
ProductItemBomGroupId nvarchar 255
ProductItemQuantity float 8
ProductItemName nvarchar 255
ProductItemRequired bit 1
ProductItemDefaultProductId nvarchar 30
ProductItemBomNoProductText nvarchar 255
ProductItemSortOrder int 4
ProductItemBomVariantId nvarchar 255
ProductItemAutoId int 4

EcomProductsRelated

Links products (ProductRelatedProductID) with their related products (ProductRelatedProductRelID) within a relation group (ProductRelatedGroupID).

Field name Data type Length
ProductRelatedProductId nvarchar 30
ProductRelatedProductRelId nvarchar 30
ProductRelatedGroupId nvarchar 255
ProductRelatedSortOrder int 4
ProductRelatedLimitLanguage nvarchar Max
ProductRelatedLimitCountry nvarchar Max
ProductRelatedLimitShop nvarchar Max
ProductRelatedAutoId int 4
ProductRelatedProductRelVariantID nvarchar 255
ProductRelatedLimitVariant nvarchar Max

EcomProductsRelatedGroups

Defines product relation groups as defined in Settings -> Ecom -> Product catalog -> Relation groups

Field name Data type Length
RelatedGroupId nvarchar 255
RelatedGroupName nvarchar 255
RelatedGroupLanguageId nvarchar 50
RelatedGroupSortOrder int 4
RelatedGroupAutoId int 4

EcomProductVatGroups

Contains vat groups as defined in Settings -> Ecom -> Internationalization -> Vat groups.

Field name Data type Length
ProductVatGroupID int 4
ProductVatGroupProductID nvarchar 30
ProductVatGroupProductVariantID nvarchar 255
ProductVatGroupVatGroupID nvarchar 50
ProductVatGroupCountryID nvarchar 2

Comment

Contains comments for news, paragraphs, and items.

Field name Data type Length
CommentId int 4
CommentName nvarchar 255
CommentEmail nvarchar 255
CommentWebsite nvarchar 255
CommentRating int 4
CommentText nvarchar Max
CommentItemType nvarchar 25
CommentItemId nvarchar 35
CommentLangId nvarchar 25
CommentCreatedDate datetime 8
CommentEditedDate datetime 8
CommentCreatedBy int 4
CommentEditedBy int 4
CommentIp nvarchar 16
CommentLikes int 4
CommentNolikes int 4
CommentParentId int 4
CommentActive bit 1

These are the database tables associated with product units and stock:

EcomStockGroups

Contains setup date for stock states as defined in Settings -> Ecommerce -> Orders -> Stock state.

Field name Data type Length
StockGroupId nvarchar 50
StockGroupName nvarchar 255
StockGroupAutoId int 4

EcomStockStatusLanguageValue

Contains translated (StockStatusLanguageValueLanguageId) data for individual stock states.

Field name Data type Length
StockStatusLanguageValueId nvarchar 50
StockStatusLanguageValueLinesId nvarchar 50
StockStatusLanguageValueLanguageId nvarchar 50
StockStatusLanguageValueText nvarchar 255
StockStatusLanguageValueDeliveryValue nvarchar 255
StockStatusLanguageValueDeliveryText nvarchar 255
StockStatusLanguageValueAutoId int 4

EcomStockLocation

Contains setup data for stock locations as defined in Settings -> Ecommerce -> Product catalog -> Stock location.

Field name Data type Length
StockLocationId int 4
StockLocationName nvarchar 255
StockLocationDescription nvarchar Max
StockLocationLanguageId nvarchar 50
StockSortOrder int 4
StockLocationGroupId bigint 8

EcomStockStatusLine

Links stock states from EcomStockStatusLanguageValue (StockStatusLinesId) to stock groups from EcomStockGroups (StockStatusLinesGroupId).

Field name Data type Length
StockStatusLinesId nvarchar 50
StockStatusLinesGroupId nvarchar 50
StockStatusLinesRate float 8
StockStatusLinesDefinition nvarchar 50
StockStatusLinesIcon nvarchar 255
StockStatusLineAutoId int 4

EcomStockUnit

Keeps track of stock quantity (StockUnitQuantity) in different units (StockUnitId) for products (StockUnitProductId, StockUnitVariantId) across various locations (StockUnitLocationId).

Field name Data type Length
StockUnitProductId nvarchar 30
StockUnitVariantId nvarchar 255
StockUnitId nvarchar 50
StockUnitQuantity float 8
StockUnitWeight float 8
StockUnitVolume float 8
StockUnitStockLocationId bigint 8
Id int 4
StockUnitDescription nvarchar 255

These are the detabase tables associated with the Gift Cards product type:

EcomGiftCard

Contains gift card data from Settings -> Ecom -> Orders - Gift Cards.

Field name Data type Length
GiftCardAutoId bigint 8
GiftCardId nvarchar 50
GiftCardName nvarchar Max
GiftCardCode nvarchar Max
GiftCardExpiryDate datetime 8
GiftCardCurrency nvarchar 10

EcomGiftCardTransaction

Logs the orders (GiftCardTransactionOrderId) a gift card (GiftCardTransactionGiftCardId) is used in.

Field name Data type Length
GiftCardTransactionId bigint 8
GiftCardTransactionAmount float 8
GiftCardTransactionOrderId nvarchar 50
GiftCardTransactionGiftCardId nvarchar 50
GiftCardTransactionDate datetime 8
GiftCardTransactionOrderLineId nvarchar 50

These are the database tables related to custom product fields:

EcomProductField

Contains product field definitions from Settings -> Ecom -> Product catalog -> Product Fields.

Field name Data type Length
ProductFieldId nvarchar 255
ProductFieldName nvarchar 255
ProductFieldSystemName nvarchar 255
ProductFieldTemplateName nvarchar 255
ProductFieldTypeId int 4
ProductFieldTypeName nvarchar 255
ProductFieldLocked bit 1
ProductFieldSort int 4
ProductFieldListPresentationType int 4
ProductFieldAutoId int 4
ProductFieldDoNotRender bit 1

EcomProductFieldTranslation

Contains translations of product fields (ProductFieldTranslationFieldID) to various languages (ProductFieldTranslationLanguageID).

Field name Data type Length
ProductFieldTranslationID int 4
ProductFieldTranslationFieldID nvarchar 255
ProductFieldTranslationLanguageID nvarchar 50
ProductFieldTranslationName nvarchar 255
ProductFieldTranslationDescription nvarchar Max

EcomFieldOption

Contains option values for product fields (EcomProductField) of type list. Linked on FieldsOptionFieldID.

Field name Data type Length
FieldOptionId nvarchar 255
FieldOptionFieldId nvarchar 255
FieldOptionName nvarchar 255
FieldOptionValue nvarchar 255
FieldOptionIsDefault bit 1
FieldOptionSort int 4
FieldOptionAutoId int 4

EcomFieldOptionTranslation

Contains translation data for Ecom field options (EcomFieldOption). Links field options (EcomFieldOptionTranslationOptionID) to language (EcomFieldOptionTranslationLanguageID).

Field name Data type Length
EcomFieldOptionTranslationID int 4
EcomFieldOptionTranslationOptionID nvarchar 255
EcomFieldOptionTranslationLanguageID nvarchar 50
EcomFieldOptionTranslationName nvarchar 255