You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/11/10 00:50:07 UTC

svn commit: r1407696 - /ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Author: jleroux
Date: Fri Nov  9 23:50:07 2012
New Revision: 1407696

URL: http://svn.apache.org/viewvc?rev=1407696&view=rev
Log:
An patch from John McDonald for "Customer's Shipment Address Not Assigned to Dropship Purchase Orders" https://issues.apache.org/jira/browse/OFBIZ-3883

When buying drop ship products from the demo store the customer's shipping address is not saved with the purchase order, so the shipping address cannot be provided to the drop ship supplier. 

Steps to Reproduce:
* From the DropShip Category add "DropShip from BigSupplier" and "DropShip from DemoSupplier" to your cart. 
* Login as admin
* Use the one page checkout to order the products

Resulting Order: 
https://demo-trunk.ofbiz.apache.org:8443/ordermgr/control/orderview?orderId=WSCO10002
The purchase orders WS10003 and WS10004 are associated correctly with the order items, but as the shipping groups don't have addresses, the purchase orders don't have either.

Expectation:
All Shipment groups should have the shipping address assigned.

Actual:
Only the first shipment group has the shipping address assigned. 

Modified:
    ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java

Modified: ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1407696&r1=1407695&r2=1407696&view=diff
==============================================================================
--- ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original)
+++ ofbiz/branches/release11.04/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Fri Nov  9 23:50:07 2012
@@ -2249,7 +2249,26 @@ public class ShoppingCart implements Ite
         }
         csi.setContactMechId(shippingContactMechId);
     }
-
+    
+    /**
+     * Sets @param shippingContactMechId in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param shippingContactMechId
+     */
+    public void setAllShippingContactMechId(String shippingContactMechId) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setShippingContactMechId(x, shippingContactMechId);
+        }
+    }
+    
+    /**
+     * Use alternative methods setShippingContactMechId(int idx, String shippingContactMechId)
+     * or setAllShippingContactMechId(String shippingContactMechId)
+     * <p>
+     * @deprecated
+     * @param shippingContactMechId
+     */
     public void setShippingContactMechId(String shippingContactMechId) {
         this.setShippingContactMechId(0, shippingContactMechId);
     }
@@ -2269,7 +2288,26 @@ public class ShoppingCart implements Ite
         CartShipInfo csi = this.getShipInfo(idx);
         csi.shipmentMethodTypeId = shipmentMethodTypeId;
     }
-
+    
+    /**
+     * Sets @param shipmentMethodTypeId in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param shipmentMethodTypeId
+     */
+    public void setAllShipmentMethodTypeId(String shipmentMethodTypeId) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setShipmentMethodTypeId(x, shipmentMethodTypeId);
+        }
+    }
+    
+    /**
+     * Use alternative methods setShipmentMethodTypeId(int idx, String shipmentMethodTypeId)
+     * or setAllShipmentMethodTypeId(String shipmentMethodTypeId)
+     * <p>
+     * @deprecated
+     * @param shipmentMethodTypeId
+     */
     public void setShipmentMethodTypeId(String shipmentMethodTypeId) {
         this.setShipmentMethodTypeId(0, shipmentMethodTypeId);
     }
@@ -2317,7 +2355,26 @@ public class ShoppingCart implements Ite
         CartShipInfo csi = this.getShipInfo(idx);
         csi.shippingInstructions = shippingInstructions;
     }
+    
+    /**
+     * Sets @param shippingInstructions in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param shippingInstructions
+     */
+    public void setAllShippingInstructions(String shippingInstructions) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setShippingInstructions(x, shippingInstructions);
+        }
+    }
 
+    /**
+     * Use alternative methods setShippingInstructions(int idx, String shippingInstructions)
+     * or setAllShippingInstructions(String shippingInstructions)
+     * <p>
+     * @deprecated
+     * @param shippingInstructions
+     */
     public void setShippingInstructions(String shippingInstructions) {
         this.setShippingInstructions(0, shippingInstructions);
     }
@@ -2338,7 +2395,26 @@ public class ShoppingCart implements Ite
             csi.setMaySplit(maySplit);
         }
     }
-
+    
+    /**
+     * Sets @param maySplit in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param maySplit
+     */
+    public void setAllMaySplit(Boolean maySplit) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setMaySplit(x, maySplit);
+        }
+    }
+    
+    /**
+     * Use alternative methods setMaySplit(int idx, Boolean maySplit)
+     * or setAllMaySplit(Boolean maySplit)
+     * <p>
+     * @deprecated
+     * @param maySplit
+     */
     public void setMaySplit(Boolean maySplit) {
         this.setMaySplit(0, maySplit);
     }
@@ -2358,6 +2434,25 @@ public class ShoppingCart implements Ite
         csi.giftMessage = giftMessage;
     }
 
+    /**
+     * Sets @param giftMessage in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param giftMessage
+     */
+    public void setAllGiftMessage(String giftMessage) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setGiftMessage(x, giftMessage);
+        }
+    }
+    
+    /**
+     * Use alternative methods setGiftMessage(int idx, String giftMessage)
+     * or setAllGiftMessage(String giftMessage)
+     * <p>
+     * @deprecated
+     * @param giftMessage
+     */
     public void setGiftMessage(String giftMessage) {
         this.setGiftMessage(0, giftMessage);
     }
@@ -2378,6 +2473,25 @@ public class ShoppingCart implements Ite
         }
     }
 
+    /**
+     * Sets @param isGift in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param isGift
+     */
+    public void setAllIsGift(Boolean isGift) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setIsGift(x, isGift);
+        }
+    }
+    
+    /**
+     * Use alternative methods setIsGift(int idx, Boolean isGift)
+     * or setAllIsGift(Boolean isGift)
+     * <p>
+     * @deprecated
+     * @param isGift
+     */
     public void setIsGift(Boolean isGift) {
         this.setIsGift(0, isGift);
     }
@@ -2395,7 +2509,26 @@ public class ShoppingCart implements Ite
         CartShipInfo csi = this.getShipInfo(idx);
         csi.carrierPartyId = carrierPartyId;
     }
-
+    
+    /**
+     * Sets @param carrierPartyId in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param carrierPartyId
+     */
+    public void setAllCarrierPartyId(String carrierPartyId) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setCarrierPartyId(x, carrierPartyId);
+        }
+    }
+    
+    /**
+     * Use alternative methods setCarrierPartyId(int idx, String carrierPartyId)
+     * or setAllCarrierPartyId(String carrierPartyId)
+     * <p>
+     * @deprecated
+     * @param carrierPartyId
+     */
     public void setCarrierPartyId(String carrierPartyId) {
         this.setCarrierPartyId(0, carrierPartyId);
     }
@@ -2422,7 +2555,26 @@ public class ShoppingCart implements Ite
         CartShipInfo csi = this.getShipInfo(idx);
         csi.productStoreShipMethId = productStoreShipMethId;
     }
+    
+    /**
+     * Sets @param productStoreShipMethId in all ShipInfo(ShipGroups) associated
+     * with this ShoppingCart
+     * <p>
+     * @param productStoreShipMethId
+     */
+    public void setAllProductStoreShipMethId(String productStoreShipMethId) {
+        for(int x=0; x < shipInfo.size(); x++) {
+            this.setProductStoreShipMethId(x, productStoreShipMethId);
+        }
+    }
 
+    /**
+     * Use alternative methods setProductStoreShipMethId(int idx, String productStoreShipMethId)
+     * or setAllProductStoreShipMethId(String productStoreShipMethId)
+     * <p>
+     * @deprecated
+     * @param productStoreShipMethId
+     */
     public void setProductStoreShipMethId(String productStoreShipMethId) {
         this.setProductStoreShipMethId(0, productStoreShipMethId);
     }