This topic has 8 replies, 3 voices, and was last updated 7 months, 2 weeks ago ago by Jack Richardson
Hello,
I enabled the XStore Wishlist, but there is a problem on product and category pages.
The Wishlist icon gets cached, so other users see it in the status when the page was cached.
Shouldn’t it work with ajax like the “add to cart” button, which remains uncached?
We use LiteSpeed cache plugin.
Regards
Hello, Apolloneos,
Thank you for reaching out to us with your concern regarding the XStore Wishlist functionality on your product and category pages. We understand the importance of ensuring a seamless user experience on your website.
Could you please confirm if disabling the cache plugin resolves the issue?
Please provide the URL and temporary wp-admin access.
Best Regards,
8Theme’s Team
Hi,
yes when disabling the cache there is no problem.
As logged in user you can see the pages uncached.
Regards
Hello, Apolloneos,
We appreciate your prompt response.
Please try adding
xstore_wishlist_ids
xstore_wishlist_ids_0
in Reject Cookies field of cache plugin, for example – https://www.8theme.com/topic/wishlist-removed-items-reappear-after-page-reload-only-when-not-logged-in/#post-345307
If you can’t find where exactly this should be added, contact the cache plugin author to get help.
Best Regards,
8Theme’s Team
Hi,
yes I tried this before, but all pages are shown as uncached then.
This is ok when there are products in wishlist.
However, if we remove the products from wishlist (one by one) the cookie xstore_wishlist_ids_0 remains (with empty value), so pages are still shown as uncached.
I see that in wishlist page the “remove all” action deletes this cookie completely. If the cookie is deleted when it has an empty value, this maybe a solution.
Of course, the best option would be to make wishlist button to work with ajax, like the add to cart button.
Regards
Hello @Apolloneos,
Thank you for bringing up this concern. We’ve encountered a similar question regarding issues with excluding certain cookies from Litespeed cache on the plugin’s forum (https://www.litespeedtech.com/support/forum/threads/exclude-cookies-does-not-seem-to-be-working.21151/).
We suggest double-checking if your .htaccess file allows the Litespeed plugin configuration to provide exclusions for specific cookies. Additionally, reaching out to their support team might be beneficial, as they possess in-depth knowledge of the plugin’s code architecture and can offer tailored assistance.
Best regards,
Jack Richardson
Hello,
I had added the cookie “xstore_wishlist_ids_0” to exclusions and users with products added to wishlist see all pages uncached. This is ok.
However, as I wrote before, if the user removes all the products from wishlist (one by one) the cookie xstore_wishlist_ids_0 remains with empty value, so all pages are still shown as uncached. The cookie must be deleted, in order to see the pages as cached again.
We have found a temporary solution for this, by adding this code:
if (isset($_COOKIE['xstore_wishlist_ids_0']) && $_COOKIE['xstore_wishlist_ids_0'] === '') { setcookie('xstore_wishlist_ids_0', '', time() - 3600, '/'); }
I think it is easy to add something like this, in a next version of the theme.
Regards
Dear @Apolloneos,
Thank you for your suggested solution. We appreciate your contribution and are currently in the process of evaluating it thoroughly. Our development team will need some time to ensure that it integrates seamlessly and does not introduce any further issues.
Should your solution meet our criteria, we will certainly consider including it in our next theme update.
Thank you once again for your valuable input.
Kind regards,
Jack Richardson
8Theme’s Team
You must be logged in to reply to this topic.Log in/Sign up