Reputation: 725
i am desperately looking to move the custom options ( type: radio inputs ) for simple products ( only have simple products ) to the right column.
Right now, it seem like they are showing in a container called "container2" which is at the bottom of the page, and it is called within the view.phtml as follow:
<div class="clearer"></div>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
Container2 is also in the layout file catalog.xml , within the content block.
So what I did is simply move the options wrapper from the reference name="content" block, the a new one: reference name="right" .
For some reason the code is acutally not formated well here and it's also missing some bits so I pasted it here: http://pastebin.com/nhCUXcF4
Basically I can see my options in the right column, but it is like the radio input is not checked when I click on it, because it asks to chose an option again (they are required)
If I leave the options to be in the content block, at the bottom, in the container2 , they work fine as if I click on one, it is checked correctly. If I do not check any and click add to cart, it ask to select a required option.
I think the problem comes from the container1 , container2 thing which I don't really understand. also I see in the catalog XML they are bits of code like
<block type="core/template_facade" name="product.info.container2" as="container2">
<action method="setDataByKey"><key>alias_in_layout</key><value>container2</value> </action>
<action method="setDataByKeyFromRegistry"><key>options_container</key
<key_in_registry>product</key_in_registry></action>
<action method="append"><block>product.info.options.wrapper</block></action>
<action method="append"><block>product.info.options.wrapper.bottom</block></action>
</block>
So basically my question is how can I properly move the required options from the content of view.phtml (product page) to the right column ? Any help would be absolutely appreciated right now. Thanks.
Upvotes: 2
Views: 1395
Reputation: 12809
There's a much simpler way to do this.
instead of using the 3-column, or 2column-right layouts use the 1column layout and then add the right hand column into the product view template file like this:
<div class="col-right sidebar">
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
<?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
</div>
It's a lot easier to change the CSS for the product view page than it is to change the blocks around etc.
Upvotes: 2