From 5df2f8c51f4af968c75921360a9d6af0052cc031 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 18 Aug 2024 19:54:15 +0600 Subject: [PATCH] double cart adding issue has been solved --- assets/js/custom.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/js/custom.js b/assets/js/custom.js index fe48142f..3fda938a 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -518,6 +518,11 @@ jQuery(function($) { e.preventDefault(); var thisButton = $(this); + + if(thisButton.hasClass('disabled')){ + return; + } + //Adding disable and Loading class thisButton.addClass('disabled'); // thisButton.addClass('loading'); @@ -2441,6 +2446,9 @@ jQuery(function($) { WPT_BlankNotice(); var product_id = $(this).parents('tr').data('product_id'); var thisButton = $('tr#product_id_' + product_id + ' .wpt_action button.single_add_to_cart_button'); + if(thisButton.hasClass('disabled')){ + return; + } var thisTable = $(this).parents('div.wpt-wrap'); var table_id = $(this).parents('div.wpt-wrap').attr('id');