Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
KKWSRetryEng(EngineConfigIf engConf)
Constructor with an EngineConfig object.
|
Modifier and Type | Method and Description |
---|---|
OrderIf |
createOrder(java.lang.String sessionId,
BasketIf[] basketItemArray,
int languageId)
An order object is returned with all addresses populated with the default address of the
customer referenced by
sessionId . |
OrderIf |
createOrderWithOptions(java.lang.String sessionId,
BasketIf[] basketItemArray,
CreateOrderOptionsIf options,
int languageId)
If
options is set to null, this method is identical to
createOrder() . |
OrderIf |
getOrderTotals(OrderIf order,
int languageId)
The order object is populated with an array of order totals.
|
PaymentDetailsIf[] |
getPaymentGateways(OrderIf order,
int languageId)
Each payment module is called and asked to return a PaymentDetails object.
|
ShippingQuoteIf |
getShippingQuote(OrderIf order,
java.lang.String moduleName,
int languageId)
The shipping module called
moduleName is called to get a shipping quote for the
order passed in as a parameter. |
ShippingQuoteIf[] |
getShippingQuotes(OrderIf order,
int languageId)
All active installed shipping modules are called in order to get an array of shipping quotes.
|
int |
saveOrder(java.lang.String sessionId,
OrderIf order,
int languageId)
A new order is created in the DB.
|
addAddressToCustomer, addCreditCardToCustomer, addCustomDataToSession, addCustomerNotifications, addPoints, addProductNotificationToCustomer, addTax, addToBasket, addToBasketWithOptions, addToCustomerTag, addToCustomerTagForGuest, addToWishList, addToWishListWithOptions, changeDeliveryAddress, changeOrderStatus, changePassword, checkCoupon, checkFileAccess, checkSession, createAndSaveOrder, createProductQuantityEncodedKeyFromEncodedProductId, createWishList, createWishListWithOptions, custom, customSecure, deleteAddressFromCustomer, deleteCookie, deleteCreditCard, deleteCustomerNotifications, deleteCustomerTag, deleteCustomerTagForGuest, deleteOrderIdForSecretKey, deletePoints, deleteProductNotificationFromCustomer, deleteReservedPoints, deleteWishList, deleteWishListWithOptions, doesCustomerExistForEmail, editConfiguration, editCreditCard, editCustomer, editCustomerAddress, editCustomerWithOptions, editDigitalDownload, editWishList, editWishListWithOptions, enableCustomer, evaluateExpression, evaluateExpressionForGuest, externalLogin, forceRegisterCustomer, freeReservedPoints, getAddressesPerCustomer, getAddressesPerManufacturer, getAddressesPerProduct, getAddressesPerStore, getAddressesPerVendor, getAddressFormatTemplate, getAllCookies, getAllCountries, getAllCurrencies, getAllCustomerGroups, getAllLanguages, getAllManufacturers, getAllOrderStatuses, getAllProductRelationships, getAllProducts, getAllProductsWithOptions, getAllPromotions, getAllReviews, getAllSpecials, getAlsoPurchased, getAlsoPurchasedWithOptions, getBasketItemsPerCustomer, getBasketItemsPerCustomerWithOptions, getBestSellers, getBestSellersWithOptions, getBookableProductConflict, getBookingsPerCustomer, getBookingsPerProduct, getBundlesThatProductBelongsTo, getBundlesThatProductsBelongTo, getCatalogPerKey, getCategoriesPerManufacturer, getCategoriesPerProduct, getCategory, getCategoryTree, getCategoryTreeWithOptions, getConfigData, getConfiguration, getConfigurationNoCache, getConfigurations, getConfigurationValue, getConfigurationValueAsBigDecimal, getConfigurationValueAsBigDecimalWithDefault, getConfigurationValueAsBool, getConfigurationValueAsInt, getConfigurationValueAsIntWithDefault, getContent, getContents, getContentType, getContentTypes, getCookie, getCountry, getCountryPerName, getCouponPerId, getCouponsPerCode, getCreditCardsPerCustomer, getCurrency, getCustomDataFromSession, getCustomer, getCustomerGroup, getCustomerTag, getCustomerTagForGuest, getCustomerTags, getCustomerTagsForGuest, getCustomerTagValue, getCustomerTagValueForGuest, getCustomerWithOptions, getDefaultAddressPerCustomer, getDefaultCurrency, getDefaultCustomer, getDefaultLanguage, getDigitalDownloadById, getDigitalDownloads, getDigitalDownloadsWithOptions, getEngConf, getExpression, getExpressionForGuest, getGeoZonesPerZone, getIpnHistory, getKKEvents, getKonakartTimeStamp, getKonaKartVersion, getLanguagePerCode, getLanguagePerId, getLanguages, getManufacturer, getManufacturerPerProduct, getManufacturers, getManufacturersPerCategory, getMessages, getMiscItemsPerType, getMsgValue, getOrder, getOrderHistory, getOrderHistoryWithOptions, getOrderIdFromSecretKey, getOrdersPerCustomer, getOrdersPerCustomerWithOptions, getOrderStatus, getOrderWithOptions, getPaymentDetails, getPaymentDetailsCustom, getPaymentDetailsPerOrder, getPaymentGateway, getPaymentSchedule, getPdf, getProduct, getProductImages, getProductNotificationsPerCustomer, getProductNotificationsPerCustomerWithOptions, getProductPerSku, getProductPerSkuWithOptions, getProductQuantity, getProductQuantityWithOptions, getProductsFromIdsWithOptions, getProductsPerCategory, getProductsPerCategoryPerManufacturer, getProductsPerCategoryPerManufacturerWithOptions, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductWithOptions, getPromotion, getPromotionsPerCoupon, getPromotionsPerProducts, getPunchOutMessage, getRelatedProducts, getRelatedProductsWithOptions, getReview, getReviews, getReviewsPerProduct, getReviewsPerVendor, getRewardPoints, getRewardPointsWithOptions, getSecretKeyForOrderId, getSku, getSpecialsPerCategory, getSSOToken, getStatusText, getStore, getStoreForId, getStoreIds, getSubscriptionsPerCustomer, getSuggestedSearchItems, getSuggestedSpellingItems, getSuggestions, getTag, getTagGroup, getTagGroupsPerCategory, getTagGroupsPerCategoryWithOptions, getTagsPerCategory, getTax, getTaxRate, getTempCustomerId, getVendorForId, getVendorReview, getVendorReviews, getVendors, getWishList, getWishListItems, getWishListItemsWithOptions, getWishListWithItems, getWishListWithItemsWithOptions, getWishListWithOptions, getZonesPerCountry, insertBooking, insertCustomerEvent, insertCustomerTag, insertCustomerTagForGuest, insertDigitalDownload, insertKKEvent, insertSubscription, isCustomerSubscribedToNewsletter, isEmailValid, login, loginByAdmin, loginWithOptions, logout, manageThrowable, mergeBaskets, mergeBasketsWithOptions, mergeWishListsWithOptions, notifySysAdmin, pointsAvailable, postMessageToQueue, processKKEvents, readMessageFromQueue, registerCustomer, removeBasketItemsPerCustomer, removeFromBasket, removeFromWishList, removeFromWishListWithOptions, removeStockReservationsForBasketItems, removeStockReservationsForIds, removeStockReservationsForOrderProducts, reservePoints, reserveStock, saveIpnHistory, saveOrderWithOptions, saveSSOToken, searchForOrdersPerCustomer, searchForProducts, searchForProductsWithOptions, searchForSubscriptionsPerCustomer, searchForWishLists, searchForZones, sendNewPassword, sendNewPassword1, sendOrderConfirmationEmail, sendOrderConfirmationEmail1, sendTemplateEmailToCustomer, sendTemplateEmailToCustomer1, sendWelcomeEmail, sendWelcomeEmail1, setCookie, setCreditCardDetailsOnOrder, setDefaultAddressPerCustomer, setEndpoint, setNewPassword, setRewardPointReservationId, updateBasket, updateBasketWithOptions, updateBasketWithStockInfo, updateBasketWithStockInfoWithOptions, updateCachedConfigurations, updateDigitalDownloadCount, updateDigitalDownloadCountById, updateInventory, updateInventoryWithOptions, updateManufacturerViewedCount, updateOrder, updateProductViewedCount, updateSubscription, validatePassword, writeReview
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addAddressToCustomer, addCreditCardToCustomer, addCustomDataToSession, addCustomerNotifications, addPoints, addProductNotificationToCustomer, addTax, addToBasket, addToBasketWithOptions, addToCustomerTag, addToCustomerTagForGuest, addToWishList, addToWishListWithOptions, changeDeliveryAddress, changeOrderStatus, changePassword, checkCoupon, checkFileAccess, checkSession, createAndSaveOrder, createProductQuantityEncodedKeyFromEncodedProductId, createWishList, createWishListWithOptions, custom, customSecure, deleteAddressFromCustomer, deleteCookie, deleteCreditCard, deleteCustomerNotifications, deleteCustomerTag, deleteCustomerTagForGuest, deleteOrderIdForSecretKey, deletePoints, deleteProductNotificationFromCustomer, deleteReservedPoints, deleteWishList, deleteWishListWithOptions, doesCustomerExistForEmail, editConfiguration, editCreditCard, editCustomer, editCustomerAddress, editCustomerWithOptions, editDigitalDownload, editWishList, editWishListWithOptions, enableCustomer, evaluateExpression, evaluateExpressionForGuest, externalLogin, forceRegisterCustomer, freeReservedPoints, getAddressesPerCustomer, getAddressesPerManufacturer, getAddressesPerProduct, getAddressesPerStore, getAddressesPerVendor, getAddressFormatTemplate, getAllCookies, getAllCountries, getAllCurrencies, getAllCustomerGroups, getAllLanguages, getAllManufacturers, getAllOrderStatuses, getAllProductRelationships, getAllProducts, getAllProductsWithOptions, getAllPromotions, getAllReviews, getAllSpecials, getAlsoPurchased, getAlsoPurchasedWithOptions, getBasketItemsPerCustomer, getBasketItemsPerCustomerWithOptions, getBestSellers, getBestSellersWithOptions, getBookableProductConflict, getBookingsPerCustomer, getBookingsPerProduct, getBundlesThatProductBelongsTo, getBundlesThatProductsBelongTo, getCatalogPerKey, getCategoriesPerManufacturer, getCategoriesPerProduct, getCategory, getCategoryTree, getCategoryTreeWithOptions, getConfigData, getConfiguration, getConfigurationNoCache, getConfigurations, getConfigurationValue, getConfigurationValueAsBigDecimal, getConfigurationValueAsBigDecimalWithDefault, getConfigurationValueAsBool, getConfigurationValueAsInt, getConfigurationValueAsIntWithDefault, getContent, getContents, getContentType, getContentTypes, getCookie, getCountry, getCountryPerName, getCouponPerId, getCouponsPerCode, getCreditCardsPerCustomer, getCurrency, getCustomDataFromSession, getCustomer, getCustomerGroup, getCustomerTag, getCustomerTagForGuest, getCustomerTags, getCustomerTagsForGuest, getCustomerTagValue, getCustomerTagValueForGuest, getCustomerWithOptions, getDefaultAddressPerCustomer, getDefaultCurrency, getDefaultCustomer, getDefaultLanguage, getDigitalDownloadById, getDigitalDownloads, getDigitalDownloadsWithOptions, getEngConf, getExpression, getExpressionForGuest, getGeoZonesPerZone, getIpnHistory, getKKEvents, getKonakartTimeStamp, getKonaKartVersion, getLanguagePerCode, getLanguagePerId, getLanguages, getManufacturer, getManufacturerPerProduct, getManufacturers, getManufacturersPerCategory, getMessages, getMiscItemsPerType, getMsgValue, getOrder, getOrderHistory, getOrderHistoryWithOptions, getOrderIdFromSecretKey, getOrdersPerCustomer, getOrdersPerCustomerWithOptions, getOrderStatus, getOrderWithOptions, getPaymentDetails, getPaymentDetailsCustom, getPaymentDetailsPerOrder, getPaymentGateway, getPaymentSchedule, getPdf, getProduct, getProductImages, getProductNotificationsPerCustomer, getProductNotificationsPerCustomerWithOptions, getProductPerSku, getProductPerSkuWithOptions, getProductQuantity, getProductQuantityWithOptions, getProductsFromIdsWithOptions, getProductsPerCategory, getProductsPerCategoryPerManufacturer, getProductsPerCategoryPerManufacturerWithOptions, getProductsPerCategoryWithOptions, getProductsPerManufacturer, getProductsPerManufacturerWithOptions, getProductWithOptions, getPromotion, getPromotionsPerCoupon, getPromotionsPerProducts, getPunchOutMessage, getRelatedProducts, getRelatedProductsWithOptions, getReview, getReviews, getReviewsPerProduct, getReviewsPerVendor, getRewardPoints, getRewardPointsWithOptions, getSecretKeyForOrderId, getSku, getSpecialsPerCategory, getSSOToken, getStatusText, getStore, getStoreForId, getStoreIds, getSubscriptionsPerCustomer, getSuggestedSearchItems, getSuggestedSpellingItems, getSuggestions, getTag, getTagGroup, getTagGroupsPerCategory, getTagGroupsPerCategoryWithOptions, getTagsPerCategory, getTax, getTaxRate, getTempCustomerId, getVendorForId, getVendorReview, getVendorReviews, getVendors, getWishList, getWishListItems, getWishListItemsWithOptions, getWishListWithItems, getWishListWithItemsWithOptions, getWishListWithOptions, getZonesPerCountry, insertBooking, insertCustomerEvent, insertCustomerTag, insertCustomerTagForGuest, insertDigitalDownload, insertKKEvent, insertSubscription, isCustomerSubscribedToNewsletter, isEmailValid, login, loginByAdmin, loginWithOptions, logout, mergeBaskets, mergeBasketsWithOptions, mergeWishListsWithOptions, notifySysAdmin, pointsAvailable, postMessageToQueue, processKKEvents, readMessageFromQueue, registerCustomer, removeBasketItemsPerCustomer, removeFromBasket, removeFromWishList, removeFromWishListWithOptions, removeStockReservationsForBasketItems, removeStockReservationsForIds, removeStockReservationsForOrderProducts, reservePoints, reserveStock, saveIpnHistory, saveOrderWithOptions, saveSSOToken, searchForOrdersPerCustomer, searchForProducts, searchForProductsWithOptions, searchForSubscriptionsPerCustomer, searchForWishLists, searchForZones, sendNewPassword, sendNewPassword1, sendOrderConfirmationEmail, sendOrderConfirmationEmail1, sendTemplateEmailToCustomer, sendTemplateEmailToCustomer1, sendWelcomeEmail, sendWelcomeEmail1, setCookie, setCreditCardDetailsOnOrder, setDefaultAddressPerCustomer, setEndpoint, setNewPassword, setRewardPointReservationId, updateBasket, updateBasketWithOptions, updateBasketWithStockInfo, updateBasketWithStockInfoWithOptions, updateCachedConfigurations, updateDigitalDownloadCount, updateDigitalDownloadCountById, updateInventory, updateInventoryWithOptions, updateManufacturerViewedCount, updateOrder, updateProductViewedCount, updateSubscription, validatePassword, writeReview
public KKWSRetryEng(EngineConfigIf engConf) throws com.konakart.app.KKException
engConf
- the engConfcom.konakart.app.KKException
- an unexpected KKException exceptionpublic OrderIf createOrder(java.lang.String sessionId, BasketIf[] basketItemArray, int languageId) throws com.konakart.app.KKException
KKWSEng
sessionId
. The products added to the order are retrieved
from the basketItemArray. Each OrderProduct object attached to the Order has a populated
Product object. The returned object has not been saved in the DB and so an Order Id has not
yet been assigned.
Null is returned if the products and/or product options referenced by the array of basket items are no longer available.
createOrder
in interface KKEngIf
createOrder
in class KKWSEng
sessionId
- The session id of the logged in userbasketItemArray
- The array of basket items to add to the orderlanguageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic OrderIf createOrderWithOptions(java.lang.String sessionId, BasketIf[] basketItemArray, CreateOrderOptionsIf options, int languageId) throws com.konakart.app.KKException
KKWSEng
options
is set to null, this method is identical to
createOrder()
. Otherwise the functionality differs depending on the combination
of options set.
An order object is returned with all addresses populated with the default address of the
customer referenced by sessionId
. The products added to the order are retrieved
from the basketItemArray. The returned object has not been saved in the DB and so an Order Id
has not yet been assigned.
Null is returned if the products and/or product options referenced by the array of basket items are no longer available.
One available option is to automatically copy all of the basket
custom fields to
the orderProduct
custom fields which are generated from the basket items.
Another option allows you to leave the sessionId null and to use a default customer. This default customer needs to be setup using the Admin App and is used to create a temporary order even before the customer logs in or registers, so that he can view the order totals in the window that shows him the cart details. These order totals give an indication of the shipping cost and also show any discounts available. The Administrator can create a default customer that matches his typical customer. For example if a store normally ships overseas, then the default customer can be set up with an overseas address so that the shipping costs are calculated at overseas rates.
A further option is to use the shipping address retrieved from a wish list if the wish list id of any one of the basket items is set to a valid wish list. This is useful in the case of gift registries to ship the gifts directly to the owner of the registry.
The options
object contains a number of attributes to control whether the
returned order includes an array of available payment modules and shipping quotes and if so
which one to use as the selected module or quote. The population of order total modules may
also be enabled. The Javadoc of CreateOrderOptionsIf
provides more details.
createOrderWithOptions
in interface KKEngIf
createOrderWithOptions
in class KKWSEng
sessionId
- The session id of the logged in userbasketItemArray
- The array of basket items to add to the orderoptions
- An object containing options for the method. It may be set to null.languageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic OrderIf getOrderTotals(OrderIf order, int languageId) throws com.konakart.app.KKException
KKWSEng
getOrderTotals
in interface KKEngIf
getOrderTotals
in class KKWSEng
order
- The order objectlanguageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic PaymentDetailsIf[] getPaymentGateways(OrderIf order, int languageId) throws com.konakart.app.KKException
KKWSEng
Based on the zone of the billing address, the module may decide that it cannot process payment for that zone and so not even return a PaymentDetails object.
getPaymentGateways
in interface KKEngIf
getPaymentGateways
in class KKWSEng
order
- The order objectlanguageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic ShippingQuoteIf getShippingQuote(OrderIf order, java.lang.String moduleName, int languageId) throws com.konakart.app.KKException
KKWSEng
moduleName
is called to get a shipping quote for the
order passed in as a parameter. Null is returned if the shipping module isn't available.getShippingQuote
in interface KKEngIf
getShippingQuote
in class KKWSEng
order
- The order objectmoduleName
- e.g. flat or item or table etc.languageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic ShippingQuoteIf[] getShippingQuotes(OrderIf order, int languageId) throws com.konakart.app.KKException
KKWSEng
getShippingQuotes
in interface KKEngIf
getShippingQuotes
in class KKWSEng
order
- The order objectlanguageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionpublic int saveOrder(java.lang.String sessionId, OrderIf order, int languageId) throws com.konakart.app.KKException
KKWSEng
To save an order we have to write into a few DB tables: orders, orders_products, orders_products_attributes, orders_total, orders_status_history. We do this in a single transaction.
saveOrder
in interface KKEngIf
saveOrder
in class KKWSEng
sessionId
- The session id of the logged in userorder
- The order objectlanguageId
- The id for the language that will be used. Value of -1 selects the default
language.com.konakart.app.KKException
- an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.