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.boolean
Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
.boolean
Whether to use the name of the variant as the display name of the cart item instead of the product's.void
setMatchCartItemAssetToVariant
(boolean matchCartItemAssetToVariant) Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
.void
setPreferredAssetTag
(String preferredAssetTag) Preferred asset to use for display in the Cart.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.
-
Constructor Details
-
CartItemProductServiceProperties
public CartItemProductServiceProperties()
-
-
Method Details
-
isMatchCartItemAssetToVariant
public boolean isMatchCartItemAssetToVariant()Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
. The matching will be done viaDefaultCartItemCatalogInformationService
if theVariant
hasoptionValues
to use to match with aproduct asset
by 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 selectedVariant
if possible instead of theProduct.getPrimaryAsset()
. The matching will be done viaDefaultCartItemCatalogInformationService
if theVariant
hasoptionValues
to use to match with aproduct asset
by 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
-