0

I am managing now 5 stores in my magento and in future the numbers of store may be increase. My problem is here whenever i create the new store the whole layout dismissed.

enter image description here

I only added the sliders images in cms page and for categories product i have managed the static block for each store. And finally i hard coded the block id into page template.

enter image description here

So, whenever i create the new store i have to write code for categories product static block id into page.

enter image description here

Can someone suggest me how can i manage it, that i wouldn't have to add the block id to call that block in page.

And here is the code i have written for each store static block

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('main-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('beautiful-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cgr-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('fragrances-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('timeline-store')->toHtml(); ?>

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cardles-mothercare')->toHtml(); ?>

1 Answer 1

1

The basic idea with static block is they are inserted as they are with the locale language you have written it. For example you may have stores in English, Spanish etc. language. Than you will write the static blocks in either English or Spanish locale. That is why you will have to create the static blocks every time you create new store.

But if you want your static blocks to apply to each store view irrespective of the locale than you need to do it manually in the database.

Open the table cms_block_store and update the column block_id with value 0 for those static blocks which should remain same for every store view. Magento admin panel is not having any UI way to do this.

Your Answer

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

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