Questions tagged [store-code]
The store-code tag has no summary.
20 questions
0 votes
1 answer
45 views
magento 2 map urls based on store codes instead of store views
I wanna map urls based on store code instead of store views which is default functionality but cann't do that I have tried many solutions but wont work.I also check it admin configurations but wont ...
0 votes
1 answer
59 views
Remove Store Code from Header
I'm trying to use an extension to manage our hreflang tags, but when it generates the tags, it adds the default store code to the URL. As the default store code was removed from the URL, it creates an ...
3 votes
2 answers
1k views
Magento2 multiwebsite multistore sharing storeview code
We have a Magento 2.4 project with multiple websites with multiple stores & we need to share some "store codes" in url terms for store views. All store views should load under same ...
2 votes
1 answer
1k views
Magento 2 - How to add specific base url for store
In Magento 2 I try to add specific base url for store view. This is my configuration : My website 1 contains two store view : Store view 1 : my_store_view_1 Store view 2 : my_store_view_2 Base urls ...
0 votes
1 answer
464 views
How can I get the store code inside a block in the product page using the dependency injection?
I have to check which is the current store view. In order to do that I was using the Object Manager to get the store code like this: $storeCode = \Magento\Framework\App\ObjectManager::getInstance() ...
1 vote
2 answers
2k views
Magento 2 Custom GET REST API ready store code from url
I have a custom REST API url: <route url="/V1/vendor/module/id/:Id" method="GET"> <service class="Vendor\Module\Api\ModuleRepositoryInterface" method="get"/> <resources&...
1 vote
1 answer
855 views
How to get the store code in a phtml file of Magento2?
In a custom phtml file I have to get the code associated to the store view (not the Id), any idea how to get this?
0 votes
2 answers
409 views
Magento2 - multistore using different domains, relative folder in base url & store codes... language switcher broken
This is a Magento 2.3.2 CE project Let's assume url of default storeview is https://www.domain.com/store/es Url of second storeview is https://www.domain.pt/pt Language switcher gives error, ...
0 votes
1 answer
1k views
Magento 2 multiple websites. Do i need to set "Add the store code to the base URL" to yes
Following documentation in admin panel I've added second website. On each website (default and new) I have exactly one unique store and for each store I have exactly one unique view. Like below ...
1 vote
1 answer
877 views
Magento 2.2 - How to redirect url with store code to url without store code?
The site is been indexed on Google with Store Code for each store view (it/en/gb/au) now the store codes are been removed from url, so all the links end up in a 404 error. How can I set an automatic ...
3 votes
1 answer
2k views
Get store code, not store view code
Using the StoreManagerInterface I am getting the current store via $store = $this->storeManager->getStore(). I then want to get the code of the store. However, when using $store->getCode() ...
0 votes
3 answers
7k views
Magento2 multistore - redirect url without store code to default storeView url
Not sure if this is a bug in this project, or a Magento2 bug itself The question is site is configured to use store code in urls, and that's working fine... but urls without any store code are loading ...
0 votes
1 answer
766 views
can't access website after adding store code to url
I am using magento 2.2.2 My store was working fine till I added store code to urls so I am no longer able to access my website using my website url mystore.com I have to add store code to access ...
7 votes
5 answers
36k views
Get Store ID by store code Magento 2
How to get Store ID by store code in Magento 2 Thanks
0 votes
1 answer
1k views
Add Store Codes to URL
In admin panel under Url options, I want to turn on Store codes on Url, since I want to visit my country-specific pages. I'm running locally (using WAMP) so my IP is 127.0.0.1:8888. I did set my host ...