Hello,
We have a wishlist module with two template on the homepage.
One of the template is ok (The number of product in our wishlist display in the menu. The number is not cached and changes when you add / remove a product in your wishlist)
But the button to add / remove a product in the wishlist is cached and never change.
It's called from a hook using the renderWidget function :
How it should look :
But the "heart button" to add on wishlist never change his state. If I click on the second product "heart button" and refresh, the heart will still being empty
How can I exclude this from being cached ?
Thank you for your help !
We have a wishlist module with two template on the homepage.
One of the template is ok (The number of product in our wishlist display in the menu. The number is not cached and changes when you add / remove a product in your wishlist)
But the button to add / remove a product in the wishlist is cached and never change.
It's called from a hook using the renderWidget function :
PHP:
public function renderWidget($hookName = null, array $params = [])
{
switch($hookName) {
case 'displayNav':
//Fetch the .tpl file to show how many product is in the wishlist with the correct information
break;
case 'displayAfterThumbnailProduct':
//fetch the .tpl fil to display the add to wishlist button with different state
break;
default:
//just is case
return 'ko';
}
}
But the "heart button" to add on wishlist never change his state. If I click on the second product "heart button" and refresh, the heart will still being empty
How can I exclude this from being cached ?
Thank you for your help !