Nathan Pitmanhello, my name is
nathan pitman.

ExpressionEngine Plug-in: Add VAT Jan 08. 094

I’ve just written a new ExpressionEngine plug-in called ‘Add VAT‘. This plug-in takes any numeric value and returns the value plus VAT. You also have to specify the VAT rate obviously.

Typical usage is as follows:

{exp:np_add_vat price="120" rate="15"}

I’m using the plug-in on a website I’m developing where I need to be able to display prices inclusive and exclusive of VAT. Currently the Simple Commerce module does not provide a facility to specify VAT or taxes.

Download: pi.np_add_vat.php.zip

If you have any further ideas as to how the plug-in could be developed do let me know. :)

That’s a great suggestion Matthew! I think I may take a look at doing that over the weekend though I’ve not written an extension before which has tags that can be parsed in templates… is that even possible?

Posted by Nathan Pitman  on  01/08  at  09:14 PM

I don’t know, but it can’t be that hard!

Posted by Matthew Pennell  on  01/08  at  09:14 PM

Ok, well after a little digging, it transpires that it’s physically impossible to add a settings screen to a plug-in, or make an extension callable from page templates like a plug-in. It seems the best solution is to port it to a module format, that way it can be called from page templates and also have a CP interface.

So, I’m thinking about how I can expand upon this to make it worth turning into a module, ie: ability to store multiple tax rates and associate those with country codes… thus allowing someone to possibly run a multi-currency simple commerce module based store???

Something to ponder…

Posted by Matthew Pennell  on  01/08  at  09:14 PM

Speak your mind

Name:

Email:

Location:

URL:

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below: