[OFBiz] SVN: r6515 - in trunk/applications: ecommerce/webapp/ecommerce/customer order/src/org/ofbiz/order/shoppingcart

jonesde@svn.ofbiz.org jonesde at svn.ofbiz.org
Mon Jan 16 23:32:02 CST 2006


Author: jonesde
Date: 2006-01-16 23:31:55 -0600 (Mon, 16 Jan 2006)
New Revision: 6515

Modified:
   trunk/applications/ecommerce/webapp/ecommerce/customer/customertaxinfo.ftl
   trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
Log:
A couple of small fixes that broke the checkout process and made it uglier, related to the TaxAuthority during checkout stuff

Modified: trunk/applications/ecommerce/webapp/ecommerce/customer/customertaxinfo.ftl
===================================================================
--- trunk/applications/ecommerce/webapp/ecommerce/customer/customertaxinfo.ftl	2006-01-17 01:07:17 UTC (rev 6514)
+++ trunk/applications/ecommerce/webapp/ecommerce/customer/customertaxinfo.ftl	2006-01-17 05:31:55 UTC (rev 6515)
@@ -24,7 +24,7 @@
 -->
 <#if partyTaxAuthInfoAndDetailList?exists>
     <#list partyTaxAuthInfoAndDetailList as partyTaxAuthInfoAndDetail>
-        <div>
+        <div class="tabletext">
             <a href="<@ofbizUrl>deleteCustomerTaxAuthInfo?partyId=${partyId}&amp;taxAuthPartyId=${partyTaxAuthInfoAndDetail.taxAuthPartyId}&amp;taxAuthGeoId=${partyTaxAuthInfoAndDetail.taxAuthGeoId}&amp;fromDate=${partyTaxAuthInfoAndDetail.fromDate}</@ofbizUrl>" class="buttontext">X</a>
             [${partyTaxAuthInfoAndDetail.geoCode}] ${partyTaxAuthInfoAndDetail.geoName} (${partyTaxAuthInfoAndDetail.groupName}): Tax ID [${partyTaxAuthInfoAndDetail.partyTaxId?default("N/A")}], Is Exempt? [${partyTaxAuthInfoAndDetail.isExempt?default("N")}]
         </div>
@@ -32,6 +32,7 @@
     <div>
         <span class="tableheadtext">Add Tax Info:</span>
         <select name="taxAuthPartyGeoIds" class="selectBox">
+          <option></option>
           <#list taxAuthorityAndDetailList as taxAuthorityAndDetail>
             <option value="${taxAuthorityAndDetail.taxAuthPartyId}::${taxAuthorityAndDetail.taxAuthGeoId}">[${taxAuthorityAndDetail.geoCode}] ${taxAuthorityAndDetail.geoName} (${taxAuthorityAndDetail.groupName?if_exists})</option>
           </#list>

Modified: trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java
===================================================================
--- trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java	2006-01-17 01:07:17 UTC (rev 6514)
+++ trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutEvents.java	2006-01-17 05:31:55 UTC (rev 6515)
@@ -117,15 +117,19 @@
         if ("error".equals(CheckOutEvents.cartNotEmpty(request, response)) == true) {
             return "error";
         }
+        
+        HttpSession session = request.getSession();
 
         //Locale locale = UtilHttp.getLocale(request);
         String curPage = request.getParameter("checkoutpage");
         Debug.logInfo("CheckoutPage: " + curPage, module);
 
-        ShoppingCart cart = (ShoppingCart) request.getSession().getAttribute("shoppingCart");
+        ShoppingCart cart = (ShoppingCart) session.getAttribute("shoppingCart");
         LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
         GenericDelegator delegator = (GenericDelegator) request.getAttribute("delegator");
         CheckOutHelper checkOutHelper = new CheckOutHelper(dispatcher, delegator, cart);
+        GenericValue userLogin = cart.getUserLogin();
+        if (userLogin == null) userLogin = (GenericValue) session.getAttribute("userLogin");
 
         if ("shippingaddress".equals(curPage) == true) {
             // Set the shipping address options
@@ -139,7 +143,7 @@
             if (UtilValidate.isNotEmpty(taxAuthPartyGeoIds)) {
                 try {
                     Map createCustomerTaxAuthInfoResult = dispatcher.runSync("createCustomerTaxAuthInfo", 
-                            UtilMisc.toMap("partyId", cart.getPartyId(), "taxAuthPartyGeoIds", taxAuthPartyGeoIds, "partyTaxId", partyTaxId, "isExempt", isExempt));
+                            UtilMisc.toMap("partyId", cart.getPartyId(), "taxAuthPartyGeoIds", taxAuthPartyGeoIds, "partyTaxId", partyTaxId, "isExempt", isExempt, "userLogin", userLogin));
                     ServiceUtil.getMessages(request, createCustomerTaxAuthInfoResult, null);
                     if (ServiceUtil.isError(createCustomerTaxAuthInfoResult)) {
                         return "error";



More information about the Svn mailing list