开发者

Magento PLugin Multi store Disable/Enable functionality

I had developed an extension. Now my client after having another store within same magento platform (multistore functionality) wants to disable "ex开发者_StackOverflowtesnion" on one store and enable on other.

I am stuck, can't have whole day reading magento docs, as I have other 3 clients/project ongoing, still want to help out this magento guy.

I would be happy if someone could give me answer to "How to make magento plugin to be available to turn on/off per store in multistore magento copy?"

I would also appreciate if anyone could just give me directions where to dig!

thanks a lot!


I can't find the previous question that answered a simple thing, hopefully someone can dredge it up. Basically, create a store-level configuration option to enable/disable functionality. Then, when invoking your new functionality (which I'm sure has been properly kept within your module's classes):

function doSomethingSpecial() {
    if(!$this->moduleIsEnabledForStore()) { return; }
    ... do your thing ...
}

There is no clean way to disable the module otherwise through Magento's default interfaces, but this is actually a very clean proxy.

Thanks, Joe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜