Skip to main content

Shop Settings Configuration

Shop settings control the core behavior of your EverShop store, including language, currency, and regional preferences. These settings are configured in the config/ directory.

Configuration Files

EverShop uses a hierarchical configuration system with environment-specific overrides:
  • config/default.json - Base configuration for all environments
  • config/development.json - Development environment overrides
  • config/production.json - Production environment overrides
Configuration files are merged at runtime. Environment-specific files override values from default.json.

Shop Configuration Schema

The shop settings are defined under the shop key in your configuration files.

Language Setting

shop.language
string
required
The default language code for your store. This determines which translation files are loaded from the translations/ directory.Supported values: ISO 639-1 language codes (e.g., en, es, fr, de)Default: es

Currency Setting

shop.currency
string
required
The default currency code for your store. This affects product pricing, checkout, and order displays.Supported values: ISO 4217 currency codes (e.g., USD, EUR, GBP, MXN)Default: USD

Configuration Examples

Basic Shop Configuration

Here’s a typical shop configuration from config/default.json:
{
  "shop": {
    "language": "es",
    "currency": "USD"
  }
}

Multi-Environment Setup

{
  "shop": {
    "language": "es",
    "currency": "USD"
  }
}
Development environment typically mirrors production settings for consistency.
{
  "shop": {
    "language": "es",
    "currency": "USD"
  }
}
Production configuration should match your target market’s language and currency.

Language Configuration

Translation Files

Translation files are stored in the translations/{language}/ directory. Each language has separate CSV files for different modules:
translations/
└── es/
    ├── catalog.csv      # Product catalog translations
    ├── checkout.csv     # Checkout process translations
    ├── customer.csv     # Customer account translations
    └── general.csv      # General UI translations

Adding a New Language

To add support for a new language:
  1. Create a new directory under translations/ with the language code:
    mkdir translations/en
    
  2. Copy and translate the CSV files from an existing language:
    cp translations/es/*.csv translations/en/
    
  3. Update the shop configuration:
    {
      "shop": {
        "language": "en"
      }
    }
    
  4. Rebuild the application:
    npm run build
    
Changing the language or currency setting requires rebuilding the application with npm run build for changes to take effect.

Currency Configuration

Supported Currencies

EverShop supports any ISO 4217 currency code. Common examples:
Currency CodeCurrency NameSymbol
USDUS Dollar$
EUREuro
GBPBritish Pound£
MXNMexican Peso$
CADCanadian Dollar$

Currency Display

Currency formatting is automatically handled based on the configured currency code:
{
  "shop": {
    "currency": "USD"
  }
}
This will format prices as: $99.99

Changing Currency

To change your store’s currency:
  1. Update the configuration file:
    {
      "shop": {
        "currency": "EUR"
      }
    }
    
  2. Rebuild the application:
    npm run build
    
  3. Update your product prices to reflect the new currency
EverShop does not automatically convert prices when you change the currency. You’ll need to update product prices manually or via import.

Best Practices

Environment-Specific Settings

Use environment-specific configuration files for different deployment stages:
  • Development: Use test currency and language settings
  • Production: Use your target market’s language and currency

Configuration Management

  1. Version Control: Commit default.json and environment files to version control
  2. Secrets: Never store sensitive data in configuration files (use .env instead)
  3. Documentation: Document any custom configuration values for your team

Rebuilding After Changes

Any changes to configuration files require a rebuild:
# Development
npm run dev  # Auto-rebuilds on changes

# Production
npm run build && npm run start

Common Issues

Ensure that:
  1. Translation files exist in translations/{language}/
  2. The language code matches exactly (case-sensitive)
  3. You’ve rebuilt the application after adding translations
  4. CSV files are properly formatted with correct encoding (UTF-8)
Verify:
  1. The currency code is a valid ISO 4217 code
  2. Your browser supports the currency symbol
  3. The application has been rebuilt after configuration changes

Next Steps