Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

PRODUCT_TYPE_ selector in magento layout xml
 
marcM
Jr. Member
 
Total Posts:  7
Joined:  2008-04-11
 

I am trying to reuse the call to
<?php echo $this->getChildHtml('product_type_data') ?>
from template/catalog/product/view.phtml
in template/review/product/detailed.phtml

The point of difficulty is reusing a section from
app/design/frontend/default/default/layout/catalog.xml

<!--
Additional block dependant on product type
-->
    <
PRODUCT_TYPE_simple>
        <
reference name="product.info">
            <
block type="catalog/product_view_type_simple" name="product.info.simple" as="product_type_data" template="catalog/product/view/type/simple.phtml"/>
        </
reference>
    </
PRODUCT_TYPE_simple>
    <
PRODUCT_TYPE_configurable>
        <
reference name="product.info">
            <
block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/configurable.phtml"/>
        </
reference>
    </
PRODUCT_TYPE_configurable>
    <
PRODUCT_TYPE_grouped>
        <
reference name="product.info">
            <
block type="catalog/product_view_type_grouped" name="product.info.grouped" as="product_type_data" template="catalog/product/view/type/grouped.phtml"/>
        </
reference>
    </
PRODUCT_TYPE_grouped>

I added the above code just before the closing layout tag in
app/design/frontend/default/default/layout/review.xml
thinking that it should add a block to the reference block defined in my review_product_list

<reference name="content">
            <
block type="review/list_detailed" name="product.info" template="review/product/detailed.phtml">

It appears that the PRODUCT_TYPE_ reference is not being added.  I can manually add one of the blocks under product.info and it works fine.

Any help on why the PRODUCT_TYPE_ tag is being ignored or what else I need to set?

 
Magento Community Magento Community
Magento Community
Magento Community
 
marcM
Jr. Member
 
Total Posts:  7
Joined:  2008-04-11
 

Can anybody explain how the PRODUCT_TYPE_ selectors work in layout xml files?

 
Magento Community Magento Community
Magento Community
Magento Community
 
husby
Member
 
Avatar
Total Posts:  72
Joined:  2009-01-07
Roseville, MN
 

I’m stuck on this too, except I want to put the grouped product options on the category listing page.  I’ve been going through, trying everything it seems, but I can’t get the xml and the template file to work together.

Help anyone, please???

 
Magento Community Magento Community
Magento Community
Magento Community
 
melilienua
Jr. Member
 
Total Posts:  2
Joined:  2009-03-11
 
husby - 14 January 2009 07:21 PM

I’m stuck on this too, except I want to put the grouped product options on the category listing page.  I’ve been going through, trying everything it seems, but I can’t get the xml and the template file to work together.

Help anyone, please???

Exactly the same thing here, it seems I can’t find for the life of me how to use the product_type block in the category listing page.
Does anybody know how to do it?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top