Documentation Home

Broadleaf CartRules 1.0.1-GA

Released on June 2, 2017

This is the 1st patch release for the Broadleaf CartRules 1.0.x module. This version of the CartRules module has the following dependencies

  • Broadleaf Commerce Framework 5.1.0-GA or higher
  • Customer Segment 1.0.2-GA or higher

Noteworthy Updates

Cart Rules module API

This release contains several changes to the Cart Rules module API. These changes center around the deprecation of CartRuleActionImpl.shouldReverse. Cart Rule Actions will no longer will have the ability to automatically reverse themselves once they are no longer valid. This functionality has been removed in favor of creating separate Cart Rules to "reverse" another.

The logic that handled this use case, located in CartRuleActivityServiceImpl, has been removed and refactored significantly. If you have customized or extended this class, be sure to test your implementation to ensure it still functions as desired.

In order to achieve this behavior, we've added two places (hook points) that you can execute Cart Rules - "Before Remove from Cart" and "After Remove from Cart". This allows the user to create rules that will fire when a customer attempts to remove an item from their cart, giving them the ability to "reverse" a previously fired Cart Rule.

This release also adds the new action type of "Add Dependent Item to Cart". When used in conjunction with a rule that fires "After Add to Cart", an item will be added to the customer's cart as a dependent order item of the product that is currently being added. This is helpful when these two items need to be tied to one another. When the parent order item is removed from a customer's cart, the child (dependent) order item is also removed automatically. It's important to note that this behavior is only available with the "After Add to Cart" execution hook point. The reasoning behind this is that at other points during the add or remove workflows, we aren't typically working with a specific order item and therefore can't determine which order item should be the parent. If any other execution hook point is selected for the Cart Rule, this action is treated exactly the same as an "Add Item to Cart" action.

Deprecations

  • CartRuleActionImpl.shouldReverse has been deprecated and will be removed in a future release.

An at-a-glance view of the issues that were closed in this release:

Major Bugs(4)

  • Fixed incorrect boolean values in load scripts
  • Will now use the max times per order if the cart is requesting more than the available times left to apply the rule
  • Allow products with required options to be added to the cart by a Cart Rule without failing
  • Remove "reversible" cart rule action logic

Minor Bugs(1)

  • Reorder CartRules Admin section

Total Resolved Issues: 5