Magento - product options view or controller file -
in file $magento_pathapp/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml
, see following line of code:
<?php echo $this->getchildhtml('', true, true);?>
this responsible printing product options on product page. want understand , modify html content line of code produces, can't seem locate view or controller relevant it. example, let's want programmatically add characters innerhtml of each option element in drop down, phtml, php or html file edit?
i'm hoping answer question me understand how retrieve product options, in turn me solve more immediate problem:
when passing empty value of getchild functions children used. in case getchildhtml(''...
returns result of each of tohtml
outputs.
to find out it's children need refer catalog.xml
layout file:
<block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label"> <label>info column options wrapper</label> <block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/> <block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml"> <action method="addoptionrenderer"><type>text</type><block>catalog/product_view_options_type_text</block><template>catalog/product/view/options/type/text.phtml</template></action> <action method="addoptionrenderer"><type>file</type><block>catalog/product_view_options_type_file</block><template>catalog/product/view/options/type/file.phtml</template></action> <action method="addoptionrenderer"><type>select</type><block>catalog/product_view_options_type_select</block><template>catalog/product/view/options/type/select.phtml</template></action> <action method="addoptionrenderer"><type>date</type><block>catalog/product_view_options_type_date</block><template>catalog/product/view/options/type/date.phtml</template></action> </block> <block type="core/html_calendar" name="html_calendar" as="html_calendar" template="page/js/calendar.phtml"/> </block>
you might able see jumbled mess wrapper block has 'options' grandchild has several renderers different types of possible options. drop-down you'll need edit catalog/product/view/options/type/select.phtml
.
Comments
Post a Comment