Author Topic: Product link to price in non-default currency [Solved]  (Read 252 times)

Osearcaigh

  • Beginner
  • *
  • Posts: 19
Product link to price in non-default currency [Solved]
« on: October 24, 2017, 08:08:57 am »
Joomla 3.8.1
Virtuemart 3.2.4

Is it possible to create a product page link where the product price is shown in another currency? For example, where the default currency is EUR, and we want to send a link to the product in USD can we generate a link along the lines of:

index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&currency=USD






Ghost

  • Jr. Member
  • **
  • Posts: 377
Re: Product link to price in non-default currency
« Reply #1 on: October 24, 2017, 10:11:03 am »
Yes, use virtuemart_currency_id parameter.

Osearcaigh

  • Beginner
  • *
  • Posts: 19
Re: Product link to price in non-default currency
« Reply #2 on: October 25, 2017, 12:57:46 pm »
Thank you for your answer. It makes sense. I could not see it working in my case though. My base currency is EUR (ID 978) I expected:

index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=1&virtuemart_currency_id=554 to show me the product in NZD, which is configured with an exchange rate and is on the list of vendor accepted currencies. On the list of prices, sales price, tax etc etc, it showed by nothing from any of them. When I manually navigate to this product and select NZD from the currency selector, it works as expected but not via the direct link.

Can you think of anything else I should check, change or look at?



Ghost

  • Jr. Member
  • **
  • Posts: 377
Re: Product link to price in non-default currency
« Reply #3 on: October 25, 2017, 13:17:11 pm »
You need to use ID, not currency code.

ID is not shown on currency page but you can see it in the URL when editing currency, for example: /administrator/index.php?option=com_virtuemart&view=currency&task=edit&cid[]=107. In this case ID is 107.

Osearcaigh

  • Beginner
  • *
  • Posts: 19
Re: Product link to price in non-default currency
« Reply #4 on: October 25, 2017, 14:10:49 pm »
Perfect, thank you for your help Ghost. That works exactly as expected.

For anyone else reading, the codes for each of the currencies I happen to be using are:

USD=144
NZD=107
AUD=9
EUR=47