Jump to content

disable cache on productscategory module


_AtoWeb_

Recommended Posts

I am having a problem on a PS (1.6.1.4 with the Lab Milano theme) on the "productscategory" module ("other products in the same category"): the small thumbnails of each  product are all the same, with a link to the same product. Whereas under each image the names and links to the products are the right ones.

This problem disappears if I disable or clear the cache. I deduce that the problem comes from the cache.

How to disable the cache for this module, or at least for the function that loads images and links on images?

Thanks for your help.

Link to comment
Share on other sites

You should first confirm if you are using the core productscategory module, or one that was customized and included with your theme.

If it came from the theme, then the best thing for you to do is notify the theme author of the issue and request they fix it for you.

Otherwise you would have to edit the productscategory main class file, locate where the module hooks into the product page, and confirm if the module is using a cache, and then remove that code.

Link to comment
Share on other sites

In the main php file of the module (productscategory.php)  look after the name of the tpl file that displays the content. It's usually in a function that starts with hookDisplay and looks similar to this:

return $this->display(__FILE__, 'filename.tpl', $this->getCacheId('cache-id'));

Then you could try to put at the beginning of the function:

$this->_clearCache('filename.tpl', 'cache-id');

If it does not have a cache-id, ignore the second parameter.

Edited by premiumpresta (see edit history)
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...