Broadleaf Microservices
  • v1.0.0-latest-prod

Cart Operation Release Notes for 2.1.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

Bugs Fixed

  • Fixed currency mismatch when adding to cart in a different currency from the catalog’s default currency, along with PricingKey-targeted PriceData.

  • Fixed paging not working when underlyingSize is present

    • When underlyingSize is present, it was used to set the Pageable’s pageSize instead of underlyingSize, causing the actual underlyingSize value to be 0

  • Fixed issue causing pricing-key-based PriceableTargets to not be created for some cart pricing scenarios (esp. a reprice when switching currencies). This caused the price of Variant-based products to not be found when communicating with the PricingService.

Upgrade Guide

API Changes

New Endpoints

Path Description

GET /cart-action-audit/{cartId}

Retrieve cart action audits for the given cart id

GET /cart-notes/{cartId}

Retrieves CartNotes for the given cart id

Additional optional parameters:

  • cartLevelOnly: whether to retrieve Cart-level notes only

GET /cart-notes/{cartId}/items/{cartItemId}

Retrieves CartNotes for the given cart item id

POST /cart-notes/{cartId}

Creates a Cart-level note

POST /cart-notes/{cartId}/items/{cartItemId}

Creates a CartItem-level note

PUT /cart-notes/{cartId}/notes/{noteId}

Replaces a CartNote

DELETE /cart-notes/{cartId}/notes/{noteId}

Deletes a CartNote

PATCH /cart/{cartId}/info

Updates the cart info based on the given UpdateCartInfoRequest

GET /quotes

Retrieve quotes belonged to the currently authenticated user

GET /quotes?requested=true

Retrieve requested quotes

POST /quotes/{id}/status

Changes the status of a quote based on the given QuoteProcessRequest

DELETE /quotes/{id}

Deletes the quote

GET /properties

Retrieves the properties related to quote based on the given ContextInfo

Configuration Properties

Added Properties

  • broadleaf.quote.enabled

    • Determine if quote-related functionalities are enabled for the given context.

    • Disabled by default.

    • See Enabling Quote for more details

  • broadleaf.quote.sales-team-email

    • Used for quote status transition notifications when the quote is unassigned

  • broadleaf.quote.require-sales-rep-assignment

    • Determine whether a sales rep is required to be assigned to a quote before any changes can be made by the sales rep.

    • Enabled by default.

    • See Sales Rep Assignment Requirement for more details

  • broadleaf.cartoperation.service.quote.requested-quote-statuses

    • List of quote statuses to filter by for the quote admin view

    • Default values:

      • QUOTE_REQUESTED

      • ASSIGNED

      • PUBLISHED

      • CANCELED

      • REJECTED

      • EXPIRED

New Auth Configuration

To support new endpoints in CartNoteProvider, the following configuration must be added to the cartops authorize client:

INSERT INTO blc_client_scopes (id, "scope") VALUES('cartopsclient', 'CART_NOTE');
INSERT INTO blc_client_permissions (id, permission) VALUES ('cartopsclient', 'ALL_CART_NOTE');

Spring Cloud Stream Message Binding Updates

In your project, make sure to define the following properties to complete the configuration:

spring:
  cloud:
    stream:
      bindings:
        quoteRequestedOutput:
          destination: quoteRequested
        quoteRejectedOutput:
          destination: quoteRejected
        quoteCanceledOutput:
          destination: quoteCanceled
        quotePublishedOutput:
          destination: quotePublished
        quoteExpiredOutput:
          destination: quoteExpired