Author: jleroux
Date: Mon Dec 17 09:28:39 2012
New Revision: 1422814

URL: http://svn.apache.org/viewvc?rev=1422814&view=rev
Log:
A patch from Carsten Schinzer for "CheckoutScripts not adapted after 
ShoppingCart.setShipmentMethodTypdeId" 
https://issues.apache.org/jira/browse/OFBIZ-5102

The CustomerEvent scripts do not yet account for the fact that the method takes 
two parameters after a code change on ShoppingCart:
- int shipGroupIndex and
- String shipmentMethodTypeId
instead of the latter String only in earlier versions.

Minilang Script calls to setShipmentMethodTypeId with a single String Parameter 
need to be changed.
They now must call setAllShipmentMethodTypeId. This method has been introduced 
with rev. 1407116.

jleroux: so this was not covered by unit tests, too bad but I don't think I 
will get enough time to write them :/

Modified:
    
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
    
ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/CartEvents.xml

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=1422814&r1=1422813&r2=1422814&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 (original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
 Mon Dec 17 09:28:39 2012
@@ -803,7 +803,7 @@ under the License.
                 <string value="SHIPPING_LOCATION"/>
                 <field field="addressContext.contactMechId"/>
             </call-object-method>
-            <call-object-method obj-field="cart" 
method-name="setShippingContactMechId">
+            <call-object-method obj-field="cart" 
method-name="setAllShippingContactMechId">
                 <field field="addressContext.contactMechId"/>
             </call-object-method>
         </if-not-empty>
@@ -820,25 +820,25 @@ under the License.
        <session-to-field field="cart" session-name="shoppingCart"/>
        <if-not-empty field="cart">
            <set field="shipmentMethodTypeId" 
from-field="parameters.shipmentMethodTypeId"/>
-           <call-object-method obj-field="cart" 
method-name="setShipmentMethodTypeId">
+           <call-object-method obj-field="cart" 
method-name="setAllShipmentMethodTypeId">
                <field field="shipmentMethodTypeId"/>
            </call-object-method>
 
            <set field="carrierPartyId" from-field="parameters.carrierPartyId"/>
-           <call-object-method obj-field="cart" 
method-name="setCarrierPartyId">
+           <call-object-method obj-field="cart" 
method-name="setAllCarrierPartyId">
                <field field="carrierPartyId"/>
            </call-object-method>
 
            <set field="maySplit" from-field="parameters.may_split" 
type="Boolean"/>
            <if-not-empty field="maySplit">
-               <call-object-method obj-field="cart" method-name="setMaySplit">
+               <call-object-method obj-field="cart" 
method-name="setAllMaySplit">
                    <field field="maySplit" type="Boolean"/>
                </call-object-method>
            </if-not-empty>
 
            <set field="shippingInstruction" 
from-field="parameters.shipping_instructions" type="String"/>
            <if-not-empty field="shippingInstruction">
-           <call-object-method obj-field="cart" 
method-name="setShippingInstructions">
+           <call-object-method obj-field="cart" 
method-name="setAllShippingInstructions">
                <field field="shippingInstruction" type="String"/>
            </call-object-method>
            </if-not-empty>
@@ -852,14 +852,14 @@ under the License.
 
            <set field="isGift" from-field="parameters.is_gift" type="Boolean"/>
            <if-not-empty field="isGift">
-               <call-object-method obj-field="cart" method-name="setIsGift">
+               <call-object-method obj-field="cart" method-name="setAllIsGift">
                    <field field="isGift" type="Boolean"/>
                </call-object-method>
            </if-not-empty>
 
            <set field="giftMessage" from-field="parameters.gift_message" 
type="String"/>
            <if-not-empty field="giftMessage">
-           <call-object-method obj-field="cart" method-name="setGiftMessage">
+           <call-object-method obj-field="cart" 
method-name="setAllGiftMessage">
                <field field="giftMessage" type="String"/>
            </call-object-method>
            </if-not-empty>
@@ -1055,13 +1055,13 @@ under the License.
         <if-empty field="shoppingCart">
             <session-to-field field="shoppingCart"/>
         </if-empty>
-        <call-object-method obj-field="shoppingCart" 
method-name="setShipmentMethodTypeId">
+        <call-object-method obj-field="shoppingCart" 
method-name="setAllShipmentMethodTypeId">
             <field field="shipmentMethodTypeId"/>
         </call-object-method>
-        <call-object-method obj-field="shoppingCart" 
method-name="setCarrierPartyId">
+        <call-object-method obj-field="shoppingCart" 
method-name="setAllCarrierPartyId">
             <field field="carrierPartyId"/>
         </call-object-method>
-        <call-object-method obj-field="shoppingCart" 
method-name="setProductStoreShipMethId">
+        <call-object-method obj-field="shoppingCart" 
method-name="setAllProductStoreShipMethId">
             <field field="productStoreShipMethId"/>
         </call-object-method>
         <call-object-method  obj-field="shoppingCart" 
method-name="getCurrency" ret-field="isoCode"/>

Modified: 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml?rev=1422814&r1=1422813&r2=1422814&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
 (original)
+++ 
ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/QuickAnonCustomerEvents.xml
 Mon Dec 17 09:28:39 2012
@@ -547,7 +547,7 @@ under the License.
                 <string value="SHIPPING_LOCATION"/>
                 <field field="parameters.shippingContactMechId"/>
             </call-object-method>
-            <call-object-method obj-field="cart" 
method-name="setShippingContactMechId">
+            <call-object-method obj-field="cart" 
method-name="setAllShippingContactMechId">
                 <field field="parameters.shippingContactMechId"/>
             </call-object-method>
         </if-not-empty>
@@ -577,23 +577,23 @@ under the License.
        <session-to-field field="cart" session-name="shoppingCart"/>
        <if-not-empty field="cart">
            <set field="shipmentMethodTypeId" 
from-field="parameters.shipmentMethodTypeId"/>
-           <call-object-method obj-field="cart" 
method-name="setShipmentMethodTypeId">
+           <call-object-method obj-field="cart" 
method-name="setAllShipmentMethodTypeId">
                <field field="shipmentMethodTypeId"/>
            </call-object-method>
 
            <set field="carrierPartyId" from-field="parameters.carrierPartyId"/>
-           <call-object-method obj-field="cart" 
method-name="setCarrierPartyId">
+           <call-object-method obj-field="cart" 
method-name="setAllCarrierPartyId">
                <field field="carrierPartyId"/>
            </call-object-method>
 
            <set field="maySplit" from-field="parameters.may_split" 
type="Boolean" default-value="false"/>
-           <call-object-method obj-field="cart" method-name="setMaySplit">
+           <call-object-method obj-field="cart" method-name="setAllMaySplit">
                <field field="maySplit" type="Boolean"/>
            </call-object-method>
 
            <set field="shippingInstruction" 
from-field="parameters.shipping_instructions" type="String"/>
            <if-not-empty field="shippingInstruction">
-               <call-object-method obj-field="cart" 
method-name="setShippingInstructions">
+               <call-object-method obj-field="cart" 
method-name="setAllShippingInstructions">
                    <field field="shippingInstruction" type="String"/>
                </call-object-method>
            </if-not-empty>
@@ -606,13 +606,13 @@ under the License.
            </if-not-empty>
 
            <set field="isGift" from-field="parameters.is_gift" type="Boolean" 
default-value="false"/>
-           <call-object-method obj-field="cart" method-name="setIsGift">
+           <call-object-method obj-field="cart" method-name="setAllIsGift">
                <field field="isGift" type="Boolean"/>
            </call-object-method>
 
            <set field="giftMessage" from-field="parameters.gift_message" 
type="String"/>
            <if-not-empty field="giftMessage">
-               <call-object-method obj-field="cart" 
method-name="setGiftMessage">
+               <call-object-method obj-field="cart" 
method-name="setAllGiftMessage">
                    <field field="giftMessage" type="String"/>
                </call-object-method>
            </if-not-empty>

Modified: 
ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/CartEvents.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/CartEvents.xml?rev=1422814&r1=1422813&r2=1422814&view=diff
==============================================================================
--- 
ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/CartEvents.xml 
(original)
+++ 
ofbiz/trunk/specialpurpose/webpos/script/org/ofbiz/webpos/event/CartEvents.xml 
Mon Dec 17 09:28:39 2012
@@ -421,13 +421,13 @@ under the License.
                 <field-map field-name="roleTypeId" value="CARRIER"/>
             </entity-one>
             <field-to-request field="shipmentMethod.description" 
request-name="shippingDescription"/>
-            <call-object-method obj-field="shoppingCart" 
method-name="setShipmentMethodTypeId">
+            <call-object-method obj-field="shoppingCart" 
method-name="setAllShipmentMethodTypeId">
                 <field field="shipmentMethodTypeId"/>
             </call-object-method>
-            <call-object-method obj-field="shoppingCart" 
method-name="setCarrierPartyId">
+            <call-object-method obj-field="shoppingCart" 
method-name="setAllCarrierPartyId">
                 <field field="carrierPartyId"/>
             </call-object-method>
-            <call-object-method obj-field="shoppingCart" 
method-name="setProductStoreShipMethId">
+            <call-object-method obj-field="shoppingCart" 
method-name="setAllProductStoreShipMethId">
                 <field field="productStoreShipMethId"/>
             </call-object-method>
             <call-object-method  obj-field="shoppingCart" 
method-name="getCurrency" ret-field="isoCode"/>


Reply via email to