Magento Resource | E-Commerce Generation Explorer



How to determine Store ID for multi-type Magento site

Here is a quick reference for you, if you run Magento under Multi-language, Multi-Currency or Multi-Domain (Multi-Website).

Sometime you need pick up the Store ID do some (IF…ELSE…) work. Here is the code:

<?php $store_id = $this->helper('core')->getStoreId(); echo $store_id; ?>

· ·


  • Jeremy · 30/03/2010 at 14:46

    Where do I put this code?

  • Admin comment by admin · 30/03/2010 at 15:10

    Put on the HTML/PHTML which you want to use these code. For example, homepage…

  • Merk · 15/03/2012 at 15:43

    Thanks buddy.
    You save my lot time.
    Thanks for sharing…

Leave a Reply



Theme Design by