Skip to content

BasketSettings

The BasketSettings object represents settings for basket articles objects in the storefront.

classDiagram
  direction LR
  class BasketSettings{
    bool isBuyingEnabled
    bool isBuyingEnabledToUnregistered
    bool isAvailabilityNotificationEnabled
    bool redirectToBasketAfterAdding
  }

Properties

Attribute name Type Description
isBuyingEnabled bool Returns true if purchase is enabled.
isBuyingEnabledToUnregistered bool Returns true if unregistered user can buy.
isAvailabilityNotificationEnabled bool Returns true if user can sign up to get notified about product availability.
redirectToBasketAfterAdding bool Returns true if redirection to the shopping basket after adding a product is enabled.

Examples

Rendering the Add to cart button should depend on some settings like basketSettings.isBuyingEnabled and:
- for logged-in users productPricesSettings.showGrossPrice is true.
- for unregistered users basketSettings.isBuyingEnabledToUnregistered and productPricesSettings.showPricesToUnregistered is true.

isBuyingEnabled property

{{ basketSettings.isBuyingEnabled }}
true

isBuyingEnabledToUnregistered property

{{ basketSettings.isBuyingEnabledToUnregistered }}
true

isAvailabilityNotificationEnabled property

{{ basketSettings.isAvailabilityNotificationEnabled }}
true

redirectToBasketAfterAdding property

{{ basketSettings.redirectToBasketAfterAdding }}
true