Attribute Value Based Tax Rules Disappear Between Checkout and Review

pompeydrupal - October 10, 2009 - 14:04
Project:Ubercart
Version:6.x-2.0-rc7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

Hi all,

There appears to be a fairly big bug in the way attribute value based tax rules are implemented between the checkout and review pages.

After some quite intensive testing (and tears) I am fairly confident to say that the checkout and review pages seem to do the exact opposite to each other and it appears to be the logic on the review page which is wrong.

If you have a tax rule that should be applied only if a product in your basket has a specific attribute selected the checkout page always seems to calculate it 100% correctly. However the review page doesn't show the additional tax line if it should but DOES show it if it shouldn't.

I've checked the logic behind my rule a million times and it's watertight - backed up by the fact the checkout page is showing it fine.

I'm fairly new to Ubercart so I may be missing something obvious but I'm really not sure if there is a reason for different logic to be in use on the checkout and review pages - surely there's a lot of code duplication?

Anyway - any help more than greatfully received!

Thanks
Krix

Ps. A little extra information I only upgraded to rc7 today to test as I thought rc5 was the problems but no such luck. It seems to do the same in both.

#1

pompeydrupal - October 14, 2009 - 21:10

Is anybody able to direct me to the files/functions that handle the taxes in the checkout and review pages so that I can see if I can fix (hack) this myself?

#2

Island Usurper - October 20, 2009 - 17:39
Priority:critical» normal
Status:active» needs review

I believe this patch fixes the behavior of the attribute condition.

I'm bumping this issue down from critical because fixing this particular problem isn't going to end up making Ubercart do what you want. This is because the conditions only specify whether or not the tax is applied to the order. The tax itself doesn't make a distinction between products' attributes. That means if someone adds a product with option A and a product with option B to their cart, the option A tax will be applied to both products.

You can have taxes filter products by content type and by whether they are shippable. Any more granularity just isn't possible at this point, and adding it to the tax module is another issue, which will happen in the next major version of Ubercart, probably.

#3

Island Usurper - October 20, 2009 - 17:39

And I totally forgot to attach the patch.

AttachmentSize
600892_attribute_condition.patch 1.46 KB

#4

pompeydrupal - October 21, 2009 - 16:12
Status:needs review» needs work

Thanks Island Usurper.

Have tested this but it doesn't appear to have solved the issue. With that patch applied the tax is never applied on the checkout page but the review page is working correctly?

Will test further tonight but it appears to have (almost) reversed the issue.

Krix

#5

pompeydrupal - November 2, 2009 - 21:22

Island Usurper,

Is this issue something you will be able to look into?

Ta
Krix

#6

pompeydrupal - November 25, 2009 - 16:53

Hi - You may as well mark this bug as "won't fix" as it doesn't look like we are going to get a solution.

 
 

Drupal is a registered trademark of Dries Buytaert.