svn commit: r692997 - /ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js

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

svn commit: r692997 - /ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js

mor-2
Author: mor
Date: Sun Sep  7 23:35:43 2008
New Revision: 692997

URL: http://svn.apache.org/viewvc?rev=692997&view=rev
Log:
Not entering extension number during one page checkout results in phone number on summary panels like 1-555-5555555-. Fix provided by Brajesh Patel.

Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js?rev=692997&r1=692996&r2=692997&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js Sun Sep  7 23:35:43 2008
@@ -305,8 +305,12 @@
 
 function setDataInShippingCompleted() {
     var fullName = $('firstName').value + " " +$('lastName').value;
+    var extension = "";
+    if ($F('shipToExtension')) {
+        extension = "-" + $F('shipToExtension');
+    }
     var shippingContactPhoneNumber = $F('shipToCountryCode')+ "-" + $F('shipToAreaCode')
-            + "-" + $F('shipToContactNumber')+ "-" + $F('shipToExtension');
+            + "-" + $F('shipToContactNumber') + extension;
     $('completedShipToAttn').update("Attn: " + fullName);
     $('completedShippingContactNumber').update(shippingContactPhoneNumber);
     $('completedEmailAddress').update($('emailAddress').value);
@@ -400,7 +404,11 @@
 function setDataInBillingCompleted() {
     var fullName = $F('firstNameOnCard') + " " +$F('lastNameOnCard');
     $('completedBillToAttn').update("Attn: " + fullName);
-    var billToPhoneNumber = $F('billToCountryCode') + "-" + $F('billToAreaCode') + "-" +$F('billToContactNumber') + "-" + $F('billToExtension');
+    var extension = "";
+    if ($F('billToExtension')) {
+        extension = "-" + $F('billToExtension');
+    }
+    var billToPhoneNumber = $F('billToCountryCode') + "-" + $F('billToAreaCode') + "-" + $F('billToContactNumber') + extension;
     $('completedBillToPhoneNumber').update(billToPhoneNumber);
     var cardNumber = "CC#:XXXXXXXXXXXX"+$F('cardNumber').gsub('-','').slice(12,16);
     $('completedCCNumber').update(cardNumber);