Class ShoppingListEvents
java.lang.Object
org.apache.ofbiz.order.shoppinglist.ShoppingListEvents
Shopping cart events.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
addBulkFromCart
(HttpServletRequest request, HttpServletResponse response) static String
addBulkFromCart
(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue userLogin, String shoppingListId, String shoppingListTypeId, String[] items, boolean allowPromo, boolean append) static String
addListToCart
(HttpServletRequest request, HttpServletResponse response) static String
addListToCart
(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, String prodCatalogId, String shoppingListId, boolean includeChild, boolean setAsListItem, boolean append) static String
clearGuestShoppingListCookies
(HttpServletRequest request, HttpServletResponse response) Clear the guest cookies for a shopping liststatic int
clearListInfo
(Delegator delegator, String shoppingListId) Remove all items from the given list.static String
createGuestShoppingListCookies
(HttpServletRequest request, HttpServletResponse response) Create the guest cookies for a shopping liststatic void
fillAutoSaveList
(ShoppingCart cart, LocalDispatcher dispatcher) Fills the specialized shopping list with the current shopping cart if one exists (if not leaves it alone)static String
getAutoSaveListId
(Delegator delegator, LocalDispatcher dispatcher, String partyId, GenericValue userLogin, String productStoreId) Finds or creates a specialized (auto-save) shopping list used to record shopping bag contents between user visits.getItemAttributeInfos
(List<GenericValue> items) Returns Map keyed on item sequence ID containing a map of item attributesReturns a list of survey response IDs for a shopping list itemgetItemSurveyInfos
(List<GenericValue> items) Returns Map keyed on item sequence ID containing a list of survey response IDsstatic int
makeListItemSurveyResp
(Delegator delegator, GenericValue item, List<String> surveyResps) Creates records for survey responses on survey itemsstatic String
replaceShoppingListItem
(HttpServletRequest request, HttpServletResponse response) static String
restoreAutoSaveList
(HttpServletRequest request, HttpServletResponse response) Restores the specialized (auto-save) shopping list back into the shopping cartstatic String
saveCartToAutoSaveList
(HttpServletRequest request, HttpServletResponse response) Saves the shopping cart to the specialized (auto-save) shopping list
-
Constructor Details
-
ShoppingListEvents
public ShoppingListEvents()
-
-
Method Details
-
addBulkFromCart
-
addBulkFromCart
public static String addBulkFromCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, GenericValue userLogin, String shoppingListId, String shoppingListTypeId, String[] items, boolean allowPromo, boolean append) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
addListToCart
-
addListToCart
public static String addListToCart(Delegator delegator, LocalDispatcher dispatcher, ShoppingCart cart, String prodCatalogId, String shoppingListId, boolean includeChild, boolean setAsListItem, boolean append) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
replaceShoppingListItem
public static String replaceShoppingListItem(HttpServletRequest request, HttpServletResponse response) -
getAutoSaveListId
public static String getAutoSaveListId(Delegator delegator, LocalDispatcher dispatcher, String partyId, GenericValue userLogin, String productStoreId) throws GenericEntityException, GenericServiceException Finds or creates a specialized (auto-save) shopping list used to record shopping bag contents between user visits. -
fillAutoSaveList
public static void fillAutoSaveList(ShoppingCart cart, LocalDispatcher dispatcher) throws GeneralException Fills the specialized shopping list with the current shopping cart if one exists (if not leaves it alone)- Throws:
GeneralException
-
saveCartToAutoSaveList
public static String saveCartToAutoSaveList(HttpServletRequest request, HttpServletResponse response) Saves the shopping cart to the specialized (auto-save) shopping list -
restoreAutoSaveList
Restores the specialized (auto-save) shopping list back into the shopping cart -
clearListInfo
public static int clearListInfo(Delegator delegator, String shoppingListId) throws GenericEntityException Remove all items from the given list.- Throws:
GenericEntityException
-
makeListItemSurveyResp
public static int makeListItemSurveyResp(Delegator delegator, GenericValue item, List<String> surveyResps) throws GenericEntityException Creates records for survey responses on survey items- Throws:
GenericEntityException
-
getItemAttributeInfos
Returns Map keyed on item sequence ID containing a map of item attributes -
getItemSurveyInfos
Returns Map keyed on item sequence ID containing a list of survey response IDs -
getItemSurveyInfo
Returns a list of survey response IDs for a shopping list item -
createGuestShoppingListCookies
public static String createGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response) Create the guest cookies for a shopping list -
clearGuestShoppingListCookies
public static String clearGuestShoppingListCookies(HttpServletRequest request, HttpServletResponse response) Clear the guest cookies for a shopping list
-