0

Offering a global discount on all products for specific holiday period.

Want to add the same header image as global category static block to appear on all category pages to promote the sale.

Is the only way to add static block in display manually for each category or by modifiying xml or phtml files?

Been searching and can't seem to find any easy way to do it.

regards

Marius
199k55 gold badges431 silver badges837 bronze badges
asked Nov 24, 2014 at 15:25

2 Answers 2

2

You can add this to your local.xml

<!-- catalog category default -->
 <catalog_category_default translate="label">
 <reference name="content">
 <block type="cms/block" name="promo_block" before="-">
 <action method="setBlockId"><block_id>promo_block</block_id></action>
 </block> 
 </reference>
 </catalog_category_default>
<!-- catalog category layered -->
 <catalog_category_layered translate="label">
 <reference name="content">
 <block type="cms/block" name="promo_block" before="-">
 <action method="setBlockId"><block_id>promo_block</block_id></action>
 </block> 
 </reference>
 </catalog_category_layered>
<!-- catalog search result index -->
 <catalogsearch_result_index translate="label">
 <reference name="content">
 <block type="cms/block" name="promo_block" before="-">
 <action method="setBlockId"><block_id>promo_block</block_id></action>
 </block> 
 </reference>
 </catalogsearch_result_index>
<!-- catalog search advanced index -->
 <catalogsearch_advanced_index translate="label">
 <reference name="content">
 <block type="cms/block" name="promo_block" before="-">
 <action method="setBlockId"><block_id>promo_block</block_id></action>
 </block> 
 </reference>
 </catalogsearch_advanced_index>
<!-- catalog search advanced result -->
 <catalogsearch_advanced_result translate="label">
 <reference name="content">
 <block type="cms/block" name="promo_block" before="-">
 <action method="setBlockId"><block_id>promo_block</block_id></action>
 </block> 
 </reference>
 </catalogsearch_advanced_result>

This will show static block before everything in the category pages and search pages, and you can change before="-" to before="product_list" to show the category title first.

answered Nov 24, 2014 at 15:36
0

You can add Static Block and then add it in Widget with Layout Update for All Anchor and Non-Anchor Categories.

answered Nov 24, 2014 at 20:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.