Class CartItemProductServiceProperties
java.lang.Object
com.broadleafcommerce.cartoperation.service.mapping.CartItemProductServiceProperties
@ConfigurationProperties("broadleaf.cartoperation.service")
public class CartItemProductServiceProperties
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPreferred asset to use for display in the Cart.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.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
-
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
-