We've improved the specification of the currentWeight variable, which is available only in weight limit alert messages.
Overview of the Change
Previously, currentWeight always displayed the total weight of all products in the cart, regardless of the application scope. With this improvement, a more appropriate total weight is now displayed according to the weight limit's application scope.
Details of the Improvement
| Application Scope | Before the Improvement (currentWeight Behavior) | After the Improvement (currentWeight Behavior) |
|---|---|---|
| Cart | Displays the total weight of all products subject to the weight limit | Displays the total weight of all products subject to the weight limit |
| Product | Displays the total weight of all products subject to the weight limit | Displays the total weight of the variants belonging to the target product |
| Variant | Displays the total weight of all products subject to the weight limit |
Displays the total weight of the target variant |
Benefits of This Change
- Improved Accuracy: The weight shown in the alert message now reflects the product or variant directly related to the configured limit rule, making it clearer for customers.
- Improved Flexibility: More appropriate information can now be provided for weight limits configured with different application scopes.