Author: deepak
Date: Sat Jan 16 10:58:26 2016
New Revision: 1724954
URL:
http://svn.apache.org/viewvc?rev=1724954&view=revLog:
(OFBIZ-6805) Applied patch from jira issue OFBIZ-6805
============================================================
Session already invalidate (removeAttribute: Session already invalidated) on destroyCart for anonymous userLogin
============================================================
Thanks Ankush for your contribution.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?rev=1724954&r1=1724953&r2=1724954&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Sat Jan 16 10:58:26 2016
@@ -937,12 +937,13 @@ public class ShoppingCartEvents {
/** Totally wipe out the cart, removes all stored info. */
public static String destroyCart(HttpServletRequest request, HttpServletResponse response) {
HttpSession session = request.getSession();
- clearCart(request, response);
session.removeAttribute("shoppingCart");
session.removeAttribute("orderPartyId");
session.removeAttribute("orderMode");
session.removeAttribute("productStoreId");
session.removeAttribute("CURRENT_CATALOG_ID");
+ // Call clearCart at the end as if user is anonymous then it will throw session already invalidated error on removeAttribute method.
+ clearCart(request, response);
return "success";
}