reach-digital / magento2-storeresolver
Installs: 4 392
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 6
Forks: 2
Open Issues: 1
Type:magento2-module
Requires
- php: ~7.3.0||~7.4.0||~8.1.0||^8.2
Replaces
- honl/magento2-storeresolver: 1.0.7
This package is auto-updated.
Last update: 2024-10-26 10:26:51 UTC
README
You are running a multi store with a specific catalog per domain.
Installation
composer require reach-digital/magento2-storeresolver
Automatic mapping from Domain > Store View
With the new implementation for the StoreResolverInterface
the domains automatically get mapped to the correct store view. This reduces the need to modify code to get new domain names working.
- Register your domain
- Point the A-records to your server
Change index.php, .htaccess or nginx_config file to activate your domain nameStoreResolver
solves this for you.
Add Store Code to Base URL
Store code will be removed from URL if added in the Base URL.
Make sure to explicitly set Base URL for Static View Files
and Base URL for User Media Files
without the store code
It's not possible to have CMS pages with the same identifier as a store code!
Important note:
Base URLs which have no custom string set after the TLD, must be configured at website level, not on store level, else matching on URL can result in multiple stores, see\Ho\StoreResolver\Model\StoreResolver::getAutoResolvedStore
Store scope definition
Known issues
Resolving URLs to stores
Store resolving may fail if configured secure/unsecure URLs differ, see \Ho\StoreResolver\Model\StoreUrls::getBaseUrls
,
which only uses the unsecure base URL but should probably check the right one depending on Request::isSecure()