magento set store id programmatically

前端 未结 3 593
一生所求
一生所求 2021-02-06 00:56

I am currently working on a magento site that is in 2 languages (French and Dutch). The approach I am taking is as follows:

  • Create a folder in the web root (named
3条回答
  •  忘掉有多难
    2021-02-06 02:00

    After hours of huffing and puffing i was able to figure out a way to set the store id programatically :)

    In the index.php file, (in your language specific folder), add the following:-

    $store_id = 'your_store_id_here';
    $mageRunCode = 'store view code';
    $mageRunType = 'store';
    
    Mage::app()->setCurrentStore($store_id);
    Mage::run($mageRunCode, $mageRunType);
    

    Hope someone will find this information useful :)

提交回复
热议问题