We have a client with a UK site were users expect to see prices inc. taxes at all points. The VAT module does this brilliantly, however when viewing order totals, the total is always the last item e.g. :
Order total ------------ Subtotal : £16.16 UK shipping : £2.00 Subtotal excluding taxes : £18.16 VAT (tax) : £3.18 Order total : £21.34
However, the client (and their customers) expects :
Order total ------------ Subtotal : £17.00 UK shipping : £2.35 Total : £21.34 Of which is VAT (tax) : £3.18
To achieve this, the total line item needs to be subject to the same weight based ordering that the other line items use.
It turns out the invoicing system already supports this correctly, but the default customer.itpl.php bypasses the hard work already done and hard codes total and subtotal into the document.
The other place where total is hard coded is in the Payment preview pane on the checkout.
The two attached patches solve the above two problems. The patch for payment isn't perfect and could do with a little refinement as the weights for each line item do not match those set in the invoicing section, but its a start.
Comment | File | Size | Author |
---|---|---|---|
uc_payment-ordertotal-weight.txt | 2.17 KB | a_c_m | |
uc_order-ordertotal-weight.txt | 2.54 KB | a_c_m |
Comments
Comment #1
TR CreditAttribution: TR commentedSounds like a good idea. Looking for someone to apply the patch and evaluate whether it works and make sure it doesn't break things ...
Comment #2
longwaveRelated to #1057884: Allow line item titles and weights to be altered
Comment #3
TR CreditAttribution: TR commentedLet's see what the testbot has to say...
Comment #4
TR CreditAttribution: TR commentedComment #5
TR CreditAttribution: TR commentedMarked #1135484: change order of line items in Order Total Preview? as a duplicate.
Comment #6
SilviuChingaru CreditAttribution: SilviuChingaru commentedComment #7
TR CreditAttribution: TR commentedI think we can do this in D8 now without too much trouble.
Comment #8
longwave