public class AddToBasketOptions extends java.lang.Object implements AddToBasketOptionsIf
Constructor and Description |
---|
AddToBasketOptions()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCatalogId()
The id of the catalog which contains dynamic product information such as the price and
quantity
|
java.util.Calendar |
getPriceDate()
The date for which a price is requested.
|
boolean |
isAllowMultipleEntriesForSameProduct()
Normally when an identical product is added to the basket more than once, rather than
creating multiple basket entries we update the existing entry with an updated quantity.
|
boolean |
isCalcQuantityForBundles()
When set to true the quantity available for a product is calculated by reading the quantities
of the products within the bundle.
|
boolean |
isCalculateOptionTax()
When
getBasketItemsPerCustomerWithOptions() is called, the price (including and
excluding tax) of each basket item is returned. |
boolean |
isGetImages()
When getting basket items we attach a product object to each basket item.
|
boolean |
isGetStockReservationInfo()
If true, information about reserved stock is returned by the method
updateBasketWithStockInfoWithOptions()
|
boolean |
isRemoveExpiredReservations()
If true, in the
updateBasketWithStockInfoWithOptions() method, when a
reservation is detected to be expired, the reservation information of the returned basket
item is removed and the reservation itself is deleted. |
boolean |
isUseExternalPrice()
If true we attempt to fetch the prices from the external table
|
boolean |
isUseExternalQuantity()
If true we attempt to fetch the quantities from the external table
|
void |
setAllowMultipleEntriesForSameProduct(boolean allowMultipleEntriesForSameProduct)
Normally when an identical product is added to the basket more than once, rather than
creating multiple basket entries we update the existing entry with an updated quantity.
|
void |
setCalcQuantityForBundles(boolean calcQuantityForBundles)
When set to true the quantity available for a product is calculated by reading the quantities
of the products within the bundle.
|
void |
setCalculateOptionTax(boolean calculateOptionTax)
When
getBasketItemsPerCustomerWithOptions() is called, the price (including and
excluding tax) of each basket item is returned. |
void |
setCatalogId(java.lang.String catalogId)
The id of the catalog which contains dynamic product information such as the price and
quantity
|
void |
setGetImages(boolean getImages)
When getting basket items we attach a product object to each basket item.
|
void |
setGetStockReservationInfo(boolean getStockReservationInfo)
If true, information about reserved stock is returned by the method
updateBasketWithStockInfoWithOptions()
|
void |
setPriceDate(java.util.Calendar priceDate)
The date for which a price is requested.
|
void |
setRemoveExpiredReservations(boolean removeExpiredReservations)
If true, in the
updateBasketWithStockInfoWithOptions() method, when a
reservation is detected to be expired, the reservation information of the returned basket
item is removed and the reservation itself is deleted. |
void |
setUseExternalPrice(boolean useExternalPrice)
If true we attempt to fetch the prices from the external table
|
void |
setUseExternalQuantity(boolean useExternalQuantity)
If true we attempt to fetch the quantities from the external table
|
public boolean isAllowMultipleEntriesForSameProduct()
AddToBasketOptionsIf
isAllowMultipleEntriesForSameProduct
in interface AddToBasketOptionsIf
public void setAllowMultipleEntriesForSameProduct(boolean allowMultipleEntriesForSameProduct)
AddToBasketOptionsIf
setAllowMultipleEntriesForSameProduct
in interface AddToBasketOptionsIf
allowMultipleEntriesForSameProduct
- The allowMultipleEntriesForSameProduct to set.public java.lang.String getCatalogId()
AddToBasketOptionsIf
getCatalogId
in interface AddToBasketOptionsIf
public void setCatalogId(java.lang.String catalogId)
AddToBasketOptionsIf
setCatalogId
in interface AddToBasketOptionsIf
catalogId
- the catalogId to setpublic java.util.Calendar getPriceDate()
AddToBasketOptionsIf
getPriceDate
in interface AddToBasketOptionsIf
public void setPriceDate(java.util.Calendar priceDate)
AddToBasketOptionsIf
setPriceDate
in interface AddToBasketOptionsIf
priceDate
- the priceDate to setpublic boolean isUseExternalPrice()
AddToBasketOptionsIf
isUseExternalPrice
in interface AddToBasketOptionsIf
public void setUseExternalPrice(boolean useExternalPrice)
AddToBasketOptionsIf
setUseExternalPrice
in interface AddToBasketOptionsIf
useExternalPrice
- the useExternalPrice to setpublic boolean isUseExternalQuantity()
AddToBasketOptionsIf
isUseExternalQuantity
in interface AddToBasketOptionsIf
public void setUseExternalQuantity(boolean useExternalQuantity)
AddToBasketOptionsIf
setUseExternalQuantity
in interface AddToBasketOptionsIf
useExternalQuantity
- the useExternalQuantity to setpublic boolean isCalcQuantityForBundles()
AddToBasketOptionsIf
isCalcQuantityForBundles
in interface AddToBasketOptionsIf
public void setCalcQuantityForBundles(boolean calcQuantityForBundles)
AddToBasketOptionsIf
setCalcQuantityForBundles
in interface AddToBasketOptionsIf
calcQuantityForBundles
- the calcQuantityForBundles to setpublic boolean isGetImages()
isGetImages
in interface AddToBasketOptionsIf
public void setGetImages(boolean getImages)
setGetImages
in interface AddToBasketOptionsIf
getImages
- the getImages to setpublic boolean isGetStockReservationInfo()
isGetStockReservationInfo
in interface AddToBasketOptionsIf
public void setGetStockReservationInfo(boolean getStockReservationInfo)
setGetStockReservationInfo
in interface AddToBasketOptionsIf
getStockReservationInfo
- the getStockReservationInfo to setpublic boolean isRemoveExpiredReservations()
updateBasketWithStockInfoWithOptions()
method, when a
reservation is detected to be expired, the reservation information of the returned basket
item is removed and the reservation itself is deleted. This attribute is only used when
getStockReservationInfo
is set to true. The default value is true.isRemoveExpiredReservations
in interface AddToBasketOptionsIf
public void setRemoveExpiredReservations(boolean removeExpiredReservations)
updateBasketWithStockInfoWithOptions()
method, when a
reservation is detected to be expired, the reservation information of the returned basket
item is removed and the reservation itself is deleted. This attribute is only used when
getStockReservationInfo
is set to true. The default value is true.setRemoveExpiredReservations
in interface AddToBasketOptionsIf
removeExpiredReservations
- the removeExpiredReservations to setpublic boolean isCalculateOptionTax()
getBasketItemsPerCustomerWithOptions()
is called, the price (including and
excluding tax) of each basket item is returned. However, if the basket item has options, the
option price including tax is not returned by default because in most cases it's never used
and so it's not calculated. If calculateOptionTax()
is set to true then the
prices including tax for each option are calculated and returned.isCalculateOptionTax
in interface AddToBasketOptionsIf
public void setCalculateOptionTax(boolean calculateOptionTax)
getBasketItemsPerCustomerWithOptions()
is called, the price (including and
excluding tax) of each basket item is returned. However, if the basket item has options, the
option price including tax is not returned by default because in most cases it's never used
and so it's not calculated. If calculateOptionTax()
is set to true then the
prices including tax for each option are calculated and returned.setCalculateOptionTax
in interface AddToBasketOptionsIf
calculateOptionTax
- the calculateOptionTax to setCopyright © 2018 DS Data Systems UK Ltd.