Class ShoppingCartEvents


  • public class ShoppingCartEvents
    extends java.lang.Object
    Shopping cart events.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.math.MathContext generalRounding  
      static java.lang.String module  
      static java.lang.String resource  
      static java.lang.String resource_error  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String addAdditionalParty​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Associates a party to order
      static java.lang.String addCartItemToGroup​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String addCategoryDefaults​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Adds all products in a category according to default quantity on ProductCategoryMember for each; if no default for a certain product in the category, or if quantity is 0, do not add
      static java.lang.String addItemGroup​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String addOrderTerm​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Add an order term *
      static java.lang.String addProductPromoCode​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String addToCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Event to add an item to the shopping cart.
      static java.lang.String addToCartBulk​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Adds all products in a category according to quantity request parameter for each; if no parameter for a certain product in the category, or if quantity is 0, do not add
      static java.lang.String addToCartBulkRequirements​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Adds a set of requirements to the cart
      static java.lang.String addToCartFromOrder​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String bulkAddProducts​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String bulkAddProductsInApprovedOrder​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String clearCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Empty the shopping cart.
      static java.lang.String clearCartFromList​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String createCustRequestFromCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String createQuoteFromCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String deleteFromCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Delete an item from the shopping cart.
      static java.lang.String destroyCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Totally wipe out the cart, removes all stored info.
      static java.lang.String doManualPromotions​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static ShoppingCart getCartObject​(javax.servlet.http.HttpServletRequest request)
      Main get cart method, uses the locale and currency from the session
      static ShoppingCart getCartObject​(javax.servlet.http.HttpServletRequest request, java.util.Locale locale, java.lang.String currencyUom)
      Gets or creates the shopping cart object
      static java.lang.String getConfigDetailsEvent​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String initializeOrderEntry​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Initialize order entry
      static java.lang.String keepCartUpdated​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Update the cart's UserLogin object if it isn't already set.
      static java.lang.String loadCartFromOrder​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Initialize order entry from an existing order
      static java.lang.String loadCartFromQuote​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Initialize order entry from a quote
      static java.lang.String loadCartFromShoppingList​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Initialize order entry from a shopping list
      static java.lang.String modifyCart​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Update the items in the shopping cart.
      static java.lang.String quickCheckoutOrderWithDefaultOptions​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String quickInitPurchaseOrder​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String removeAdditionalParty​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Removes a previously associated party to order
      static java.lang.String removeOrderTerm​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Remove an order term *
      static java.lang.String removePromotion​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String routeOrderEntry​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Route order entry
      static java.lang.String selectAgreement​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Assign agreement
      static java.lang.String setCurrency​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Assign currency
      static java.lang.String setDesiredAlternateGwpProductId​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      For GWP Promotions with multiple alternatives, selects an alternative to the current GWP
      static java.lang.String setOrderCurrencyAgreementShipDates​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      static java.lang.String setOrderName​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      set the order name of the cart based on request.
      static java.lang.String setPoNumber​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      set the PO number of the cart based on request.
      static java.lang.String switchCurrentCartObject​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
      • generalRounding

        public static final java.math.MathContext generalRounding
    • Constructor Detail

      • ShoppingCartEvents

        public ShoppingCartEvents()
    • Method Detail

      • addProductPromoCode

        public static java.lang.String addProductPromoCode​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
      • removePromotion

        public static java.lang.String removePromotion​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
      • addItemGroup

        public static java.lang.String addItemGroup​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
      • addCartItemToGroup

        public static java.lang.String addCartItemToGroup​(javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
      • addToCart

        public static java.lang.String addToCart​(javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
        Event to add an item to the shopping cart.
      • addToCartFromOrder

        public static java.lang.String addToCartFromOrder​(javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
      • addToCartBulk

        public static java.lang.String addToCartBulk​(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
        Adds all products in a category according to quantity request parameter for each; if no parameter for a certain product in the category, or if quantity is 0, do not add
      • quickInitPurchaseOrder

        public static java.lang.String quickInitPurchaseOrder​(javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)
      • quickCheckoutOrderWithDefaultOptions

        public static java.lang.String quickCheckoutOrderWithDefaultOptions​(javax.servlet.http.HttpServletRequest request,
                                                                            javax.servlet.http.HttpServletResponse response)
      • addToCartBulkRequirements

        public static java.lang.String addToCartBulkRequirements​(javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
        Adds a set of requirements to the cart
      • addCategoryDefaults

        public static java.lang.String addCategoryDefaults​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
        Adds all products in a category according to default quantity on ProductCategoryMember for each; if no default for a certain product in the category, or if quantity is 0, do not add
      • deleteFromCart

        public static java.lang.String deleteFromCart​(javax.servlet.http.HttpServletRequest request,
                                                      javax.servlet.http.HttpServletResponse response)
        Delete an item from the shopping cart.
      • modifyCart

        public static java.lang.String modifyCart​(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response)
        Update the items in the shopping cart.
      • clearCart

        public static java.lang.String clearCart​(javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
        Empty the shopping cart.
      • destroyCart

        public static java.lang.String destroyCart​(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
        Totally wipe out the cart, removes all stored info.
      • getCartObject

        public static ShoppingCart getCartObject​(javax.servlet.http.HttpServletRequest request,
                                                 java.util.Locale locale,
                                                 java.lang.String currencyUom)
        Gets or creates the shopping cart object
      • getCartObject

        public static ShoppingCart getCartObject​(javax.servlet.http.HttpServletRequest request)
        Main get cart method, uses the locale and currency from the session
      • switchCurrentCartObject

        public static java.lang.String switchCurrentCartObject​(javax.servlet.http.HttpServletRequest request,
                                                               javax.servlet.http.HttpServletResponse response)
      • clearCartFromList

        public static java.lang.String clearCartFromList​(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
      • keepCartUpdated

        public static java.lang.String keepCartUpdated​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
        Update the cart's UserLogin object if it isn't already set.
      • setDesiredAlternateGwpProductId

        public static java.lang.String setDesiredAlternateGwpProductId​(javax.servlet.http.HttpServletRequest request,
                                                                       javax.servlet.http.HttpServletResponse response)
        For GWP Promotions with multiple alternatives, selects an alternative to the current GWP
      • addAdditionalParty

        public static java.lang.String addAdditionalParty​(javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
        Associates a party to order
      • removeAdditionalParty

        public static java.lang.String removeAdditionalParty​(javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
        Removes a previously associated party to order
      • selectAgreement

        public static java.lang.String selectAgreement​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
        Assign agreement
      • setCurrency

        public static java.lang.String setCurrency​(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
        Assign currency
      • setOrderName

        public static java.lang.String setOrderName​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
        set the order name of the cart based on request. right now will always return "success"
      • setPoNumber

        public static java.lang.String setPoNumber​(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
        set the PO number of the cart based on request. right now will always return "success"
      • addOrderTerm

        public static java.lang.String addOrderTerm​(javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
        Add an order term *
      • removeOrderTerm

        public static java.lang.String removeOrderTerm​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
        Remove an order term *
      • loadCartFromShoppingList

        public static java.lang.String loadCartFromShoppingList​(javax.servlet.http.HttpServletRequest request,
                                                                javax.servlet.http.HttpServletResponse response)
        Initialize order entry from a shopping list
      • loadCartFromQuote

        public static java.lang.String loadCartFromQuote​(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
        Initialize order entry from a quote
      • loadCartFromOrder

        public static java.lang.String loadCartFromOrder​(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response)
        Initialize order entry from an existing order
      • createQuoteFromCart

        public static java.lang.String createQuoteFromCart​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
      • createCustRequestFromCart

        public static java.lang.String createCustRequestFromCart​(javax.servlet.http.HttpServletRequest request,
                                                                 javax.servlet.http.HttpServletResponse response)
      • initializeOrderEntry

        public static java.lang.String initializeOrderEntry​(javax.servlet.http.HttpServletRequest request,
                                                            javax.servlet.http.HttpServletResponse response)
        Initialize order entry
      • routeOrderEntry

        public static java.lang.String routeOrderEntry​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
        Route order entry
      • doManualPromotions

        public static java.lang.String doManualPromotions​(javax.servlet.http.HttpServletRequest request,
                                                          javax.servlet.http.HttpServletResponse response)
      • bulkAddProducts

        public static java.lang.String bulkAddProducts​(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response)
      • setOrderCurrencyAgreementShipDates

        public static java.lang.String setOrderCurrencyAgreementShipDates​(javax.servlet.http.HttpServletRequest request,
                                                                          javax.servlet.http.HttpServletResponse response)
      • getConfigDetailsEvent

        public static java.lang.String getConfigDetailsEvent​(javax.servlet.http.HttpServletRequest request,
                                                             javax.servlet.http.HttpServletResponse response)
      • bulkAddProductsInApprovedOrder

        public static java.lang.String bulkAddProductsInApprovedOrder​(javax.servlet.http.HttpServletRequest request,
                                                                      javax.servlet.http.HttpServletResponse response)