lechowski / 13.11.2021

Force currency in checkout

A customer had two coins in his store, dollars and Argentine peso. The default currency is pesos, but I wanted the checkout to be dollars. To do this we edit the file classes / Tools.php. The function we are going to edit is the displayPrice that looks like this:

And we modify the code marked by this:

== 'order' specifies that the currency changes when the user is in the checkout

(int) 1 is the id of currency 1 and (int) 2 is the id of currency 2.

 

Then we will delete the file class_index.php from the cache folder so that the changes are visible.