• Resolved mdwclan2023

    (@mdwclan2023)


    hello, my checkout page “Have a coupon? Click here to enter your code ” toggle stopped working (it used to work fine). I checked the basics (me not being a developer) but no results. If someone can please help with this. thanks in advance

    • This topic was modified 8 months, 1 week ago by mdwclan2023.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @mdwclan2023!

    We’ve had similar bugs reported in the past, but this one isn’t related to our plugin. Please check if you use any plugin that integrates WooCommerce with Facebook and deactivate it, clear the cache (CTRL + F5 in the browser), or enter incognito mode and check if the JS in checkout works properly. If not, disable the plugins one by one until the error disappears. Please let me know if you discover anything.

    Regards,
    Kris

    Thread Starter mdwclan2023

    (@mdwclan2023)

    Hi @kris, thanks for the response and suggestions. Even though I use a plugin that integrates WooCommerce with Facebook but that was not the culprit this time. It was Jetpack (Ver 13.3 By Automattic), I deactivated it and the issue went away. Hope it doesn’t come back. Thanks a bunch again for the response and suggestions. Cheers.

    Hi,

    we have the same problem on our eshop, Fibosearch + Astra PRO. The coupon code is not working, can’t see the coupon field, and if I add the coupon code and click on the button, nothing happens. After deactivating the Fibosearch plugin everything works correctly.

    Plugin Support Kris

    (@c0nst)

    Hi @sedivy!

    We are still trying to solve this problem, but it seems to be coming back. The Astra add-on attaches the click event to the first element on the list with the class .woocommerce. As a result, the click event is attached to FiboSearch.

    Please check if you have the latest version of our plugin and Astra theme. If so, try using this code snippet to fix this error:

    add_filter( 'dgwt/wcas/form/html', function($html) {
      if ( is_checkout() || is_cart() ) {
        $html = str_replace( " woocommerce ", " ", $html );
      }
      return $html;
    } );

    You have two ways to add this code to your theme:
    1. Open the functions.php in your child theme and add the code at the end.
    2. Install the Code Snippets plugin and apply this code as a snippet.

    If the above code won’t work please try the below one (same implementation way as above):

    add_action( 'wp_head', function() {
      if ( is_checkout() || is_cart() ) { ?>
    <script>
      function removeWooCommerceClassFromFiboSearch() {
        var fiboSearchBars = document.getElementsByClassName("dgwt-wcas-search-wrapp");
        for (let i = 0; i < fiboSearchBars.length; i++) {
          fiboSearchBars[i].classList.remove("woocommerce");
        }
      }
      document.addEventListener("DOMContentLoaded", function(event) {
        removeWooCommerceClassFromFiboSearch();
      });
    </script>
      <?php }
    }, 1 );

    Regards,
    Kris

    • This reply was modified 7 months, 2 weeks ago by Kris.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Marketing coupon toggle not working’ is closed to new replies.