PDA

View Full Version : Mini Cart and VAT


BilstonBob
13-May-2004, 03:23 PM
Hi

I am using the Javascript mini cart on my brochure and catalog pages. The total includes VAT but my customer sells to trade only, so he would like the prices displayed ex VAT. Fair enough really!

I've play around with the actinicextras.js javascript and taken a look at what I think is the cookie the info is stored in, but have had no joy.

So does anyone know if there is a way of displaying the total ex VAT in the mini cart?

Any help appreciated.

Anthony

Mike Hughes
13-May-2004, 03:26 PM
divide by 1.175?

Mike

OK. It's not that easy as the total value in the cookie isn't a number. I guess you'd have to take the string, remove the pound sign, do the maths and then re-create the string again.

I wonder if there's an easier way?

Mike Hughes
13-May-2004, 04:02 PM
There doesn't seem to be an easier way. The only two items that are available via the 'getcartItem' javascript are the quanitity and value (including VAT).

Maybe this could be added to the wish list for the next version. It would seem to be prettty fundamental for B2B users.

Mike

BilstonBob
14-May-2004, 11:58 AM
Hi Mike

Thanks for the reply.

My immediate thought was to do as you suggest and divide the value by 1.175. But even with converting the string to a number and redoing the calc (dust off my javascript!) I'd assume that the result wouldn't match Actinic's ex VAT sub-total. As I recall Actinic calculates VAT line by line, so the figures come out slightly different compared to calculating VAT on the sub-total.

So I guess I'm stuffed. I'll just have to add some 'inc VAT' text to the total and hope my customer doesn't mind.

Anthony