svn commit: r1533565 - in /ofbiz/branches/release11.04: ./ applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1533565 - in /ofbiz/branches/release11.04: ./ applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java

jleroux@apache.org
Author: jleroux
Date: Fri Oct 18 17:21:17 2013
New Revision: 1533565

URL: http://svn.apache.org/r1533565
Log:
"Applied fix from trunk for revision: 1509164"
------------------------------------------------------------------------
r1509164 | jleroux | 2013-08-01 12:47:02 +0200 (jeu. 01 août 2013) | 3 lignes

A patch from János Zsolt for "Load cart from order loses OrderItemAttributes" https://issues.apache.org/jira/browse/OFBIZ-5286

When an order is created from a cart, OrderItemAttribute entities are created as expected. But when this same order is used to load back to the cart, the OrderItemAttributes are not reset. I found the cause of this issue in the org.ofbiz.order.shoppingcart.ShoppingCartServices.loadCartFromOrder(DispatchContext, Map<String, Object>) method.
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release11.04/   (props changed)
    ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java

Propchange: ofbiz/branches/release11.04/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1509164

Modified: ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1533565&r1=1533564&r2=1533565&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Fri Oct 18 17:21:17 2013
@@ -509,7 +509,7 @@ public class ShoppingCartServices {
                 List<GenericValue> orderItemAttributesList = null;
                 try {
                     orderItemAttributesList = delegator.findByAnd("OrderItemAttribute", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId));
-                    if (UtilValidate.isNotEmpty(orderAttributesList)) {
+                    if (UtilValidate.isNotEmpty(orderItemAttributesList)) {
                         for (GenericValue orderItemAttr : orderItemAttributesList) {
                             String name = orderItemAttr.getString("attrName");
                             String value = orderItemAttr.getString("attrValue");