• Good day,

    We’re having issues with our installation of advanced-woo-search-pro; when an AJAX search is performed the response results in guest user carts being cleared.

    We’ve figured out that this is because the WooCommerce conditional (/includes/class-wc-cart-session.php -> maybe_set_cart_cookies()) succeeds (no headers?) and determines that the cart is empty, which results in the following:
    $this->set_cart_cookies( false );

    This then results in CoCart Lite destroying the cart (/includes/class-cocart-session-handler.php -> set_customer_cart_cookie()).

    What can we do to resolve this incompatibility/issue?
    I imagine that we need to change the search request in a way that does result in clearing the cart if one exists (for a guest)?

    Versions:
    Advanced Woo Search PRO: 2.24
    CoCart Lite: 2.9.2
    WooCommerce: 4.8.0
    WordPress: 5.6

    Regards,
    Estian

    • This topic was modified 3 years, 7 months ago by Estian Hough. Reason: Versions added
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Estian Hough

    (@divspot)

    Good day,

    The CoCart Lite plugin developer has responded and shared that he was able to replicate the issue with only the PRO version of the advanced-woo-search plugin.
    The free version does not have the issue.

    If you could please assist with figuring out why this is I would be very greatful.

    Regars,
    Estian

    Thread Starter Estian Hough

    (@divspot)

    Hi,

    Please, do you have some feedback on the above?

    Regards,
    Estian

    Hi Support,

    @divspot We are having the same issue on our side, the non pro version does not impact the adding to cart for CoCartLite, but it does if we use the pro version.

    The strange thing is that the line 214 fires for both the aws and aws pro IF CoCartLite is disabled, however if CoCartLite is enabled the aws fires line 214 and the aws pro fires line 216!

    https://github.com/woocommerce/woocommerce/blob/trunk/includes/class-wc-cart-session.php

    Plugin Author ILLID

    (@mihail-barinov)

    @divspot

    Hi,

    Sorry for the long response. I am currently looking into this issue and will respond during the next few hours.

    Regards

    Plugin Author ILLID

    (@mihail-barinov)

    So looks like I found how to solve the problem.
    Please open advanced-woo-search-pro/assets/js/common.js file, find line

    id: d.id,

    and replace with

    aws_id: d.id,

    I will add th same changes in the next plugin release.

    Regards

    Thread Starter Estian Hough

    (@divspot)

    Good day ILLID (@mihail-barinov),

    That is great news. Thank you so much for looking into this.
    Your assistance is appreciated.

    Regards,
    Estian

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Incompatibility with CoCart Lite’ is closed to new replies.