I have an UK site in which we set up two VAT taxes, both are for 20% (as per UK) and applies to the same product, but we needed a certain role to see prices excl. VAT and normal users (anon and the rest) to see the prices inc. VAT.
To achieve this, I configured two Tax rates with the same details, except for the "Include this tax when displaying product prices." which was checked on one and unchecked on the other.
I then set up the conditions for the two tax rates, where one has "User has role 'x'" and the other one has the opposite condition (same one negated).
I noticed that although prices were display excl. of vat in cart and checkout, it did not on product views, regardless of the conditions.
After looking at the code, I found that indeed, for product display the conditions were not run at all.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2543676-2-honor-tax-conditions-all-the-time.patch | 1.35 KB | hanoii |
Comments
Comment #1
hanoiiI realise this is probably a design error, o some inheritance from old code, and attempting to fix this might not be so easy because of its probably repercussions, but here is a proposed fix, one it makes sense logically and should work most of the time, although I expect certain order conditions to need some extra conditions.
For me its working because I am not using any order data condition, but should work non-the-less.
Comment #2
hanoiiSmall change, using UcOrder() instead of stdClass();
EDIT: this should prevent most notices.
Comment #3
hanoiiComment #4
smurfxx commentedPatch works very well!