Hi Milbo,
Thank you for your reply.
I know that any product can have more than one price.
I will explain what I did till now and at the end of the post I will ask you one question about your extension.
I did the following:
- Create 2 shopper groups: Swiss shoppers, Non-Swiss shoppers
- Add product with 2 prices: Swiss Shoppers 219 CHF, Non-Swiss shoppers 179 EUR
- Installed 3rd party plugin which automaticlly assign user to shopper group based on selection of one shopper field
- Added shopper field called "Country" and in 3rd party plugin made rule:
If in shopper field called "Counrty" value "Switzerland" is selected asign shopper to "Swiss shopper" group.
(3rd party plugin cannot work with default Virtuemart county shopper field, so it's a must to create custom shopper field and disable Virtuemart default contry filed)
And now, when user go to "Add/Edit billing address information" and select "Switzerland" as his country after clicking "Save" he is going back to cart and than see prices for Swiss Shoppers group, but instead of 219 CHF, user will see 202,98 € (which is price for Swiss shoppers group converted in €) because € is default currency.
User have posibility to change currency from € to CHF, but if thay don't do that, invoce will be in € and that is unacceptable, because it's against the law.
So, can I automatically asign CHF when shopper group is set to Swiss Shopper?
If yes, than there is no need to show Virtuemart currency module on frontend. Prices would be shown in CHF if shopper group is Swiss Shoppers and if is other shopper group selected prices would be in €.
Edit:
Basicly I need code which look something like this:
if ($virtuemart_shoppergroup_id == 3)
{$virtuemart_currency_id = 27}
else {$virtuemart_currency_id = 47}
where Swiss Shoppers id is 3, CHF id is 27, and Euro id is 47.
But I don't now where to put this code or what is missing.
Thanks in advance.
Best regards,
Milan