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/12/23 12:22:24 UTC
svn commit: r1425452 - in /ofbiz/trunk:
applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
Author: jleroux
Date: Sun Dec 23 11:22:24 2012
New Revision: 1425452
URL: http://svn.apache.org/viewvc?rev=1425452&view=rev
Log:
Fix a bug reported by Mark Schneider on user ML:
>It looks like a wrong credit card number leads to the following error message in UI (tested with one-page checkout):
> # ---
> ... (INSERT on table 'ORDER_CONTACT_MECH' caused a violation of foreign key constraint 'ORDER_CMECH_CM' for key (10005). ...
>
> I would rather expect an error message like "invalid credit cartd number" instead.
jleroux: the bug was actually double
1st: a last issue related to https://issues.apache.org/jira/browse/OFBIZ-5102 after https://issues.apache.org/jira/browse/OFBIZ-3883
2nd: the cardNumber was missing a creditcard class (jquery.validate.js messages)
Modified:
ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml?rev=1425452&r1=1425451&r2=1425452&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml (original)
+++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/CheckoutServices.xml Sun Dec 23 11:22:24 2012
@@ -105,7 +105,7 @@ under the License.
<string value="SHIPPING_LOCATION"/>
<field field="parameters.shipToContactMechId"/>
</call-object-method>
- <call-object-method obj-field="shoppingCart" method-name="setShippingContactMechId">
+ <call-object-method obj-field="shoppingCart" method-name="setAllShippingContactMechId">
<field field="parameters.shipToContactMechId"/>
</call-object-method>
<call-object-method obj-field="shoppingCart" method-name="setOrderPartyId">
@@ -190,6 +190,7 @@ under the License.
</create-object>
<set field="callResult" value="${groovy:checkOutHelper.finalizeOrderEntryPayment(paymentMethodId, null, false, false)}"/>
<set field="cartPaymentInfo" value="${groovy: org.ofbiz.order.shoppingcart.ShoppingCart.CartPaymentInfo cpi = shoppingCart.getPaymentInfo(paymentMethodId, null, null, null, true); cpi.securityCode = cardSecurityCode; return cpi;}"/>
+ <check-errors/>
</simple-method>
<simple-method method-name="setAnonUserLogin" short-description="Set user login in the session" login-required="false">
Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=1425452&r1=1425451&r2=1425452&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Sun Dec 23 11:22:24 2012
@@ -380,7 +380,7 @@ under the License.
<label for="cardNumber">${uiLabelMap.AccountingCardNumber}*
<span id="advice-required-cardNumber" style="display: none;" class="errorMessage"> (${uiLabelMap.CommonRequired})</span>
</label>
- <input id="cardNumber" name="cardNumber" class="required" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" />
+ <input id="cardNumber" name="cardNumber" class="required creditcard" type="text" value="${cardNumber?if_exists}" size="30" maxlength="16" />
</span>
<span>
<label for="billToCardSecurityCode">CVV2</label>