All Questions

4
votes
3answers
7k views

How to check if a module is enabled/disabled in magento 2

I have 2 stores views and a custom module, lat say module X with an observerv. public function execute(\Magento\Framework\Event\Observer $observer) { $objectManager = \Magento\...
2
votes
0answers
288 views

Change redirect url based on store id

I create an observer for controller_action_predispatch in frontend to redirect site to particular store url like this: public function execute( \Magento\Framework\Event\Observer $observer ...
1
vote
2answers
1k views

Event Observer for specific store

I use this Event Observer on a multistore for a custom URL Structure Manufacturer in product url key. The problem is now that I need this for only one specific store id. How can I set a custom Event ...
2
votes
2answers
2k views

How can I get the correct store context in the product save observer?

I'm using the observer called catalog_product_save_after to track changes to a product. Whenever this observer fires, I don't have access to the store context. I would like to get only the store ...
0
votes
1answer
67 views

Seperate Store for Desktop and Handheld Devices

I need to create separate website for handheld devices and desktop. For that I created a module to make an observer for the event of controller_action_predispatch. My config.xml observer snippet is as ...