Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Why is the $order changing during checkout?


Recommended Posts

Hi all,


I've got the contribution Local Delivery installed on my test site and by itself, it's working properly. I've also got the contribution New York Taxes by Zip Code installed, and it's about 99% working. My problem is that we charge for Local Delivery and the state says that we have to apply sales taxes to the delivery charge. OK, so I updated the quote function in the local delivery module and added a new parameter to the quote method's get_tax_rate() function to pass in the zip code.


Bear with me here, because I know the updated get_tax_rate and get_tax_rate_description are working as I've got Local Pickup working with two stores in different counties each having their own sales tax rate.


Now, what I don't understand (yet, and I'm hoping for some steering) is that when I do a var_dump($order) in checkout_payment.php the contents show just one tax group and one float for the actual tax. The tax number shown here appears to be only for the products in my test order and does not include shipping taxes. Now, if I do a var_dump($order) in checkout_confirmation.php, I've suddenly got one tax group for product list, and another one for the shipping. The problem is that the second tax group isn't complete; it only has the state rate and no county add-on rate. I have confirmed that the quote method in Local Delivery (dly.php) is returning the proper rate in $this->quotes['tax'].


So, my question is what is updating the $order between checkout_payment.php and checkout_confirmation.php that may be causing the shipping tax to get screwed up?



Link to comment
Share on other sites



I found the problem in ot_shipping.php. That module also calls get_tax_rate and get_tax_rate_description and I had to update the code here to reflect the new versions of those calls which now take a zip code in order to do the right work.


Sorry to have bothered you all, but I was looking for this blasted thing the better part of the afternoon.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...