In the file $MAGENTO_PATHapp/design/frontend/base/default/template/catalog/product/view/options/wrapper.phtml, I see the following line of code:
<?php echo $this->getChildHtml('', true, true);?>
This is responsible for printing the product options on the product page. I want to understand and modify the html content that this line of code produces, but I can’t seem to locate the view or controller relevant to it. For example, let’s say I want to programmatically add the characters to the innerHTML of each option element in a drop down, which phtml, php or html file do I edit?
I’m hoping an answer to this question will help me understand how to retrieve product options, which in turn will help me solve this more immediate problem:
When passing an empty value to any of the getChild functions all the children are used. In this case
getChildHtml(''...returns the result of each of theirtoHtmloutputs.To find out what it’s children are we need to refer to the
catalog.xmllayout file:You might be able to see from that jumbled mess that your wrapper block has an ‘options’ grandchild which has several renderers for the different types of possible options. For the drop-down you’ll probably need to edit
catalog/product/view/options/type/select.phtml.