1

I have created Two stores under two websites in my Magento installation

I have tried following code in my observer method,

$store = Mage::app()->getStore();        
$name = $store->getName();


but it is not giving me correct store name. It always show first store name while I am on the second store.

I am using checkout_controller_onepage_save_shipping_method event

4
  • This must work as it should, also try Mage::app()->getStore()->getFrontendName()
    – Ilja
    Commented May 6, 2016 at 12:49
  • Try this kathirvel.com/…
    – Manikandan
    Commented May 6, 2016 at 12:51
  • 1
    What are you observing? (assume it's a frontend action?) Commented May 6, 2016 at 13:03
  • Post the event name you're observing.
    – laketuna
    Commented May 6, 2016 at 14:04

1 Answer 1

0

For getting store details use

$Store=Mage::app()->getGroup();
$Store->getName();
1
  • I am using Multi store, how can i get products using selected Store Id. Now code like -> justpaste.it/6fi1f. when i use this code its return all my products, how can i display only for selected store products?
    – Gem
    Commented Aug 9, 2018 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.