How to manipulate Prestashop 1.7.x currency exchange rate using a fixed variable?

376 Views Asked by At

In Prestashop 1.7 the auto currency exchange rate automatically updates the currency rates, but I would like to add a manipulation to the rates. For example 1 USD = 75 INR, but with a manipulation of 10%, I would want 1 USD = 75(1 + 10%) = 82.5 INR.

How to permanently add this manipulation of 10% such that whenever the live exchange rate button is clicked, the current exchange rate + 10% is calculated in the tables?

I could manually edit all the exchange rates by 10% but that is a tedious task so a permanent solution for the same would be faster.

1

There are 1 best solutions below

0
On

Currency referesh cron is calling Currency::refreshCurrencies() method, that is calling refreshCurrency function inside /classes/currency.php

So you can either edit or override this method to follow your 10% increase logic.