Question

I know that magento process catalog_category_view handle (category action handle) before processing catalog_category_default or catalog_category_layered (category layout definition handles ).

Magento is using category layout definition handles for defining category layouts. Especially these handles actually defines product_list block. But if you look on bundle.xml file, you can see this code snippet

<catalog_category_view>
    <reference name="product_list">
        <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
    </reference>
</catalog_category_view>

Since product_list block is not existing when magento process catalog_category_view, then what this code actually stands for !!!!

For me, it seems that they are doing nothing...

Was it helpful?

Solution 2

It seems that no one is answering my own question and hence I want to share my conclusion on this topic.

If you inspect bundle.xml, you can see these layout update codes.

<catalog_category_view>
    <reference name="product_list">
        <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
    </reference>
</catalog_category_view>

<catalog_category_layered>
    <reference name="product_list">
        <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
    </reference>
</catalog_category_layered>

<catalog_product_compare_index>
    <reference name="catalog.compare.list">
        <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
    </reference>
</catalog_product_compare_index>

Here we can see that every layout handles holds the same content. Though the layout updates inside the layout update handle catalog_category_view is irrelevant, the other two layout update handles will get into action depending up on the type of category requested.

May be the core team did a wrong assignment in this case.

OTHER TIPS

It adds the renderer for Bundled Product Prices to the product_list block, so that when it trys to render price via <?php echo $this->getPriceHtml($_product, true) ?> in your catalog/product/list.phtml file you get the price rendered out properly for your product type. In the case of Bundled Products it might say something like Starting At or As Low As depending on the theme you're using, or if you've added bundle/catalog/product/price.phtml to your theme to customize it.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top