Posted by
Ruth Hoffman on
URL: http://ofbiz.116.s1.nabble.com/Users-tax-calculation-on-order-check-out-tp138839p138842.html
Hi Jacopo:
Sorry I haven't had a chance to test this until today. It seems to work
fine. I noticed that you have not applied this to more recent versions
of OFBiz.
FYI - I checked out version 7759 (today), put this code in:
...
public void calcAndAddTax(GenericValue shipAddress) throws
GeneralException {
if(shipAddress == null) {
return;
...
Here's how I tested:
Created a digital product, with no shipping and no tax & added it to the
Featured Products category. Created the order. The shipping form did
/not/ show up and the order was created with no problems - which is what
I wanted.
I also tried creating an order with a shippable product and my non
shippable product, and the shipping request form did show up. The order
was created with no problems. So, again, this is what I was looking for.
Thanks much. Maybe you should add this to the code base.
Regards,
Ruth
Ruth Hoffman wrote:
>Thanks! I'll give it a try today.
>Ruth
>
>Jacopo Cappellato wrote:
>
>
>
>>Ruth,
>>
>>this is a quick fix (not tested) to avoid the error:
>>
>>in the org.ofbiz.order.shoppingcart.CheckOutHelper class, add the
>>following code at the beginning of the calcAndAddTax(GenericValue
>>shipAddress) method:
>>
>>
>>if (shipAddress == null) {
>> return;
>>}
>>
>>It should work for you, but I'd like to hear comments from others to see
>>if this patch can go into the SVN.
>>
>>Jacopo
>>
>>
>>Ruth Hoffman wrote:
>>
>>
>>
>>
>>>Hello All:
>>>I'm wondering why I get the following error when I try to checkout:
>>>
>>>"The address(es) used for tax calculation did not have State/Province or
>>>Country values set, so we cannot determine the taxes to charge. "
>>>
>>>Some background:
>>>1) I don't need to calculate taxes for this particular product (in the
>>>Catalog MGR I specify no tax & no shipping charges - since its a digital
>>>product)
>>>2) I bypass the shipping address form in my checkout process (the
>>>customers for this product don't need to have a shipping address, so I
>>>shouldn't ask them for one.)
>>>
>>>Seems like there's some kind of mandatory relationship set up between
>>>the shipping address, tax calculation and the order creation process. Is
>>>this the way it should work? I would think that the order process should
>>>determine if tax calculations are even needed before it goes on to
>>>create the order. BTW, if I put the shipping address form back in my
>>>checkout process, then everything works fine - no error and the order is
>>>created. Am I doing something wrong in setting up the product?
>>>
>>>Any insight would be appreciated.
>>>Ruth
>>>
>>>_______________________________________________
>>>Users mailing list
>>>
[hidden email]
>>>
http://lists.ofbiz.org/mailman/listinfo/users>>>
>>>
>>>
>>>
>>>
>>_______________________________________________
>>Users mailing list
>>
[hidden email]
>>
http://lists.ofbiz.org/mailman/listinfo/users>>
>>
>>
>>
>>
>
>_______________________________________________
>Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users>
>
>
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users