Re: Ubercart European VAT Compatibility

Posts: 2
Joined: 02/22/2008

We've been working on the same problem, but threw in another one that seemed to be somewhat related: Different prices.

It seems a requirement/wish for a lot of customers to be able to have different prices depending on different criteria, some examples:

Role based prices for setting custom prices for 'Gold customers'.

Currency based prices, as pure rate based conversions isn't satisfactory for some customers.

Our, work in progress, solution moves prices out into a generalised module that allows add on modules to define hooks into the price finding process. In the finding process each hook can either change the price or add another 'price' as a property. An example of the latter could be a VAT calculating module that stores the VAT with the price without changing the price as such. The theming function can then decide whether to show the price with or without VAT, or with VAT as a separate item.

The idea is that a shop system (not limited to Ubercart) requests the price for an object (often node, though other types can be implemented), and uses the theme function to display it (by telling the theme function where the price is to be shown, which allows the themer to variate the display depending on context), and an 'getter' function for getting the price that should be ultimately charged for this object (allowing for more hooks).

Also the price object contains the currency of the price, which allows for both exchange rate based modifiers as well as add-on modules that store prices for different currencies.

This allows for considerable control over how prices and their display.

Ubercart European VAT Compatibility By: Ryan (16 replies) Tue, 05/06/2008 - 13:35