I have a multi-store site. Currently I need to add a custom step in Magento's one step checkout but it needs to be visible in a single store only. I followed a tutorial by excellencemagentoblog. But now i'm confused on how to enable it in one store view and disable in another. any ideas??


I'd suggest to create a system config setting which allows to choose the single store. Whether you provide the system.xml for this is up to you, but you can at least declare it in your module's config XML under e.g. stores/store_code/[module]/[whatever]/store_id.

Then in your layout XML you can use the ifconfig="[module]/[whatever]/store_id" directive which will read this value and conditionally include the altered javascript, additional blocks, and changed templates.

| improve this answer | |

The only way I can think of is, to check in every code you add whether you in the right store.

And I highly dislike this answer.

if(Mage::app()->getStore()->getId() == 7) {
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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