The MAGE_RUN_TYPE
parameter in Magento specifies the scope of the store switch that is being requested. There are two possible values for MAGE_RUN_TYPE
: store
and website
.
When MAGE_RUN_TYPE
is set to store
, Magento will switch the current store view to a different store view within the same website. In this case, the MAGE_RUN_CODE
parameter should be set to the code of the target store view.
When MAGE_RUN_TYPE
is set to website
, Magento will switch the current website to a different website. In this case, the MAGE_RUN_CODE
parameter should be set to the code of the target website.
So the main difference between store
and website
is the scope of the switch. If you want to switch between store views within the same website, you should use store
, and if you want to switch between different websites, you should use website
.
Here’s an example to help illustrate the difference:
Suppose you have two websites set up in Magento, website1
and website2
, each with two store views: storeview1
and storeview2
. If you want to switch from storeview1
in website1
to storeview2
in website1
, you should set MAGE_RUN_TYPE
to store
, and set MAGE_RUN_CODE
to storeview2
. If you want to switch from storeview1
in website1
to storeview1
in website2
, you should set MAGE_RUN_TYPE
to website
, and set MAGE_RUN_CODE
to website2
.