svn commit: r674739 - in /ofbiz/trunk/applications/ecommerce: script/org/ofbiz/ecommerce/customer/CustomerEvents.xml webapp/ecommerce/WEB-INF/controller.xml webapp/ecommerce/order/OnePageCheckoutProcess.ftl

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

svn commit: r674739 - in /ofbiz/trunk/applications/ecommerce: script/org/ofbiz/ecommerce/customer/CustomerEvents.xml webapp/ecommerce/WEB-INF/controller.xml webapp/ecommerce/order/OnePageCheckoutProcess.ftl

mor-2
Author: mor
Date: Tue Jul  8 01:40:04 2008
New Revision: 674739

URL: http://svn.apache.org/viewvc?rev=674739&view=rev
Log:
Added request chain for processing order through One Page

Modified:
    ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=674739&r1=674738&r2=674739&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Tue Jul  8 01:40:04 2008
@@ -1245,6 +1245,7 @@
         <!--============== Set Payment Method ================-->
         <set field="paymentMethodId" from-field="parameters.paymentMethodId"/>
         <set field="cardSecurityCode" from-field="parameters.cardSecurityCode"/>
+        <field-to-session field-name="userLogin" session-name="userLogin"/>
         <call-bsh>
             <![CDATA[
                 import org.ofbiz.order.shoppingcart.ShoppingCart;

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml?rev=674739&r1=674738&r2=674739&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml Tue Jul  8 01:40:04 2008
@@ -1626,6 +1626,49 @@
         <response name="error" type="none"/>
     </request-map>    
 
+    <request-map uri="onePageProcessOrder">
+        <security https="true" auth="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="createOrder"/>
+        <response name="sales_order" type="request" value="onePageCheckBlacklist"/>
+        <response name="work_order" type="request" value="onePageCheckBlacklist"/>
+        <response name="error" type="view" value="OnePageCheckout"/>
+    </request-map>
+
+    <request-map uri="onePageCheckBlacklist">
+        <security direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="checkOrderBlacklist"/>
+        <response name="success" type="request" value="onePageProcessPayment"/>
+        <response name="failed" type="request" value="failedBlacklist"/>
+        <response name="error" type="view" value="OnePageCheckout"/>
+    </request-map>
+
+    <request-map uri="onePageProcessPayment">
+        <security https="true" direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="processPayment"/>
+        <response name="success" type="request" value="onePageClearCartForOrder"/>
+        <response name="fail" type="request" value="checkouterror"/>
+        <response name="error" type="view" value="OnePageCheckout"/>
+    </request-map>
+
+    <request-map uri="onePageClearCartForOrder">
+        <security direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="clearCart"/>
+        <response name="success" type="request" value="onePageCheckExternalPayment"/>
+        <response name="error" type="view" value="OnePageCheckout"/>
+    </request-map>
+
+    <request-map uri="onePageCheckExternalPayment">
+        <security https="true" direct-request="false"/>
+        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="checkExternalPayment"/>
+        <response name="none" type="request" value="emailorder"/>
+        <!-- these are not yet supported
+        <response name="offline" type="request" value="emailorder"/>
+        <response name="worldpay" type="request" value="callWorldPay"/>
+        <response name="paypal" type="request" value="callPayPal"/>
+        <response name="billact" type="request" value="emailorder"/>
+        <response name="cod" type="request" value="emailorder"/> -->
+        <response name="error" type="view" value="OnePageCheckout"/>
+    </request-map>
     <!-- End of Request Mappings -->
 
     <!-- View Mappings -->

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=674739&r1=674738&r2=674739&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Tue Jul  8 01:40:04 2008
@@ -636,9 +636,9 @@
           <div id="" class="screenlet">
             <div class="screenlet-header"><div class="boxhead" align="left">Step 5: Submit Order</div></div>
             <div id="orderSubmitPanel" style="display: none;">
-              <form name="orderSubmitForm" id="orderSubmitForm" action="<@ofbizUrl></@ofbizUrl>" method="post">
+              <form name="orderSubmitForm" id="orderSubmitForm" action="<@ofbizUrl>onePageProcessOrder</@ofbizUrl>" method="post">
+                <div align="right"><input type="button" name="processButton" value="${uiLabelMap.OrderSubmitOrder}" class="mediumSubmit"></div>
               </form>
-              <div align="right"><h3><span class="editStep"><a href="javascript:void(0);" id=""><h3>Submit Order.</h3></a></span></h3></div>  
             </div>
           </div>
         </div>