Download page Populating Option Default and Min/Max Quantity Using Numeric Expression.
Populating Option Default and Min/Max Quantity Using Numeric Expression
You must have an existing option product. You must also create an attribute group named Summary of WattHoursrequired for SunHome. Following is a list of attributes in the group:
Total daily WattHours required
WattHours Required for 3 days
Battery capacity
Each attribute has the data type defined as number. You must derive the values for options using numeric expressions. You must also create an option group with the options. Based on our scenario, this section outlines the procedure for an option group SunHome Component Quantity with options, Number of Solar Panels and Number of Batteries whose values are derived from the attributes above.
Navigate to the SunHome product, and click Product Console.
From the Catalog section, click Manage Bundles/ Options.
To associate an expression to an option, expand the Option Group, select an Option for which you want to add a field expression.
To add an expression, click one or more of the following:
Min Quantity
Max Quantity
Default Quantity
The expression builder pop up appears.
Click Insert Field. To retrieve the fields for building the expression, click Insert Field and choose Product attributes or Line Item. Line Item allows you to get access to fields at Product and Quote objects as well.
To derive the values for the options of SunHome, in the Insert Field dialog, navigate to Product Attribute. The expressions built for each of the options are as follows: