views:

587

answers:

1

I am developing an e-commerce site for use in the UK, and have been required to let the user buy products either with or without tax included.

I have slightly modified the AAC module to show prices either including or excluding VAT depending on a cookie which is set via a "view prices including/excluding" link, but of course whenever a product is added to cart, the price is that from the database - i.e. including VAT.

Does anyone know of any neat tricks or modules that would let me do this?

A: 

We've decided to go for just viewing prices excluding the vat, and not being able to buy them at the excluding vat price.

In case anyone needs it, here is the code/formula used to get the full price and work out the lower vat-free price:

*(line 217-222 of uc_aac.module in my version - and you will need a div with the class "excluding_VAT").*

//Get the updated price, minus VAT
new_val = parseFloat(updated_price.substr(1));
new_val = (100/115) * new_val;
new_val = Math.round(new_val*Math.pow(10,2))/Math.pow(10,2);

$(".excluding_VAT").html("£"+new_val+" exc VAT");
jsims281