<p>It seems the const <code>COMMERCE_PAYMENT_CURRENCY</code> isn't checked and set inside Commerce 2 (It was in Commerce 1)</p>

<p>So I created a PR for this issue:</p>

<p><a href="https://github.com/craftcms/commerce/pull/999" rel="nofollow noreferrer">https://github.com/craftcms/commerce/pull/999</a></p>

CC BY-SA 4.0
2019-09-09T14:30:21.463Z
2019-09-09T14:30:21.463Z
Jason Mayo
<p>I've just done a Craft 2 > Craft 3 upgrade, and it previously used different locales to change the default currency, depending on the locale.</p>

<p>In Craft 2, I would set <code>COMMERCE_PAYMENT_CURRENCY</code> in my index.php file (<a href="https://docs.craftcms.com/commerce/v2/payment-currencies.html#switching-currencies" rel="nofollow noreferrer">https://docs.craftcms.com/commerce/v2/payment-currencies.html#switching-currencies</a>) so that it would set the currency for that specific site.</p>

<p>But in Commerce 2 this doesn't seem to be working at all.</p>

<p>My current setup is:</p>

<pre><code>/web 
   index.php
   /europe
      index.php
</code></pre>

<p>And in the <code>/europe/index.php</code> I've got:</p>

<pre><code>&lt;?php
/**
 * Craft web bootstrap file
 */

// Set path constants
define('CRAFT_BASE_PATH', dirname(__DIR__, 2));
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');

define('CRAFT_SITE', 'en_eur');

define('COMMERCE_PAYMENT_CURRENCY', 'EUR');

// Load Composer's autoloader
require_once CRAFT_VENDOR_PATH.'/autoload.php';

// Load dotenv?
if (class_exists('Dotenv\Dotenv') &amp;&amp; file_exists(CRAFT_BASE_PATH.'/.env')) {
    Dotenv\Dotenv::create(CRAFT_BASE_PATH)-&gt;load();
}

// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
$app-&gt;run();

</code></pre>

<p>I know this  file is being picked up when I go to <code>http://website.local/europe</code>, because if I delete the contents, or change the <code>CRAFT_SITE</code> it reacts correctly.</p>

<p>Just not working for Commerce 2.</p>

<plugin-craftcommerce><plugin-craftcommerce2>
Craft 3 / Commerce 2 + Multisite & COMMERCE_PAYMENT_CURRENCY
# Craft 3 / Commerce 2 + Multisite & COMMERCE_PAYMENT_CURRENCY

(Asked by: username_0 on 2019-09-06)

I've just done a Craft 2 > Craft 3 upgrade, and it previously used different locales to change the default currency, depending on the locale.
In Craft 2, I would set COMMERCE_PAYMENT_CURRENCY in my index.php file (https://docs.craftcms.com/commerce/v2/payment-currencies.html#switching-currencies) so that it would set the currency for that specific site.
But in Commerce 2 this doesn't seem to be working at all.
My current setup is:
/web 
   index.php
   /europe
      index.php

And in the /europe/index.php I've got:
load();
}

// Load and run Craft
define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
$app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
$app->run();


I know this  file is being picked up when I go to http://website.local/europe, because if I delete the contents, or change the CRAFT_SITE it reacts correctly.
Just not working for Commerce 2.

**Tags:** plugin-craftcommerce, plugin-craftcommerce2


---

## 1 answers

### Answer by username_0 on 2019-09-09. Score: 1 | Accepted answer

It seems the const `COMMERCE_PAYMENT_CURRENCY` isn't checked and set inside Commerce 2 (It was in Commerce 1)

So I created a PR for this issue:

<https://github.com/craftcms/commerce/pull/999>


---

