com.konakart.bl.modules.ordertotal.freeproduct
Class FreeProduct
java.lang.Object
com.konakart.bl.modules.BaseModule
com.konakart.bl.modules.ordertotal.BaseOrderTotalModule
com.konakart.bl.modules.ordertotal.freeproduct.FreeProduct
- All Implemented Interfaces:
- OrderTotalInterface
public class FreeProduct
- extends BaseOrderTotalModule
- implements OrderTotalInterface
Module that creates an OrderTotal object for awarding a free product. The product to be awarded
can have a status set to false so that it isn't enabled and cannot be searched for and bought
normally through the store.
The SKU of the free product is saved in the Custom1 field of the Order Total. The id of the free
product is saved in the Custom2 field of the Order Total.
The promotion may be activated only if:
- The total amount of the order is greater than a minimum amount
- The total number of products ordered is greater than a minimum amount
- The total number of a single product ordered is greater than a minimum amount
| Methods inherited from class com.konakart.bl.modules.BaseModule |
getBasketMgr, getCatMgr, getConfigMgr, getCurrMgr, getCustMgr, getEmailMgr, getEng, getLangMgr, getMultiStoreMgr, getOrderMgr, getOrderTotalMgr, getPaymentMgr, getProdMgr, getPromMgr, getResourceBundle, getRewardPointMgr, getSecMgr, getShippingMgr, getSolrMgr, getStoreId, getTaxMgr, init, isAvailable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreeProduct
public FreeProduct(KKEngIf eng)
throws org.apache.torque.TorqueException,
KKException,
com.workingdogs.village.DataSetException
- Constructor
- Parameters:
eng -
- Throws:
com.workingdogs.village.DataSetException
KKException
org.apache.torque.TorqueException
setStaticVariables
public void setStaticVariables()
throws KKException
- Sets some static variables during setup
- Specified by:
setStaticVariables in interface OrderTotalInterface
- Throws:
KKException
isAvailable
public boolean isAvailable()
throws KKException
- Returns true or false
- Specified by:
isAvailable in interface OrderTotalInterface
- Returns:
- True or False
- Throws:
KKException
getOrderTotal
public OrderTotal getOrderTotal(Order order,
boolean dispPriceWithTax,
java.util.Locale locale)
throws java.lang.Exception
- Create and return an OrderTotal object for the free product.
- Specified by:
getOrderTotal in interface OrderTotalInterface
- Parameters:
order - dispPriceWithTax - locale -
- Returns:
- Returns an OrderTotal object for this module
- Throws:
java.lang.Exception
getSortOrder
public int getSortOrder()
- Specified by:
getSortOrder in interface OrderTotalInterface
- Returns:
- Return the order in which the module gets called and displayed
getCode
public java.lang.String getCode()
- Specified by:
getCode in interface OrderTotalInterface
- Returns:
- Returns the code for the module
Copyright © 2011 DS Data Systems UK Ltd.