svn commit: r634211 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist: ShoppingListEvents.java ShoppingListServices.java

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

svn commit: r634211 - in /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist: ShoppingListEvents.java ShoppingListServices.java

bibryam
Author: bibryam
Date: Thu Mar  6 02:31:19 2008
New Revision: 634211

URL: http://svn.apache.org/viewvc?rev=634211&view=rev
Log:
Temporarily commented some code snippets which broke creating shopping lists. If we decide not to extend shoppinglistitem entity with accommodationMapId and accommodationSpotId fields, these lines could be removed easily.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java?rev=634211&r1=634210&r2=634211&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListEvents.java Thu Mar  6 02:31:19 2008
@@ -147,8 +147,8 @@
                         ctx.put("reservStart", item.getReservStart());
                         ctx.put("reservLength", new Double(item.getReservLength()));
                         ctx.put("reservPersons", new Double(item.getReservPersons()));
-                        ctx.put("accommodationMapId", new Double(item.getAccommodationMapId()));
-                        ctx.put("accommodationSpotId", new Double(item.getAccommodationSpotId()));
+                  //    ctx.put("accommodationMapId", new Double(item.getAccommodationMapId()));
+                  //    ctx.put("accommodationSpotId", new Double(item.getAccommodationSpotId()));
                         if (item.getConfigWrapper() != null) {
                             ctx.put("configId", item.getConfigWrapper().getConfigId());                            
                         }
@@ -260,8 +260,8 @@
             Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
             Double reservLength = shoppingListItem.getDouble("reservLength");
             Double reservPersons = shoppingListItem.getDouble("reservPersons");
-            String accommodationMapId = shoppingListItem.getString("accommodationMapId");
-            String accommodationSpotId = shoppingListItem.getString("accommodationSpotId");            
+      //    String accommodationMapId = shoppingListItem.getString("accommodationMapId");
+      //    String accommodationSpotId = shoppingListItem.getString("accommodationSpotId");            
             String configId = shoppingListItem.getString("configId");
             try {
                 String listId = shoppingListItem.getString("shoppingListId");
@@ -289,7 +289,7 @@
                 if (reservStart == null) {
                        cart.addOrIncreaseItem(productId, null, quantity.doubleValue(), null, null, null, null, null, null, attributes, prodCatalogId, configWrapper, null, null, null, dispatcher);
                 }else{                
-                    cart.addOrIncreaseItem(productId, null, quantity.doubleValue(), reservStart, reservLength, reservPersons,accommodationMapId,accommodationSpotId, null, null, null, attributes, prodCatalogId, configWrapper, null, null, null, dispatcher);
+                    cart.addOrIncreaseItem(productId, null, quantity.doubleValue(), reservStart, reservLength, reservPersons, null, null, null, null, null, attributes, prodCatalogId, configWrapper, null, null, null, dispatcher);
                 }
                 Map messageMap = UtilMisc.toMap("productId", productId);
                 errMsg = UtilProperties.getMessage(resource,"shoppinglistevents.added_product_to_cart", messageMap, cart.getLocale());

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java?rev=634211&r1=634210&r2=634211&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppinglist/ShoppingListServices.java Thu Mar  6 02:31:19 2008
@@ -475,8 +475,8 @@
                     Timestamp reservStart = shoppingListItem.getTimestamp("reservStart");
                     Double reservLength = null;
                     String configId = shoppingListItem.getString("configId");
-                    String accommodationMapId = shoppingListItem.getString("accommodationMapId");
-                    String accommodationSpotId = shoppingListItem.getString("accommodationSpotId");
+              //    String accommodationMapId = shoppingListItem.getString("accommodationMapId");
+              //    String accommodationSpotId = shoppingListItem.getString("accommodationSpotId");
 
                     if (shoppingListItem.get("reservLength") != null) {
                         reservLength = shoppingListItem.getDouble("reservLength");
@@ -485,12 +485,12 @@
                     if (shoppingListItem.get("reservPersons") != null) {
                         reservPersons = shoppingListItem.getDouble("reservPersons");
                     }
-                    if (shoppingListItem.get("accommodationMapId") != null) {
+               /*   if (shoppingListItem.get("accommodationMapId") != null) {
                        accommodationMapId = shoppingListItem.getString("accommodationMapId");
                     }
                     if (shoppingListItem.get("accommodationSpotId") != null) {
                        accommodationSpotId = shoppingListItem.getString("accommodationSpotId");
-                    }
+                    }   */
                     if (UtilValidate.isNotEmpty(productId) && quantity != null) {
 
                     if (UtilValidate.isNotEmpty(configId)) {
@@ -502,7 +502,7 @@
                         Map attributes = UtilMisc.toMap("shoppingListId", listId, "shoppingListItemSeqId", itemId);
 
                         try {
-                            listCart.addOrIncreaseItem(productId, null, quantity.doubleValue(), reservStart, reservLength, reservPersons,accommodationMapId,accommodationSpotId, null, null, null, attributes, null, configWrapper, null, null, null, dispatcher);
+                            listCart.addOrIncreaseItem(productId, null, quantity.doubleValue(), reservStart, reservLength, reservPersons, null, null, null, null, null, attributes, null, configWrapper, null, null, null, dispatcher);
                         } catch (CartItemModifyException e) {
                             Debug.logError(e, "Unable to add product to List Cart - " + productId, module);
                         } catch (ItemNotFoundException e) {