Re: Re: Taxes line items are not cleared after changes to addres

TR
TR's picture
Offline
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3369
Re: Re: Taxes line items are not cleared after changes to addres

A similar problem for me. I have taxes set up to charge only when items ship to my state. If the user picks my state for his shipping address, the tax shows up. So far so good. But if the user now changes the state to be anything else, the display of the tax doesn't go away - it still shows as my state tax.

Reloading the page fixes the problem - after a reload everything displays correctly.

A little more detail, looking at my server's access logs:

On the /cart/checkout page, when the user selects any state in the "Delivery Information" pane, that action causes an HTTP request "POST /taxes/calculate" to be generated (the code that makes this happen is in uc_taxes.js). When the state is my state (the only state with a tax rule), an additional HTTP request "POST /cart/checkout/line_items" is generated. The callback for line_items is the routine "uc_payment_get_totals" in uc_payment.module, which draws the "Subtotal", "Tax", "Order total" fields.

When the user's state is changed or set and it is NOT my state, the second HTTP request never happens. So far I haven't figured out where this decision is made in the code. However, it appears that this is why the display of the tax amount on the order doesn't go away. On a page reload, "POST /cart/checkout/line_items" *does* happen, which is why a reload solves things.

<tr>.
Taxes line items are not cleared after changes to address By: codexmas (9 replies) Mon, 10/29/2007 - 11:00