public interface BasketMgrIf
Modifier and Type | Method and Description |
---|---|
int |
addToBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
Determines the customerId to use and calls the private method with the customerId.
|
int |
addToBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
If options is set to null, this method is identical to addToBasket().
|
java.lang.String |
createEncodedProduct(int productId,
OptionIf[] opts)
Create the encoded product The customers_basket table contains a products_id field which is
encoded like this : 1{3}6{4}3 which means product of id==1 with product_options of id==3 and
product_options_values of id==6 followed by product_options of id==4 and
product_options_values of id==3.
|
Option |
findOptionInProduct(ProductIf p,
Option o)
The basket object must have a populated product object with options.
|
Basket[] |
getBasketItemsPerCustomer(java.lang.String sessionId,
int customerId,
int languageId)
Get the basket items for a customer.
|
Basket[] |
getBasketItemsPerCustomerWithOptions(java.lang.String sessionId,
int customerId,
int languageId,
AddToBasketOptionsIf options)
Get the basket items for a customer.
|
Option[] |
getOptsForBasketItem(Basket item,
int priceId,
int languageId,
AddToBasketOptionsIf a2bOptions)
The customers_basket table contains a products_id field which is encoded like this :
1{4}3{3}6 which means product of id==1 with product_options of id==4 and
product_options_values of id==3 followed by product_options of id==3 and
product_options_values of id==6.
|
void |
mergeBaskets(java.lang.String sessionId,
int customerFromId)
Add all items from the basket of customerFrom to the basket of customerTo which is retrieved
from the sessionId.
|
void |
mergeBasketsWithOptions(java.lang.String sessionId,
int customerFromId,
AddToBasketOptionsIf options)
Add all items from the basket of customerFrom to the basket of customerTo which is retrieved
from the sessionId.
|
void |
populateOptsForBasketItem(Basket item,
int priceId,
int languageId,
AddToBasketOptionsIf a2bOptions)
The customers_basket table contains a products_id field which is encoded like this :
1{4}3{3}6 which means product of id==1 with product_options of id==4 and
product_options_values of id==3 followed by product_options of id==3 and
product_options_values of id==6.
|
void |
removeBasketItemsPerCustomer(java.lang.String sessionId,
int customerId)
We determine which customerId to use and then delete all basket items that exist for this
customer by calling the private method.
|
void |
removeFromBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
We must remove the customers_basket record and any associated customers_basket_attributes
records.
|
void |
updateBasket(java.lang.String sessionId,
int customerId,
BasketIf item)
If the sessionId is null, we check the customerId to ensure that it is negative.
|
void |
updateBasketWithOptions(java.lang.String sessionId,
int customerId,
BasketIf item,
AddToBasketOptionsIf options)
If the sessionId is null, we check the customerId to ensure that it is negative.
|
Basket[] |
updateBasketWithStockInfo(BasketIf[] basketItems)
Receives an array of basket items and updates each one with the current stock level.
|
Basket[] |
updateBasketWithStockInfoWithOptions(BasketIf[] basketItems,
AddToBasketOptionsIf options)
Receives an array of basket items and updates each one with the current stock level.
|
Basket[] getBasketItemsPerCustomer(java.lang.String sessionId, int customerId, int languageId) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionBasket[] getBasketItemsPerCustomerWithOptions(java.lang.String sessionId, int customerId, int languageId, AddToBasketOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint addToBasketWithOptions(java.lang.String sessionId, int customerId, BasketIf item, AddToBasketOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIditem
- the itemoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint addToBasket(java.lang.String sessionId, int customerId, BasketIf item) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIditem
- the itemjava.lang.Exception
- an unexpected exceptionOption findOptionInProduct(ProductIf p, Option o) throws com.konakart.app.KKException
p
- the po
- the ocom.konakart.app.KKException
- an unexpected KKException exceptionvoid updateBasket(java.lang.String sessionId, int customerId, BasketIf item) throws com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIditem
- the itemjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionvoid updateBasketWithOptions(java.lang.String sessionId, int customerId, BasketIf item, AddToBasketOptionsIf options) throws com.konakart.app.KKException, com.workingdogs.village.DataSetException, java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIditem
- the itemoptions
- the optionsjava.lang.Exception
- an unexpected exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionvoid removeBasketItemsPerCustomer(java.lang.String sessionId, int customerId) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIdjava.lang.Exception
- an unexpected exceptionvoid removeFromBasket(java.lang.String sessionId, int customerId, BasketIf item) throws java.lang.Exception
sessionId
- the sessionIdcustomerId
- the customerIditem
- the itemjava.lang.Exception
- an unexpected exceptionjava.lang.String createEncodedProduct(int productId, OptionIf[] opts)
productId
- the productIdopts
- the optsvoid mergeBaskets(java.lang.String sessionId, int customerFromId) throws java.lang.Exception
sessionId
- the sessionIdcustomerFromId
- the customerFromIdjava.lang.Exception
- an unexpected exceptionvoid mergeBasketsWithOptions(java.lang.String sessionId, int customerFromId, AddToBasketOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdcustomerFromId
- the customerFromIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionBasket[] updateBasketWithStockInfo(BasketIf[] basketItems) throws java.lang.Exception
basketItems
- the basketItemsjava.lang.Exception
- an unexpected exceptionBasket[] updateBasketWithStockInfoWithOptions(BasketIf[] basketItems, AddToBasketOptionsIf options) throws java.lang.Exception
basketItems
- the basketItemsoptions
- An object containing options for the method. It may be set to null.java.lang.Exception
- an unexpected exceptionvoid populateOptsForBasketItem(Basket item, int priceId, int languageId, AddToBasketOptionsIf a2bOptions) throws java.lang.Exception
item
- the itempriceId
- the priceIdlanguageId
- the languageIda2bOptions
- the a2bOptionsjava.lang.Exception
- an unexpected exceptionOption[] getOptsForBasketItem(Basket item, int priceId, int languageId, AddToBasketOptionsIf a2bOptions) throws java.lang.Exception
item
- the itempriceId
- the priceIdlanguageId
- the languageIda2bOptions
- the a2bOptionsjava.lang.Exception
- an unexpected exceptionCopyright © 2018 DS Data Systems UK Ltd.