This plugin can automatically detect the visitor's country based on their browser and set the corresponding currency. The plugin will perform detection on the user's first visit and set cookies to avoid duplicate detection.
##Main characteristics
-Smart Currency Matching: Automatically matches corresponding currencies based on country codes
-* * * Cookie Cache * *: Setting cookies to avoid duplicate detection and improve performance
-* * * Logging * *: Record detection logs for easy analysis and debugging
- ?? **Flexible configuration * *: Cookie retention days
-Multi language support: Supports both Chinese and English interfaces
##Installation method
### 1. Upload file
Install through backend installation
```
### 2. install module
1. Log in to the OpenCart management backend
2. Enter the 'Extension'>'Module'>'Automatic Currency Detection'`
3. Click the 'Install' button (which will automatically create database tables and default configurations)
4. Configure module parameters
5. Enable module
### 3. configuration parameters
-* * Status * *: Module enabled/disabled
-* * Cookie retention days * *: The number of days cookies are saved after setting the currency (1-365 days)
##Working principle
1. * * Language detection * *: The plugin obtains the user's language preference through the browser Accept Language header information
2. * * Country Mapping * *: Map the detected language code to the corresponding country code
3. * * Currency Mapping * *: Map to the corresponding currency code based on the country code
4. * * Currency Verification * *: Check if the currency exists and is enabled in the OpenCart system
5. * * Set Currency * *: Set the detected currency to the user session
6. * * Cookie Cache * *: Set cookies to avoid duplicate detection
##Supported languages and currencies
The plugin supports the mapping of the following main languages to currencies:
|Language Code | Country Code | Currency Code | Language Name|
|---------|---------|---------|---------|
|En US | US | USD | American English|
|En GB | GB | GBP | British English|
|Zh CN | CN | CNY | Simplified Chinese|
|Zh TW | TW | TWD | Traditional Chinese|
|Ja JP | JP | JPY | Japanese|
|Ko KR | KR | KRW | Korean|
|De DE | DE | EUR | German|
|Fr FR | FR | EUR | French|
|ES | ES | EUR | Spanish|
| . .. | . .. | . .. | . .. |
##Technical features
-* * Performance Optimization * *: Use Cookie Cache to Avoid Duplicate Detection
-* * Error Handling * *: A comprehensive error handling mechanism that does not affect the normal operation of the website
-* * Logging * *: Record the detection process for easy debugging and analysis
##Precautions
1. Ensure that the corresponding currency is enabled in the OpenCart system
2. The plugin relies on the browser's Accept Language header information for detection
If the user's browser does not send language information, the plugin will skip detection
4. Regularly clean the detection log table to maintain database performance
5. Pay attention to clearing browser cookies during testing
##Uninstalling method
1. Enter the OpenCart management backend
2. Enter the 'Extension'>'Module'>'Automatic Currency Detection'`
3. Click the 'Uninstall' button (which will automatically delete database tables and configurations)
4. Delete relevant files
##Technical support
If you have any questions or suggestions, please contact the technical support team.
##Version information
-Version: 1.0.0
-Compatibility: OpenCart 3. x
-Last update: 2025
Login and write down your comment.
Login my OpenCart Account