Class CartAddAction

java.lang.Object
org.apache.struts.action.Action
com.softslate.commerce.customer.core.BaseAction
com.softslate.commerce.customer.order.CartAddAction
Direct Known Subclasses:
CartEditAction, CartItemEditAction, ReorderCartPickupAction, SavedCartPickupAction, SavedCartRemoveAction

public class CartAddAction extends BaseAction
Struts action class for submissions to add items to the current user's cart. Used for requests to "/CartAdd.do".

The execute method of this class invokes CartProcessor.processAddItems(Map) to process the add cart request and insert the items into the database. It then performs processing of the results returned from that method, including sending low stock email messages.

Author:
David Tobey
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static org.apache.commons.logging.Log
     

    Fields inherited from class org.apache.struts.action.Action

    servlet
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addInventoryMessages(Map results, BaseForm baseForm)
     
    org.apache.struts.action.ActionForward
    execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
     
    processResults(Map results, BaseForm baseForm)
     
    void
    processSavedCartCookie(BaseForm baseForm, Map parameters, javax.servlet.http.HttpServletResponse response)
     

    Methods inherited from class org.apache.struts.action.Action

    addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet

    Methods inherited from class java.lang.Object

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

    • log

      static org.apache.commons.logging.Log log
  • Constructor Details

    • CartAddAction

      public CartAddAction()
  • Method Details

    • execute

      public org.apache.struts.action.ActionForward execute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Overrides:
      execute in class org.apache.struts.action.Action
      Throws:
      Exception
    • processSavedCartCookie

      public void processSavedCartCookie(BaseForm baseForm, Map parameters, javax.servlet.http.HttpServletResponse response)
    • processResults

      public String processResults(Map results, BaseForm baseForm)
    • addInventoryMessages

      public void addInventoryMessages(Map results, BaseForm baseForm)
    • loadEstimatedShippingOptions

      public Collection loadEstimatedShippingOptions(BaseForm baseForm)