VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: andain86 on April 08, 2015, 11:16:41 AM

Title: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: andain86 on April 08, 2015, 11:16:41 AM
How to change bank in ConvertECB to Russian CRB

plus

Need to increase the frequency of exchange rate updates

Joomla 3.3.6 Virtuemart 3.0.6
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: GJC Web Design on April 08, 2015, 11:30:32 AM
ECB rates are got by administrator\components\com_virtuemart\plugins\currency_converter\convertECB.php

guess you need to clone and rewrite this
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: andain86 on April 08, 2015, 11:37:28 AM
Is it enough to change only this ?

var $document_address = 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml';

   var $info_address = 'http://www.ecb.int/stats/eurofxref/';
   var $supplier = 'European Central Bank';
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: GJC Web Design on April 08, 2015, 11:39:23 AM
no idea - try it - what's the worst that could happen?
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: andain86 on April 08, 2015, 11:40:05 AM
and is it necessary to create new one (convertCRB.php) or i can just change the original one?
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: andain86 on April 08, 2015, 11:43:05 AM
Quote from: GJC Web Design on April 08, 2015, 11:39:23 AM
no idea - try it - what's the worst that could happen?
the problem is that i can't see any changes online
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: andain86 on April 08, 2015, 11:51:50 AM
/cache/daily.xml has been created few mins ago

but prices in admin panel seem as the rate is 1x1
Title: Re: How to change bank in ConvertECB to Russian CRB (or another one)
Post by: GJC Web Design on April 08, 2015, 12:18:20 PM
the likelihood of CRB returning the exact same formatted xml as ECB are probably nil

you have to do some proper research/coding to change this I guess