Configuring Cart Item Refresh Levels

As you add items to the cart, the cart contents increase. When the cart page refreshes, the getCartsItems API is called. The call can fail due to the heap size or an exceeded time limit. To support a large number of items when returning responses from getCartsItems and addToCart, a level-based approach to refreshing the cart is supported. This approach creates a smaller response to optimize performance. Use the level-based approach when you find that response times are excessive.

Note
Note

LevelBasedInterface can additionally be used to control the API responses.

When you add an item to the cart or when you refresh the cart, instead of returning the complete product bundles, the level-based approach sends only the root along with the first level children. For example:

  • Root

    • Parent 1

    • Parent 2

    • Parent 3

When you click the expand icon, the next level of child product is returned through a subsequent API call.