Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @lucytech

    Thanks for reaching out!

    I checked your site, viewed this product, then browsed this product under the Related Products and I am seeing this message on my end:

    Inspecting your site, I can see that this part was added using the Elementor plugin. Just to confirm, can you please share how are you adding the Recently Viewed Products on your site as this is not part of the core functionalities of WooCommerce?

    If you’re unsure, please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    Thanks!

    Thread Starter lucytech

    (@lucytech)

    Yes, I’m using Elementor.

    I added it using a shortcode.

    Is this cookie automatically set from woocommerce? ‘woocommerce recently viewed’ ?

    the code is from this website https://www.wpexplorer.com/woocommerce-recently-viewed-products-shortcode/

    Hi @lucytech

    Thanks for your confirmation that you are using the third-party plugin WooCommerce Recently Viewed Products Shortcode Plugin in adding Recently Viewed Products on your site here.

    Since this is a third-party plugin which we don’t provide support for (please see our Support Policy here), it would be best to reach out to the plugin’s developers for further assistance here.

    https://remicorson.com/

    All the best and hopefully, the issue will be fixed soon.

    Thanks!

    Thread Starter lucytech

    (@lucytech)

    I’m not using a plugin, just code that calls the cookie.

    My issue is there is no $_COOKIE[‘woocommerce_recently_viewed’].? cookie being stored. The code itself is irrelevant. You can see in inspect element there is no cookie being created.

    My question is – is $_COOKIE[‘woocommerce_recently_viewed’].? a default cookie that should be created? Or is it connected to a plugin and I need to find the source?

    If it is default then why isn’t it being stored?

    @xue28 – Hi, this is AJ from WPExplorer.com – I had a look at the WooCommerce plugin code and it looks like at some point they updated their code to add an extra check so the tracking cookie is only being added to the page if the “woocommerce_recently_viewed_products” widget is active on the page.

    Perhaps the best solution is that you basically re-add the code from the plugin to your site and remove the extra check. Example snippet.

    I will update our article accordingly as well. In the future if you do have any issues with guides on our site though feel free to ask in our own comments and we can assist!

    • AJ

    Edit: Since your website will most likely serve cached pages, I would probably recommend displaying “recently viewed” products using javascript instead of PHP. Doing so via cookies may not be the best solution.

    • This reply was modified 1 year, 10 months ago by wpexplorer.
    Thread Starter lucytech

    (@lucytech)

    I have the cookie excluded from the cache. Is that ok or do you have a JavaScript code example that would work better?

    When do you think you will update the code? I’m not sure how to implement the change you suggested.

    Thanks

    Thread Starter lucytech

    (@lucytech)

    I pasted the code in functions.php and it seems to have fixed the issue.

    Thanks so much for your help.

    @lucytech – Great! Happy to help ??

    Hi @lucytech

    I’m glad that you were able to find a solution to your inquiry here and thanks for sharing it with the community too! ??

    I will be marking this thread as resolved. Should you have further inquiries, kindly create a new topic here.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘recently viewed cookie not being saved’ is closed to new replies.