Simple Commerce Logo

Multi-site

Simple Commerce has first-party support for being used with Statamic's multi-site functionality.

In fact it's the way we'd recommend implementing multi-currency or multi-country sites. Each currency/country should be it's own Statamic site.

Each Statamic site you have setup in your config/statamic/sites.php config should also be setup in the Simple Commerce config (located at config/simple-commerce.php)

1/*
2 |--------------------------------------------------------------------------
3 | Sites
4 |--------------------------------------------------------------------------
5 |
6 | For each of your Statamic sites, you can setup a new store which allows you
7 | to use different currencies, tax rates and shipping methods.
8 |
9 */
10 
11'sites' => [
12 'default' => [
13 'currency' => 'GBP',
14 
15 'tax' => [
16 'rate' => 20,
17 'included_in_prices' => false,
18 ],
19 
20 'shipping' => [
21 'methods' => [
22 \DoubleThreeDigital\SimpleCommerce\Shipping\StandardPost::class,
23 ],
24 ],
25 ],
26],

When you create an additional Statamic site, just add a new key to the sites array, like so:

1'sites' => [
2 'default' => [...],
3 'french' => [...],
4],

Remember that the site key will need to be the same one as used in your sites.php configuration file.

🔥 Hot Tip: Also remember that if you're wanting to use multiple sites, you'll need to purchase & enable Statamic Pro.

With each site you can configure the currency being used and the tax rate applied to products in the customers' cart.

Code highlighting proudly provided by Torchlight.

Need some help?

There's plenty of ways of getting help: either via opening a GitHub Issue, starting a conversation on the Statamic Discord or directly emailing me.