In E-Commerce site (or its custom impl), When user click on ShowCart,
I'll like to route request through the process of calculating Shipping
and Tax and set then in cart so that we can show it to Customer.
In case if user has not yet logged in or is anonymous then Shipping and
Tax calc services fail because of missing Address details. By doing this
change and another change that I did few days back, We attempt of calc
these things only if we have data to work with else do nothing.
Regards
Anil Patel
David E Jones wrote:
Actually if there is not shipping address we should use the billing
address.
I thought there was something in place that did that already.
Could you describe the process where this is becoming a problem?
-David
[EMAIL PROTECTED] wrote:
Author: apatel
Date: Thu Jul 26 16:56:18 2007
New Revision: 560035
URL: http://svn.apache.org/viewvc?view=rev&rev=560035
Log:
if there is no shipping contact mech in shoppingcart then do not
attempt to calc tax.
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?view=diff&rev=560035&r1=560034&r2=560035
==============================================================================
---
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
(original)
+++
ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java
Thu Jul 26 16:56:18 2007
@@ -714,7 +714,7 @@
}
public void calcAndAddTax(GenericValue shipAddress) throws
GeneralException {
- if (!"SALES_ORDER".equals(cart.getOrderType())) {
+ if (!"SALES_ORDER".equals(cart.getOrderType()) ||
UtilValidate.isEmpty(cart.getShippingContactMechId())) {
return;
}