I'm using two modules to manage in stock/out of stock info and configurable product options (custom swatches). And there is also Ajax AddtoCart extension. There three work perfectly on product view page. However, on homepage there is Ajax popup for configurable products which renders streamlined product view with product options and add to cart button. I've managed stock extension by calling its js lib from AjaxCart layout xml and it work fine:
<reference name="head" >
...
<action method="addJs" ifconfig="ajaxcart/viewsetting/enableview"><script>stonepath/configurablestock/varien/configurable.js</script></action>
...
</reference>
So then I've tried adding with head reference js and css for configurable swatches extension and they also load. The original xml of the module looks like this:
<layout>
<PRODUCT_TYPE_configurable>
<reference name="head">
<action method="addJs" ifconfig="easylife_switcher/settings/enabled">
<js>easylife_switcher/event.simulate.js</js>
</action>
<action method="addJs" ifconfig="easylife_switcher/settings/enabled">
<js>easylife_switcher/product.js</js>
</action>
<action method="addCss" ifconfig="easylife_switcher/settings/enabled">
<css>css/easylife_switcher/styles.css</css>
</action>
<action method="removeItem" ifconfig="easylife_switcher/settings/enabled">
<type>skin_js</type>
<name>js/configurableswatches/product-media.js</name>
</action>
<action method="removeItem" ifconfig="easylife_switcher/settings/enabled">
<type>skin_js</type>
<name>js/configurableswatches/swatches-product.js</name>
</action>
</reference>
<reference name="content">
<block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
</reference>
</PRODUCT_TYPE_configurable>
The last part bothers me:
<reference name="content">
<block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
</reference>
I've tried calling this block from ajaxcart layout xml and from local.xml like this:
<PRODUCT_TYPE_configurable>
<reference name="content">
<block type="easylife_switcher/catalog_product_view_type_configurable_config" template="easylife_switcher/catalog/product/view/type/configurable/config.phtml" />
</reference>
</PRODUCT_TYPE_configurable>
Both times it's being completely ignored. Using debugger I can see handle is not loaded at all on the homepage. So how do I call it on the homepage? Or my logic is maybe wrong? Sorry if this may be a trivial question. I'm starting with Magento, have read a lot of answers here with similar problems but wasn't able to figure it out.