I've a module in magento which is creating a new view of the product page, by calling a new options.phtml file.
the problem I have is that if I call, via ajax, this modified product page view, with the custom options.phtml file, (url is -> example.com/ajax/index/options/product_id/16490/
) magento saves a cached version of it. Later if I go and visit the product page (normal magento product page NOT AJAX) the page loads the cached version of the custom options.phtml output and not the default one... and that's a problem because there's no photos product info etc. only the sizes and buy button plus header & footer
I've looked around and I think it might be the XML file, that I have in /app/design/frontend/default/MyTheme/layout/ajax.xml
here's the content of the file:
<?xml version="1.0"?>
<layout version="0.1.0">
<catalog_category_default>
<reference name='product_list'>
<action method='setTemplate'><template>ajax/catalog/product/view/list.phtml</template></action>
</reference>
</catalog_category_default>
<catalog_category_layered>
<reference name='product_list'>
<action method='setTemplate'><template>ajax/catalog/product/view/list.phtml</template></action>
</reference>
</catalog_category_layered>
<ajax_index_options>
<reference name="root">
<action method="setTemplate"><template>page/empty.phtml</template></action>
</reference>
<reference name="head">
<action method="addJs"><script>varien/product.js</script></action>
<action method="addJs"><script>varien/configurable.js</script></action>
</reference>
<reference name="content">
<block type="catalog/product_view" name="product.info" template="ajax/catalog/product/options.phtml">
<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="ajax/catalog/product/view/addtocart.phtml"/>
<block type="catalog/product_view" name="product.info.options.wrapper" as="product_options_wrapper" template="catalog/product/view/options/wrapper.phtml" translate="label">
<label>Info Column Options Wrapper</label>
<block type="core/template" name="options_js" template="catalog/product/view/options/js.phtml"/>
<block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
<action method="addOptionRenderer">
<type>text</type>
<block>catalog/product_view_options_type_text</block>
<template>catalog/product/view/options/type/text.phtml</template>
</action>
<action method="addOptionRenderer">
<type>file</type>
<block>catalog/product_view_options_type_file</block>
<template>catalog/product/view/options/type/file.phtml</template>
</action>
<action method="addOptionRenderer">
<type>select</type>
<block>catalog/product_view_options_type_select</block>
<template>catalog/product/view/options/type/select.phtml</template>
</action>
<action method="addOptionRenderer">
<type>date</type>
<block>catalog/product_view_options_type_date</block>
<template>catalog/product/view/options/type/date.phtml</template>
</action>
</block>
</block>
<block type="catalog/product_view" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="catalog/product/view/options/wrapper/bottom.phtml" translate="label">
<label>Bottom Block Options Wrapper</label>
<action method="insert"><block>product.tierprices</block></action>
<block type="catalog/product_view" name="product.clone_prices" as="prices" template="catalog/product/view/price_clone.phtml"/>
<action method="append"><block>product.info.addtocart</block></action>
<action method="append"><block>product.info.addto</block></action>
</block>
<block type="core/template_facade" name="product.info.container1" as="container1">
<action method="setDataByKey"><key>alias_in_layout</key><value>container1</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>
<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>
<action method="unsetCallChild">
<child>container1</child>
<call>ifEquals</call>
<if>0</if>
<key>alias_in_layout</key>
<key>options_container</key>
</action>
<action method="unsetCallChild">
<child>container2</child>
<call>ifEquals</call>
<if>0</if>
<key>alias_in_layout</key>
<key>options_container</key>
</action>
</block>
</reference>
</ajax_index_options>
</layout>