Class CartItemProductServiceProperties
java.lang.Object
com.broadleafcommerce.cartoperation.service.mapping.CartItemProductServiceProperties
@ConfigurationProperties("broadleaf.cartoperation.service")
public class CartItemProductServiceProperties
extends Object
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefault settings for subscription items when added to the cart, if not specified in the Product configurations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPreferred asset to use for display in the Cart.Default settings for subscription items when added to the cart, if not specified in the Product configurations.booleanDetermines whether theCartItem.getImageAsset()should match the selectedVariantif possible instead of theProduct.getPrimaryAsset().booleanWhether to use the name of the variant as the display name of the cart item instead of the product's.voidsetMatchCartItemAssetToVariant(boolean matchCartItemAssetToVariant) Determines whether theCartItem.getImageAsset()should match the selectedVariantif possible instead of theProduct.getPrimaryAsset().voidsetPreferredAssetTag(String preferredAssetTag) Preferred asset to use for display in the Cart.voidsetSubscriptionItemDefaults(CartItemProductServiceProperties.SubscriptionItemDefaults subscriptionItemDefaults) Default settings for subscription items when added to the cart, if not specified in the Product configurations.voidsetUseVariantNameInCart(boolean useVariantNameInCart) Whether to use the name of the variant as the display name of the cart item instead of the product's.
-
Constructor Details
-
CartItemProductServiceProperties
public CartItemProductServiceProperties()
-
-
Method Details
-
isMatchCartItemAssetToVariant
public boolean isMatchCartItemAssetToVariant()Determines whether theCartItem.getImageAsset()should match the selectedVariantif possible instead of theProduct.getPrimaryAsset(). The matching will be done viaDefaultCartItemCatalogInformationServiceif theVarianthasoptionValuesto use to match with aproduct assetby tag.Defaults to true since Cart Operation 2.2.0-GA.
-
getPreferredAssetTag
Preferred asset to use for display in the Cart. If an asset with this tag is found, it will be used. If no asset is found then the primary asset or the first variant-matching asset will be used. The default tag iscart.- Since:
- Cart Operation Service 2.2.0, Release Train 2.2.0
- See Also:
-
isUseVariantNameInCart
public boolean isUseVariantNameInCart()Whether to use the name of the variant as the display name of the cart item instead of the product's.- Since:
- Cart Operation Service 2.2.0, Release Train 2.2.0
-
getSubscriptionItemDefaults
Default settings for subscription items when added to the cart, if not specified in the Product configurations.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-
setMatchCartItemAssetToVariant
public void setMatchCartItemAssetToVariant(boolean matchCartItemAssetToVariant) Determines whether theCartItem.getImageAsset()should match the selectedVariantif possible instead of theProduct.getPrimaryAsset(). The matching will be done viaDefaultCartItemCatalogInformationServiceif theVarianthasoptionValuesto use to match with aproduct assetby tag.Defaults to true since Cart Operation 2.2.0-GA.
-
setPreferredAssetTag
Preferred asset to use for display in the Cart. If an asset with this tag is found, it will be used. If no asset is found then the primary asset or the first variant-matching asset will be used. The default tag iscart.- Since:
- Cart Operation Service 2.2.0, Release Train 2.2.0
- See Also:
-
setUseVariantNameInCart
public void setUseVariantNameInCart(boolean useVariantNameInCart) Whether to use the name of the variant as the display name of the cart item instead of the product's.- Since:
- Cart Operation Service 2.2.0, Release Train 2.2.0
-
setSubscriptionItemDefaults
public void setSubscriptionItemDefaults(CartItemProductServiceProperties.SubscriptionItemDefaults subscriptionItemDefaults) Default settings for subscription items when added to the cart, if not specified in the Product configurations.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
-