I am using this event for my observer: controller_action_layout_load_before
.
This is my method from my observer:
public function controllerActionLayoutLoadBefore(Varien_Event_Observer $observer)
{
/** @var $layout Mage_Core_Model_Layout */
$layout = $observer->getEvent()->getLayout();
$layout->getUpdate()->addHandle('catalog_product_view_custom');
}
For all of the products I need to remove this:
<catalog_product_view>
<reference name="product.info.options.wrapper">
<remove name="product.info.bundle.options" />
</reference>
</catalog_product_view>
But there are always a special case, so for my special case I don't need to remove product.info.bundle.options
. I created my new handle and I m trying to add this back in my local.xml:
<catalog_product_view_whey>
<reference name="product.info.options.wrapper">
<block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle.options" as="type_bundle_options" template="bundle/catalog/product/view/type/bundle/options.phtml">
<action method="addRenderer"><type>select</type><block>bundle/catalog_product_view_type_bundle_option_select</block></action>
<action method="addRenderer"><type>multi</type><block>bundle/catalog_product_view_type_bundle_option_multi</block></action>
<action method="addRenderer"><type>radio</type><block>bundle/catalog_product_view_type_bundle_option_radio</block></action>
<action method="addRenderer"><type>checkbox</type><block>bundle/catalog_product_view_type_bundle_option_checkbox</block></action>
</block>
<action method="insert"><block>product.info.bundle.options</block></action>
</reference>
</catalog_product_view_whey>
For some reason it doesn't work and no errors. Any idea why ?
Thank you!
[UPDATE]
I tried this too:
<catalog_product_view_whey>
<reference name="product.info.options.wrapper">
<x-unremove name="product.info.bundle.options" />
</reference>
</catalog_product_view_whey>
it doesn't work