Author: sichen
Date: Tue Nov 28 10:32:18 2006
New Revision: 480151
URL:
http://svn.apache.org/viewvc?view=rev&rev=480151Log:
Improved ecommerce controller so that before the checkoutpayment page the tax & shipping is calculated, so people can know the right total when splitting payments
Modified:
incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
Modified: incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?view=diff&rev=480151&r1=480150&r2=480151==============================================================================
--- incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Tue Nov 28 10:32:18 2006
@@ -401,7 +401,7 @@
<event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="setCheckOutPages"/>
<response name="shippingaddress" type="view" value="checkoutshippingaddress"/>
<response name="shippingoptions" type="view" value="checkoutshippingoptions"/>
- <response name="payment" type="view" value="checkoutpayment"/>
+ <response name="payment" type="request" value="calcShippingBeforePayment"/>
<response name="confirm" type="request" value="calcShipping"/>
<response name="success" type="view" value="checkoutshippingaddress"/>
<response name="error" type="request" value="checkouterror"/>
@@ -487,6 +487,27 @@
<security direct-request="false"/>
<event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="checkPaymentMethods"/>
<response name="success" type="view" value="checkoutreview"/>
+ <response name="error" type="request" value="checkouterror"/>
+ </request-map>
+
+ <!-- this request chain is for calculating shipping & tax before getting to the payments page, so that the visitor
+ will know the full shipping & tax charges when trying to split payments between various payment methods -->
+ <request-map uri="calcShippingBeforePayment">
+ <security direct-request="false"/>
+ <event type="java" path="org.ofbiz.order.shoppingcart.shipping.ShippingEvents" invoke="getShipEstimate"/>
+ <response name="success" type="request" value="calcTaxBeforePayment"/>
+ <response name="error" type="request" value="checkouterror"/>
+ </request-map>
+ <request-map uri="calcTaxBeforePayment">
+ <security direct-request="false"/>
+ <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="calcTax"/>
+ <response name="success" type="request" value="validatePaymentMethodsBeforePayment"/>
+ <response name="error" type="request" value="checkouterror"/>
+ </request-map>
+ <request-map uri="validatePaymentMethodsBeforePayment">
+ <security direct-request="false"/>
+ <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="checkPaymentMethods"/>
+ <response name="success" type="view" value="checkoutpayment"/>
<response name="error" type="request" value="checkouterror"/>
</request-map>