I need to know what is this container1 and container2 in magento product view page. i am talking about the file view.phtml
in the location app/design/frontend/<package>/<theme>/catalog/product/view.phtml
upadate question:
I have asked this question because.. I came to know that, these sections are responsible for displaying the options in the product view page.
Actually my problem is I have 3 bundle product and I want to display their custom options in my own phtml file. I have these codes with me..
<?php
$id=Mage::getModel('catalog/product')->getIdBySku(123456);
$prod = Mage::getModel('catalog/product')->load($id);
$x=$prod->getOptions();
foreach($x as $y)
{
echo $y->getTitle();
print_r($y->getValues());
}
?>
I need to get the product through it's sku.That is why I coded like this.now I am getting the title correctly. but there values not displaying.(note: I added two dropdown options as my custom options)
Thanks in advance.
Best Answer
These relate to the position in which the product's custom options are displayed.
See
app/code/core/Mage/Catalog/etc/config.xml
:Here you can see that
container1
relates to 'Product Info Column', while container2 is 'Block after Info Column'. These values are describing where the custom options will be displayed on the product view page. You can set these values when editing a product in the Magento admin under the Design tab.The layout blocks are defined in
app/design/frontend/base/default/layout/catalog.xml
:And in
app/design/frontend/base/default/template/catalog/product/view.phtml
you will see two calls:<?php echo $this->getChildChildHtml('container1', '', true, true) ?>
and
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>