Base $ price on gold/silver price?

  • Posts: 55
  • Thank you received: 0
11 years 7 months ago #94840

Hi, I presume that this functionality will require development, but maybe you can give me some advice in any case. I need to create prices in USD based on prices in XAU or XAG: eg, for a Silver American Eagle Coin, price is the silver spot price plus $5. What would be the simplest way to achieve this? Thanks :)

Please Log in or Create an account to join the conversation.

  • Posts: 82727
  • Thank you received: 13342
  • MODERATOR
11 years 7 months ago #95069

Hi,

You can create a new currency XAU or XAG via the menu System->Currencies and then enter the prices of your products in XAU or XAG.
Then, make sure that the USD currency is the "main currency" of the configuration of HikaShop and the system will convert the prices in XAU/XAG into USD and display the USD prices on the frontend. To do the conversion, it will require that you enter the rate of XAU/XAG when you edit then via the menu System->Currencies. So you simply need to update the rate there when it changes. Then, you can potentially build a script to update that rate value automatically based on the XAU/XAG rates on the markets. In that case you can look at how we coded the currency auto update plugin.

The following user(s) said Thank You: jen168

Please Log in or Create an account to join the conversation.

  • Posts: 55
  • Thank you received: 0
11 years 4 months ago #108257

Hi,

Thanks for that, had to put it to one side for a while but getting round to working on that now. Just one thing... Can you please tell me where to find the auto update currency plugin? I can't find it anywhere in the plugins directory... Thanks :)

Please Log in or Create an account to join the conversation.

  • Posts: 82727
  • Thank you received: 13342
  • MODERATOR
11 years 4 months ago #108259

It's in the folder plugins/hikashop/rates on your website.

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum