This article gives you a definition and an application case for the validation type (rule type) "Predefine MinMax" and explains how to generate the rule in the configurator interface.
The product configurator already allows to create static (fixed) Min and Max values for specific characteristics. Sometimes these Min and Max values need to be dynamic, because they are changing according to another selection within the configuration. In order to enable min and max values to be dynamic, there is the possibility to set up a rule that can define such a logic.
The rule "Predefine Min/Max" creates such dynamic min- and max values for a certain option value. You can predefine the min- and max values in the product configurator (backend) for each option; on the website fronend the customer can then insert a desired value within the predefined value range in a free text field.
Example Frontend (after choosing a specific option):
In order to explain the implementation we take the example of a carpet producer. The carpet producer offers custom carpets in four form options (round, oval, rectangular, quadrangular) as well as in different lengths and widths. In the product configurator a customer chooses a rectangular carpet design that is available in all sizes up to length; 350 cm; width: 300 cm (max values) and can be ordered not smaller than length: 50 cm; width: 40cm (min values).
How can you predefine these min/max values in the product configurator in your web shop backend, so that the customer cannot choose a size that is not available (outside the value range)?
Implementation in the Product Configurator
(Hint: If you have already created all necessary characteristics, jump to STEP 4 in order to create the rule directly)
STEP 1 Open the product configurator surface
STEP 2 Open the component
STEP 3 Create the characteristic which has to be restricted by min/max values
- create a characteristic group called "size" which includes length as a characteristic. Click on "Add group"
- rename the group
- click on "Add characteristics"
...and the characteristic settings open:
- type in ID & Titel;
- select "Small text input" as Data Type, because the customer should type in a number in a free text field
- make it visible (=>yes)
- decide on the allowed input (=> Number)
- You only! overwrite the global pattern (that will be used as a unit of measurement in this characteristic group), if you have defined a different unit of measurement in your global pattern in the settings. In this case we already defined cm as min/max values the global pattern in the settings (see screenshot):
Thus, in this example we leave the field "overwrite global pattern" open!
[ ($min - $maxcm) must be written in this form! $ is a free variable parameter for a specific value. Cm can be replaced by other units like m (meter) or mm (milimeter). ]
STEP 4 Create a new rule which links a previous option (here: Form) with a characteristic restricted by min/max values (here: Lenght)
Precondition: The previous option has to be also generated (here: group = form; included characteristics= rectangular, round,...) !
- Click on Rules
- Add a rule
The following picture shows up:
We want to generate the following rule: If form= rectangle is selected, the customer can type the desired length in a free text field restricted from 50 to 350cm.
Follow the following steps to generate the rule:
- Label the rule for better allocation
- Select the validation type (rule type) predefine minmax
- Here you create the rule: click on the left box to choose the characteristic group (here: form); right box: "in" is selected, meaning: When form =..., then...*
- Select the respective characteristic of the characteristic group (here: rectangular)
- Click on the characteristic group (here: size) that includes the characteristic that is restricted by min/max values (here: length)
- Select yes to confirm the application of the rule
- Type in the available value frame (here: 50-350) without the unit (already defined in the global settings of the characteristic)
*Why "in"? - "in" is a technical term used to generate true-or-false relationships between backend and frontend.
- Click on Save
STEP 5 The rule is effective now! Test the generated rule by clicking on "Preview Template" and type in random values.
- The predefined value range is shown next to the characteristic name
- If the customer types in a value outside the predefined range, an error message occurs!
Give us a feedback! Does this article help you? If you need any help, please do not hesitate to contact us personally via chat (blue chat button).