Author: mor
Date: Thu Oct 23 05:59:13 2008
New Revision: 707363
URL:
http://svn.apache.org/viewvc?rev=707363&view=revLog:
Fix:Cart update on One Page Checkout was not working properly.
Applied patch (UpdteQtyFix_js.patch) from Jira Issue OFBIZ-2012 (
https://issues.apache.org/jira/browse/OFBIZ-2012).
Thanks to Jyotsna Rathore, Surya Kusumakar and others.
Modified:
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js
ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
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=707363&r1=707362&r2=707363&view=diff==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/images/checkoutProcess.js Thu Oct 23 05:59:13 2008
@@ -418,7 +418,8 @@
var productId = $(productIdElementId).value;
if (qtyElement.value >= 0 && !isNaN(qtyElement.value)) {
var itemIndex = getProductLineItemIndex(event, productId);
- var formValues = $('cartForm').serialize();
+ qtyParam = "update_" + itemIndex +"="+qtyElement.value;
+ var formValues = $('cartForm').serialize() + '&' + qtyParam;
updateCartData(elementId, formValues, qtyElement.value, itemIndex);
} else {
qtyElement.value = "";
Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=707363&r1=707362&r2=707363&view=diff==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Thu Oct 23 05:59:13 2008
@@ -148,7 +148,7 @@
<input type="hidden" name="cartLineProductId" id="cartLineProductId_${cartLineIndex}" value="${cartLine.getProductId()}">
<div>
<span>
- <input type="text" name="update_${cartLineIndex}" id="qty_${cartLineIndex}" value="${cartLine.getQuantity()?string.number}" size="6" class="required validate-number">
+ <input type="text" name="update${cartLineIndex}" id="qty_${cartLineIndex}" value="${cartLine.getQuantity()?string.number}" size="6" class="required validate-number">
</span>
<label for="qty_${cartLineIndex}"><span id="advice-required-qty_${cartLineIndex}" style="display:none;" class="errorMessage"> (required)</span></label>
</div>