How Can I Set Magento Store Id Programatically

How can I set current Magento store by store id programmatically

You can use use setCurrentStore and then call Mage::run to set current Magento store by store id programmatically

$store_id = 'store id';
$mageRunCode = 'store view code';
$mageRunType = 'store';

Mage::app()->setCurrentStore($store_id);
Mage::run($mageRunCode, $mageRunType);
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments