News:

Looking for documentation? Take a look on our wiki

Main Menu

Set different product price per currency

Started by sandomatyas, April 01, 2022, 16:26:46 PM

Previous topic - Next topic

sandomatyas

Is it possible to use exact product prices per currency instead of currency rates?
Like there is a shop which accepts 2 currencies: USD and EUR.
For now I can use the automatic rates or set manual rates but the customer wants to set  specific price in USD and an other specific price in EUR
Is it possible to do that in VM?

sandomatyas

or the second option:
"nice rounding" -> after the currency conversion rond up the price to the next .5 or .9
Like
€10 -> conversion -> $11.03 -> nice rounding -> $11.5
€18 -> conversion -> $19.85 -> nice rounding -> $19.9

maybe a calculation plugin?

sandomatyas


Jörgen

Yes it is possible with a calculation plugin.  Probably even possible with a vmcustom plugin. Text input plugin modifies the sales price, might be worth checking out.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

sandomatyas

Quote from: Jörgen on April 12, 2022, 14:15:39 PM
Yes it is possible with a calculation plugin.  Probably even possible with a vmcustom plugin. Text input plugin modifies the sales price, might be worth checking out.

Jörgen

Hi Jörgen

Thanks for your reply.
I've already checked the textinput vmcustom plugin but it does work via plgVmPrepareCartProduct method and doesn't change the product price but the cart element's price. Also it does work with $modificatorSum instead of the price itself.

Also checked the vmcalculation plugin. Created a new math op via plgVmAddMathOp and implemented it in plgVmInterpreteMathOp. Here I can modify the price but only _before_ the currency convert so when the price is uses the vendor's currency. I didn't find any documentation or trigger how should I modify the price after the currency conversion. Or set different prices per currency.
Any hint?