My shop uses several currencies: how to make Google detect the correct currency?

If you are not comfortable with following, don't hesitate to ask your webmaster for help.

If your shop uses multiple currencies you must select "Yes" for the option called "Does your shop use multiple currencies?" (or "Add id_currency in product link" depending on your version of the module) in "Basic Settings" tab of the module:

 

 

Indeed, Google needs to see products prices in the right currency. If not, Google will refuse your feed.

To this end, you must insert in your product URL's a parameter which will enable the prices displaying in the Google expected currency. However, in the PrestaShop standard version, there is no parameter that allows to set the right currency based on the URL. So, we created one. It looks like gmc_currency=1 (or 2,3,4... according to the number assigned to the currency in your PrestaShop).

 

Product URL example :
https://maryshop.com/en/tshirts/1-T-shirts-a-manches-courtes-delaves-1234567891234.html?gmc_currency=2

 

When you activate the "Add id_currency in product link" option, you add this parameter in your product URL's. However, this one will be useless if PrestaShop isn't able to interpret it... Therefore you will also need to override the Tools.php class (that is to say modify the native performance of this class).

By doing it, when Google will check your product URL's, the prices will be in the expected currency.

To do that, follow these steps (valid for Prestashop versions higher or equal to 1.6) :

  1. Go into the /modules/gmerchantcenter/override_files/1.X/classes folder => where 1.X matches with your version of PrestaShop 1.X = 1.6 or 1.7
  2. Copy the Tools.php file
  3. Upload it to the /override/classes/ folder of your PrestaShop installation
  4. Open the /cache/class_index.php file (for PS under 1.7) or /app/cache/prod/class_index.php (for PS 1.7) and look for this code :

    'Tools' => array ('path' => ' ')

  5. Replace it by :

    'Tools' => array ('path' => 'override/classes/Tools.php')

Note : if the Tools.php class has already been overridden, then you will need to have your developer insert the code from our override into his own work.

If your shop uses multiple currencies you must select "Yes" for the option called "Does your shop use multiple currencies?" (or "Add id_currency in product link" depending on your version of the module) in "Basic Settings" tab of the module:

 

 

Then, in order to allow robots from search engines like Google to see the parameter corresponding to the currency in the URLs of your products, you must allow this parameter in the "robot.txt" file of your PrestaShop installation. Follow this procedure:

  1. At the root of your PrestaShop installation, look for the file "robot.txt" and open it with a text editor such as Notepad++
  2. Look for the strings:

    Disallow: /*?id_currency=

    and

    Disallow: /*&id_currency=

  3. Move them in the part of allowed parameters and modify the term "Disallow" by "Allow":

     

  4. Save the "robot.txt" file.

Other FAQs in this category