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

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.

0

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

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.