Broadleaf Microservices
  • v1.0.0-latest-prod

Cart Operation Release Notes for 2.1.4-GA

Tip
The 2.x versions are Spring Boot 3 compatible.

Requirements

  • JDK 17 is required for Broadleaf release trains 2.0.0-GA, and beyond.

New Features & Notable Changes

  • Added support for Flash Sales (PriceList price limited by quantity). Please refer to the Flash Sale Documentation for more information.

    • If the applicable PriceInfo for a CartItem is limited by quantity and the quantity of the CartItem exceeds that limited quantity, the CartItem will be split into a pair following the logic in this example:

      • If a sale PriceInfo only has 2 quantity available and the CartItem has a quantity of 3, it will be split into a pair of CartItems with quantity of 2 and 1.

      • If a sale PriceInfo only has 2 quantity available and the CartItem was added to cart 3 separate times, meaning the cart has 3 CartItems each with a quantity of 1, it will be combined into a pair of CartItems with quantity of 2 and 1, with 2 of them using the sale PriceInfo, and 1 using the backup PriceInfo.

    • Added a new checkout activity to validate and record the PriceData usage for PriceData that are limited by quantity

      • The PricingService will check the availability of those limited PriceData usage, and check the active dates for those applicable PriceData as well as those of the PriceList. If any of the PriceData is unavailable, the entire request is marked as failed. If applying the PriceData is unsuccessful (e.g. the price data is no longer available or expired), the Cart is re-priced and a cart alert is shown to notify the customer of the price change.

  • Added implementation to populate a Variant’s tags onto the Cart to support Offers that are targeting variant-level tags.

  • Added support to allow a bundle or a non-individually-sold item to be added to cart if it’s a Free Gift item.

  • Updated the Record Price Data Usages endpoint configured path.

  • Added a allowPartialQuantityForPriceLimitedByQuantity property via the CartOperationServiceProperties for DefaultCartPricingService to use to control whether partial quantity is allowed for a price limited by quantity.

    • For example, if a sale price only has the available quantity of 2, and the customer has 5 of the items in the cart, 2 of them will use the sale price and the remaining items will use the backup price if this property is set to true. If this property is set to false, then all 5 items will use the backup price.

  • Updated DiscriminatedProperties to use CaseInsensitiveMap when storing the tenant and application identifying properties.

    • ENV properties will be converted to lowercase by Spring — in the case of UUIDs for Applications and Tenants, there can be a mismatch when the casing changes, so CaseInsensitiveMap addresses this issue.

  • Added support for a generic Non-Catalog Product type

    • A non-catalog product/cart item represents a product/cart item that does not exist in a catalog. This allows for custom usage of the CartItem domain and tracking of its instances as line items. These items are included in the cart subtotal and excluded from promotions.

  • Added a new field failureType on the CheckoutRollbackEvent that includes a reason for the failure for the step within the checkout workflow, which will be set when a checkout exception occurs.

  • Added support for gift items automatically applied to a cart to be allowed to have a set price.

Added Configuration Properties

Bug Fixes

Free Gift Fixes

  • Fixed issue where free gift items were not being subtracted from the Cart subtotal and list of line items used when calculating and applying Offers.

  • Fixed issue where Cart totals were not being recalculated when any free gift items are removed.

Cart & Fulfillment Pricing Fixes

  • Fixed issue where CartItem dependent items of dependent items were not being priced correctly.

  • Fixed issue where bundles and their dependent products that were in a catalog and price list with different currencies between them could not be added to the cart by causing a currency mismatch.

  • Fixed issue where a FulfillmentOption was being added to VIRTUAL type fulfillment groups when using FulfillmentServices with its PricedFulfillmentOption.

  • Fixed variant-level sale price currency mismatch issue by updating the pricing info in the cart item’s internal attributes to match the prices during repricing.

  • Fixed issue where Order Adjustments were not properly prorating.

Offer Fixes

  • Fixed issue where voucher offer usage was not being recorded, which caused the maximum uses restriction to be broken.

  • Fixed issue where if a user removes the "gift" from their cart, the offer can never be re-applied for the lifetime of the cart — now if the user removes all qualifier items from their cart, the offer can be re-applied.

    • This behavior is controlled by the CartOpsPromotionProperties#giftOfferEligibleIfQualifierRemoved property, which is true by default.

Miscellaneous Fixes

  • Fixed issue where pagination requests were being serialized incorrectly, and page responses were deserialized incorrectly.

  • Fixed issue where a stale cart check does not take into account and remove deactivated Variant products.

  • Fixed issue where a failure in DefaultCheckoutService#createOrderNumber method doesn’t create an order but still charges a payment.