|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.konakart.al.BaseMgr
com.konakart.al.OrderMgr
public class OrderMgr
Contains methods to manage all stages of order creation.
| Field Summary |
|---|
| Fields inherited from class com.konakart.al.BaseMgr |
|---|
eng, kkAppEng, log |
| Constructor Summary | |
|---|---|
protected |
OrderMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
Constructor |
| Method Summary | |
|---|---|
void |
addPaymentDetailsToOrder(java.lang.String paymentCode)
The payment details object referenced by paymentCode is added to the order. |
void |
addShippingQuoteToOrder(java.lang.String shippingCode)
The shipping Quote referenced by shippingCode is added to the order. |
com.konakart.appif.OrderIf |
createCheckoutOrder()
Creates a partially populated order object and sets checkoutOrder to this
object. |
com.konakart.appif.OrderIf |
createCheckoutOrderWithOptions(com.konakart.appif.CreateOrderOptionsIf options)
Creates a partially populated order object and sets checkoutOrder to this
object. |
void |
createPaymentGatewayList()
Gets an array of payment details from the engine. |
void |
createShippingQuotes()
Gets an array of shipping quotes from the engine. |
void |
fetchAllOrders()
It gets an array of orders sorted by date. |
com.konakart.appif.OrderIf |
getCheckoutOrder()
Returns the current checkout order. |
int |
getCurrentOffset()
Gets the currentOffset in the currentOrders array. |
com.konakart.appif.OrderIf[] |
getCurrentOrders()
Gets an array of current orders. |
java.lang.String |
getHostAndPort()
In the form servername:serverport |
int |
getMaxRows()
Maximum number of orders to show in a list. |
java.lang.String |
getNavBack()
navBack is a constant. |
java.lang.String |
getNavNext()
navNext is a constant. |
java.lang.String |
getNavStart()
navStart is a constant. |
int |
getNumberOfOrders()
The number of orders in the currentOrders array. |
void |
getOrder(int orderId)
It attempts to get an order from the currentOrders array. |
com.konakart.appif.PaymentDetailsIf[] |
getPaymentDetailsArray()
Returns an array of payment details for the current order. |
int |
getPaymentType()
Returns an int that describes the payment type of the checkoutOrder. |
com.konakart.appif.OrderIf |
getSelectedOrder()
Returns the selected order. |
com.konakart.appif.ShippingQuoteIf[] |
getShippingQuotes()
Gets an array of shipping quotes for the current order. |
int |
getShowBack()
Show the back button if set to 1. |
int |
getShowNext()
Show the next button if set to 1. |
int |
getTotalNumberOfOrders()
Used to determine the total number of orders. |
boolean |
isUseCheckoutOrder()
Boolean passed to GWT one page checkout code to tell it to either create a new order from the basket items or to use the current checkoutOrder as would be the case for repeat order. |
void |
navigateCurrentOrders(java.lang.String navDir)
This method is called to navigate through a list of orders when the list is longer than maxRows. |
void |
populateCheckoutOrderWithOrderTotals()
Calls the engine to get an array of OrderTotal objects which are added to the checkoutOrder. |
void |
populateCustomerOrders()
Populates the currentCustomer object with the latest orders made. |
void |
refreshConfigs()
Refresh the configuration variables. |
void |
repeatOrder(int orderId,
boolean addToCurrentBasket,
boolean copyCustomFields)
A new Order is created with the same products as a previous order which is passed in as a parameter. |
void |
reset()
Puts the OrderContainer object back into it's original state with no products selected |
int |
saveOrder(boolean sendEmail)
Calls the engine to save the order. |
int |
saveOrder(java.lang.String hostAndPort)
Deprecated. Since version 2.2.0.6. hostAndPort is no longer used and the sending of email cannot be controlled from this method. Use saveOrder(boolean sendEmail) instead. |
void |
setCheckoutOrder(com.konakart.appif.OrderIf checkoutOrder)
Sets the checkout order with the order passed in as a parameter. |
void |
setCheckoutOrderBillingAddress(int addrId)
The address object should already exist in the list of addresses for the current customer. |
void |
setCheckoutOrderShippingAddress(int addrId)
The address object should already exist in the list of addresses for the current customer. |
void |
setHostAndPort(java.lang.String hostAndPort)
In the form servername:serverport |
void |
setUseCheckoutOrder(boolean useCheckoutOrder)
Boolean passed to GWT one page checkout code to tell it to either create a new order from the basket items or to use the current checkoutOrder as would be the case for repeat order. |
void |
updateInventory(int orderId)
Update the product inventory based on the products sold in the order identified by orderId. |
| Methods inherited from class com.konakart.al.BaseMgr |
|---|
getEng, getKkAppEng, setEng, setKkAppEng |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected OrderMgr(com.konakart.appif.KKEngIf eng,
KKAppEng kkAppEng)
throws com.konakart.app.KKException
eng - kkAppEng -
com.konakart.app.KKException| Method Detail |
|---|
public void refreshConfigs()
public void reset()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void navigateCurrentOrders(java.lang.String navDir)
throws com.konakart.app.KKException,
KKAppException
navDir can take the following values which are retrieved using getter methods
on the OrderMgr instance:
navDir -
com.konakart.app.KKException
KKAppException
public void populateCheckoutOrderWithOrderTotals()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void populateCustomerOrders()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void fetchAllOrders()
throws com.konakart.app.KKException
com.konakart.app.KKException
@Deprecated
public int saveOrder(java.lang.String hostAndPort)
throws com.konakart.app.KKException,
KKAppException
hostAndPort - (i.e. my_server:8970)
com.konakart.app.KKException
KKAppException
public int saveOrder(boolean sendEmail)
throws com.konakart.app.KKException,
KKAppException
sendEmail - Set to true to send an email to the customer
com.konakart.app.KKException
KKAppException
public void getOrder(int orderId)
throws com.konakart.app.KKException
selectedOrder
attribute is set to the order.
orderId - The id of the order to fetch.
com.konakart.app.KKExceptionpublic int getNumberOfOrders()
public com.konakart.appif.OrderIf createCheckoutOrder()
throws com.konakart.app.KKException
checkoutOrder to this
object.
com.konakart.app.KKException
public com.konakart.appif.OrderIf createCheckoutOrderWithOptions(com.konakart.appif.CreateOrderOptionsIf options)
throws com.konakart.app.KKException
checkoutOrder to this
object. It receives an options object as input in order to configure certain aspects of the
creation.
options - An object containing options for the method. It may be set to null.
com.konakart.app.KKException
public void createShippingQuotes()
throws com.konakart.app.KKException
com.konakart.app.KKException
public void createPaymentGatewayList()
throws com.konakart.app.KKException
com.konakart.app.KKException
public int getPaymentType()
throws com.konakart.app.KKException
com.konakart.app.KKExceptionpublic void addShippingQuoteToOrder(java.lang.String shippingCode)
shippingCode - e.g. free, item, table, zonespublic void addPaymentDetailsToOrder(java.lang.String paymentCode)
paymentCode - The code of the payment module. e.g. cod, paypal, worldpay
public void setCheckoutOrderShippingAddress(int addrId)
throws com.konakart.app.KKException
addrId - The id of the address object
com.konakart.app.KKExceptionpublic void setCheckoutOrderBillingAddress(int addrId)
addrId - The id of the address object
public void repeatOrder(int orderId,
boolean addToCurrentBasket,
boolean copyCustomFields)
throws KKNotInStockException,
com.konakart.app.KKException,
KKAppException
CheckoutOrder is set to the new order. The same
payment and shipping providers are selected although the default billing and shipping
addresses are used since the original ones may no longer be valid.
orderId - The id of the order to be repeatedaddToCurrentBasket - If set to true, the order items are added to the items in the current basket.
Otherwise the current basket is cleared.copyCustomFields - If set, the custom fields of the orderProducts are copied to the custom fields of
the basket items so that when the new order is created, the orderProducts of the
new order have the same custom field data as the original order.
KKNotInStockException - Thrown if the stock of any product is not sufficient for the order and KonaKart
is configured to not allow checkout for products that are not in stock.
com.konakart.app.KKException
KKAppException
public void updateInventory(int orderId)
throws com.konakart.app.KKException,
KKAppException
orderId - The id of the order
com.konakart.app.KKException
KKAppExceptionpublic int getCurrentOffset()
public int getMaxRows()
public int getShowBack()
public int getShowNext()
public java.lang.String getNavBack()
navdir attribute when navigating backwards.
public java.lang.String getNavNext()
navdir attribute when navigating forwards.
public java.lang.String getNavStart()
navdir attribute when navigating to the start.
public com.konakart.appif.OrderIf getSelectedOrder()
public int getTotalNumberOfOrders()
public com.konakart.appif.OrderIf[] getCurrentOrders()
public com.konakart.appif.OrderIf getCheckoutOrder()
public void setCheckoutOrder(com.konakart.appif.OrderIf checkoutOrder)
checkoutOrder - The checkoutOrder to set.public com.konakart.appif.ShippingQuoteIf[] getShippingQuotes()
public com.konakart.appif.PaymentDetailsIf[] getPaymentDetailsArray()
public java.lang.String getHostAndPort()
public void setHostAndPort(java.lang.String hostAndPort)
hostAndPort - The hostAndPort to set.public boolean isUseCheckoutOrder()
public void setUseCheckoutOrder(boolean useCheckoutOrder)
useCheckoutOrder - The useCheckoutOrder to set.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||