ROES System - New "weight" capability.
This article applies to ROES Web and ROES Desktop.
The value of attribute "weight" now supports expressions using macros. Current supported macros are [width] and [height]. As an example [width]*[height]. This applies to templates only. An option can still contain a weight attribute but its value is limited to a numeric value like "10".
A shipping method can have attribute "disabled" with an expression as a value. As an example disabled="[weight]>=100". With this expression the shipping method containing it will be disabled (grayed out) when the summed weight of the order is greater than or equal to 100.
Assigning the weight attribute using Template Tool's Distribute Attribute.
Select a template or range of templates - Click then Shift or Cmd/Cntrl Click to select a range.
Right click on one of the selected/highlighted items.
Select Distribute Attribute from the menu.
In the dialog presented enter "weight" for the attribute and [width]*[height] for the value.
Other acceptable values - [height]*10, ([width]*[height])*10, [height]*10, [width]*10
Modify the shipping method(s).
Add attribute "disabled" to your shipping method(s) with a value (expression) like [weight]>=100. With this example when the total weight of the order is equal to or greater than 100 this shipping method will be disabled/grayed out.
Advanced Expression (ROES Web only)
ROES Web supports advanced expressions for weight value calculations.
if ([width] > 40 || [length] > 60) { <-- Width is greater than 40 OR (||) Height is greater than 60
return 1000000;
} else if ([width] > 30 || [length] > 45) {
return 10000;
} else if ([width] > 11 || [length] > 14) {
return 100;
} else {
return 1;
}
Expression | Behavior |
[width]*[height] | the total weight value used for disabling a ship method will be the width x the height of each template(T1, T2...) in the order. T1width*T1height + T2width*T2height... |
([width]*[height])*10 | Multiply the width by the height, multiply that result by 10 |
[width] | weight = width |
[height] | weight = height |