Broadleaf Microservices
  • v1.0.0-latest-prod

Cart Services Release Notes for 2.3.0-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

  • Introduce CartItem#hasOverriddenSubtotal flag to support overriding the CartItem#getSubtotalWithDependentItems() calculation when portions of the subtotal don’t scale with the item quantity

  • Add support for subscription Cancellation Policy identification

  • Add support for customer context tracking on cart

    • Cart entity tracking types were updated to FullTracking to support customer context. This was changed because application tracking isn’t sufficient in all scenarios for Carts. An example is business having a web app and a mobile app. These may have different application IDs for discrimination of certain things (e.g. content), but need to share customers, catalogs, carts, orders, etc. With the application discrimination of Cart, there was no straightforward way to share Carts between these two applications. Customer context discrimination (which can be shared across applications) solves this need.

Bug Fixes

  • Fix issue where CartCrudEntityHelper was not sending out mutation events since it wasn’t configured properly as a spring bean in order to accept the autowire dependency for event publisher

Upgrade Guide

Add new columns to the BLC_CART_ACTION_AUDIT table
ALTER TABLE cart.blc_cart_action_audit
    ADD COLUMN IF NOT EXISTS trk_catalog_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_catalog_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_catalog_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_catalog_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_parent_cat_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_composite_sort_level NUMERIC(11,5),
    ADD COLUMN IF NOT EXISTS trk_customer_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_field_overrides VARCHAR(10485760);
Add new columns to the BLC_CART_NOTE table
ALTER TABLE cart.blc_cart_note
    ADD COLUMN IF NOT EXISTS trk_catalog_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_catalog_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_catalog_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_catalog_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_parent_cat_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_composite_sort_level NUMERIC(11,5),
    ADD COLUMN IF NOT EXISTS trk_customer_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_field_overrides VARCHAR(10485760);
Add new columns to the BLC_CART table
ALTER TABLE cart.blc_cart
    ADD COLUMN IF NOT EXISTS trk_catalog_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_catalog_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_catalog_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_catalog_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_level BIGINT,
    ADD COLUMN IF NOT EXISTS trk_parent_cat_locale VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_parent_cat_name VARCHAR(255),
    ADD COLUMN IF NOT EXISTS trk_composite_sort_level NUMERIC(11,5),
    ADD COLUMN IF NOT EXISTS trk_customer_context_id VARCHAR(36),
    ADD COLUMN IF NOT EXISTS trk_field_overrides VARCHAR(10485760);
Add new columns to the BLC_CART table
ALTER TABLE cart.blc_cart
    ADD COLUMN trk_catalog_context_id VARCHAR(36),
    ADD COLUMN trk_catalog_level BIGINT,
    ADD COLUMN trk_catalog_locale VARCHAR(255),
    ADD COLUMN trk_catalog_name VARCHAR(255),
    ADD COLUMN trk_parent_cat_context_id VARCHAR(36),
    ADD COLUMN trk_parent_cat_level BIGINT,
    ADD COLUMN trk_parent_cat_locale VARCHAR(255),
    ADD COLUMN trk_parent_cat_name VARCHAR(255),
    ADD COLUMN trk_composite_sort_level NUMERIC(11,5),
    ADD COLUMN trk_customer_context_id VARCHAR(36),
    ADD COLUMN trk_field_overrides VARCHAR(10485760);
Add new indexes for the trk_customer_context_id
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx7b28qu6ygegxyv9u30fvfch6m
ON cart.blc_cart(trk_customer_context_id);

CREATE INDEX CONCURRENTLY IF NOT EXISTS idxh49b7b4j012hmjcgv13c4hf92
ON cart.blc_cart_action_audit(trk_customer_context_id);

CREATE INDEX CONCURRENTLY IF NOT EXISTS idx3779sx8swarwd9a7t0mf2bmvj
ON cart.blc_cart_note(trk_customer_context_id);