From 230beb18431f18c44142606038529cdec4653349 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 1 Aug 2022 17:13:37 +0600 Subject: [PATCH 01/14] working for showAlert() --- assets/js/custom.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/js/custom.js b/assets/js/custom.js index 2ab50486..a461f483 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -1094,6 +1094,10 @@ jQuery(function($) { return false; }); + function showAlert(){ + + } + /** * Add to cart All selected * all selected product add to cart from here From 0686b44d94136ce6661eb9265d5973bea545fd55 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 1 Aug 2022 17:22:53 +0600 Subject: [PATCH 02/14] readme.md updated --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 21444cff..2247bd63 100644 --- a/readme.md +++ b/readme.md @@ -59,8 +59,9 @@ if( !function_exists( 'temp_file_for_new_shortcode' ) ){ return $file; } } -add_filter( 'wpto_template_loc_item_new_shortcode', 'temp_file_for_new_shortcode', 10 ); +add_filter( 'wpto_template_loc_item_{new_shortcode}', 'temp_file_for_new_shortcode', 10 ); ``` +Here {new_shortcode} is column's keyword. it's dynamic and changeable based on your column name/keyword. ## Example File code(my_shortcode.php) ```php @@ -111,4 +112,4 @@ function wpt_custom_extra_label_change( $label, $id ){ return $label; } add_filter( 'wpt_extra_label_text', 'wpt_custom_extra_label_change', 10, 2 ); -``` \ No newline at end of file +``` From 7882206b2efb7dcddaab8365ef3822b122b7abad Mon Sep 17 00:00:00 2001 From: rafiul Date: Tue, 2 Aug 2022 13:12:36 +0600 Subject: [PATCH 03/14] Shortcode information added --- assets/css/universal.css | 8 +++++++- templates/table-preview.php | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/assets/css/universal.css b/assets/css/universal.css index 9819aefe..8c8a26c0 100644 --- a/assets/css/universal.css +++ b/assets/css/universal.css @@ -1985,4 +1985,10 @@ select.search_select.cascade-filtering { margin-left: 0px !important; margin-bottom: 10px; } - \ No newline at end of file +span.preview_info { + display: inline-block; + padding: 10px; + color: #43454b; + background: #f2f2f2; + +} \ No newline at end of file diff --git a/templates/table-preview.php b/templates/table-preview.php index 9befd22f..633bcb54 100644 --- a/templates/table-preview.php +++ b/templates/table-preview.php @@ -50,12 +50,12 @@ class="wpt-preview-shortcode-input" readonly="readonly" > - - - + + + + - Date: Tue, 2 Aug 2022 15:09:49 +0600 Subject: [PATCH 04/14] Info color --- assets/css/universal.css | 17 ++++++++++++----- includes/functions.php | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/assets/css/universal.css b/assets/css/universal.css index 8c8a26c0..c5263d2f 100644 --- a/assets/css/universal.css +++ b/assets/css/universal.css @@ -152,7 +152,7 @@ div.wpt_product_table_wrapper input[type=radio]:disabled+label:before { } div.wpt_product_table_wrapper input[type=radio]:checked+label:after { - content: '●'; + content: '●'; color: #fff; top: 0px; font-size: 20px; @@ -1827,7 +1827,7 @@ input[type="submit"].loading::after, font-family: "Font Awesome 5 Free"; font-weight: 900; vertical-align: baseline; - content: ""; + content: ""; height: 20px; width: 20px; line-height: 20px; @@ -1986,9 +1986,16 @@ select.search_select.cascade-filtering { margin-bottom: 10px; } span.preview_info { + position: relative; display: inline-block; padding: 10px; - color: #43454b; - background: #f2f2f2; - + color: #fff; + background: #0a7f9c; + padding-left: 30px; +} +span.preview_info:before{ + font-family:dashicons; + content: "\f14c"; + position:absolute; + left: 7px; } \ No newline at end of file diff --git a/includes/functions.php b/includes/functions.php index 91e42d35..830eb13c 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1537,6 +1537,7 @@ function wpt_product_table_preview_template( $template_file ){ } add_filter( 'template_include', 'wpt_product_table_preview_template' ); + /** * for action.php inside items * From 1bebc0fb830531f0e613f5f2a63cb822209c154f Mon Sep 17 00:00:00 2001 From: rafiul Date: Tue, 2 Aug 2022 15:33:33 +0600 Subject: [PATCH 05/14] Added Edit icon on Edit table button --- assets/css/universal.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/css/universal.css b/assets/css/universal.css index c5263d2f..66a1452d 100644 --- a/assets/css/universal.css +++ b/assets/css/universal.css @@ -1998,4 +1998,14 @@ span.preview_info:before{ content: "\f14c"; position:absolute; left: 7px; -} \ No newline at end of file +} +.wpt_edit_table > a { +position: relative; +padding-left: 30px; +} +.wpt_edit_table > a::before { + font-family:dashicons; + content: "\f464"; + position:absolute; + left: 7px; +} From d1f11efc510e8cba42416a18039abbc710579544 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 7 Aug 2022 10:13:16 +0600 Subject: [PATCH 06/14] tab translate area has transferred to wpto_admin_option_tab_bottom --- wpml/admin-area.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wpml/admin-area.php b/wpml/admin-area.php index c77ec022..a1d8bb0f 100644 --- a/wpml/admin-area.php +++ b/wpml/admin-area.php @@ -87,7 +87,7 @@ function wpt_wpml_basic_tab( $meta_basics ){ 'check_uncheck_text', ); ?> -
+

Date: Sun, 7 Aug 2022 10:16:55 +0600 Subject: [PATCH 07/14] changelog added for wpml string area --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 2322d862..ecf592ab 100644 --- a/readme.txt +++ b/readme.txt @@ -215,6 +215,7 @@ You can easily show specific category products. While creating new table click o = 3.2.4 = * Bug Fixed: Pagination saving issue fixed * Bug Fixed: Instance Search updated +* Changed: WPML area for Tab's String has transferred to Option Tab. = 3.2.3 = From 9dae87de59c2d6648d92d4c1f632bd4116f8b96d Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 7 Aug 2022 11:37:45 +0600 Subject: [PATCH 08/14] alert with condition feature added where blank alert will not show and commented code and unnecessary code removed --- assets/js/custom.js | 95 +++++++++++---------------------------------- 1 file changed, 23 insertions(+), 72 deletions(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index a461f483..107b2b0d 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -508,7 +508,7 @@ jQuery(function($) { e.preventDefault(); var temp_number = $(this).closest( '.wpt_action' ).data('temp_number'); config_json = getConfig_json( temp_number ); - alert(config_json.sorry_out_of_stock); + showAlert(config_json.sorry_out_of_stock); return false; }); @@ -687,11 +687,21 @@ jQuery(function($) { }); }); + function showAlert(alertMessage){ + if(typeof alertMessage == 'string'){ + var tempMsg = alertMessage.trim(); + if(tempMsg.length !== 0){ + alert(alertMessage); + } + }else{ + console.log("You have inserted " + typeof alertMessage + " Variable. But should be a String."); + } + } $('body').on('click', 'a.wpt_variation_product.single_add_to_cart_button.button.disabled,a.disabled.yith_add_to_quote_request.button', function(e) { e.preventDefault(); var temp_number = $(this).closest( '.wpt_action' ).data('temp_number'); config_json = getConfig_json( temp_number ); - alert(config_json.no_right_combination); + showAlert(config_json.no_right_combination); return false; }); @@ -701,7 +711,7 @@ jQuery(function($) { e.preventDefault(); var temp_number = $(this).closest( '.wpt_action' ).data('temp_number'); config_json = getConfig_json( temp_number ); //Added vat V5.0 - alert(config_json.adding_in_progress); + showAlert(config_json.adding_in_progress); return false; }); @@ -1090,14 +1100,10 @@ jQuery(function($) { e.preventDefault(); var temp_number = $(this).data('temp_number'); config_json = getConfig_json( temp_number ); //Added vat V5.0 - alert(config_json.sorry_plz_right_combination); + showAlert(config_json.sorry_plz_right_combination); return false; }); - function showAlert(){ - - } - /** * Add to cart All selected * all selected product add to cart from here @@ -1173,7 +1179,7 @@ jQuery(function($) { currentAllSelectedButtonSelector.removeClass('disabled'); currentAllSelectedButtonSelector.removeClass('loading'); tableWrapperTag.removeClass('loading-table'); - alert(config_json.please_choose_items); + showAlert(config_json.please_choose_items); return false; } @@ -1591,7 +1597,7 @@ jQuery(function($) { }else{ $('#wpt_load_more_wrapper_' + temp_number).remove(); targetTable.removeClass('wpt_overflow_hiddent'); - alert(config_json.no_more_query_message);//"There is no more products based on current Query." + showAlert(config_json.no_more_query_message);//"There is no more products based on current Query." } } @@ -1989,7 +1995,7 @@ jQuery(function($) { var type = $(this).closest('tr.wpt_row').data('type') if(type !== 'variable' && response_msg !== ''){ - alert(response_msg); + showAlert(response_msg); $('.' + selector).html(msg.added); return false; } @@ -2050,9 +2056,7 @@ jQuery(function($) { //} $('.' + selector).attr('data-response_msg',response.message); var html; - //$('.wpt_quoterequest img').remove(); - //$('.' + selector + '+.yith_ywraq_add_item_browse_message').remove(); - //$('.' + selector + '+.yith_ywraq_add_item_response_message').remove(); + html = '
' + response.message + '
'; html += '' + yith_browse_list + ''; @@ -2060,7 +2064,7 @@ jQuery(function($) { }else{ $('.' + selector).html(msg.added); } - //thisButton.parent().show(); //New added at 4.0.19 + } }); }); @@ -2105,12 +2109,10 @@ jQuery(function($) { if(config_json.sort_mini_filter === 'ASC'){ taxArray.sort(); - //taxArray.sort(function(a,b){return a-b}); + }else if(config_json.sort_mini_filter === 'DESC'){ taxArray.sort(); taxArray.reverse(); - - //taxArray.sort(function(a,b){return b-a}); } var html = ''; @@ -2157,13 +2159,6 @@ jQuery(function($) { var thisColObject = $(this); var status = false; var disableClass = [ - // '.wpt_product_id', - // '.wpt_thumbnails', - // '.wpt_quick', - // '.wpt_message', - // '.wpt_serial_number', - // '.wpt_quoterequest', - // '.wpt_action', '.wpt_quantity', '.wpt_check', ]; @@ -2286,23 +2281,7 @@ jQuery(function($) { } } // Removing link feature End here */ - - - - - - - - - - - - - - - - - + /* * Start code for Advance Version * Version: 5.3 @@ -2496,7 +2475,6 @@ jQuery(function($) { products: products_data, }, complete: function(){ - //alert('complete'); $( document ).trigger( 'wc_fragments_refreshed' ); }, success: function( response ) { @@ -2552,7 +2530,7 @@ jQuery(function($) { if (itemAmount < 1) { currentAllSelectedButtonSelector.removeClass('disabled'); currentAllSelectedButtonSelector.removeClass('loading'); - alert(config_json.please_choose_items); + showAlert(config_json.please_choose_items); return false; } currentAllSelectedButtonSelector.removeClass('disabled'); @@ -2662,33 +2640,7 @@ jQuery(function($) { targetThumbs.attr('data-variation_id', variation.variation_id); }); - - - //$(document).on('submit','table.advance_table.wpt_product_table form',function(e){ //div.advance_table_wrapper table.advance_table.wpt_product_table - - - - - /** - * Sticky Header Feature to be enable - $(".wpt_product_table").floatThead({ - scrollingTop:50, - position: 'fixed', - zIndex: 989898989, - }); - */ - - - - - - - - - - - - + $('.wpt_product_table_wrapper').each(function(){ @@ -2738,7 +2690,6 @@ jQuery(function($) { htmlImg = ""; //wpt_for_thumbs_desc - //htmlDesc += "
"; $(this).children('td.wpt_for_thumbs_desc').each(function(){ var attr = ""; $.each(this.attributes, function() { From 7aea1039e0c9c54b4f2b6780d24baefb51896349 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 8 Aug 2022 17:21:21 +0600 Subject: [PATCH 09/14] addtocart bubble issue on hiden mincart has been fixed --- assets/js/custom.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index 107b2b0d..277eeafb 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -323,9 +323,7 @@ jQuery(function($) { */ function WPT_MiniCart(){ var minicart_type = $('div.tables_cart_message_box').attr('data-type'); - if(typeof minicart_type === 'undefined'){ - return; - } + $.ajax({ type: 'POST', url: ajax_url, @@ -335,6 +333,9 @@ jQuery(function($) { success: function(response){ setFragmentsRefresh( response ); + if(typeof minicart_type === 'undefined'){ + return; + } if(typeof minicart_type !== 'undefined'){ var cart_hash = response.cart_hash; var fragments = response.fragments; From 53e5d51b8161705db22630c922708333c92abd0a Mon Sep 17 00:00:00 2001 From: rafiul Date: Mon, 8 Aug 2022 18:16:05 +0600 Subject: [PATCH 10/14] Meta option Show Hide on Admin panel --- admin/tabs/query.php | 2 +- assets/css/admin-common.css | 2 +- assets/js/admin.js | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/admin/tabs/query.php b/admin/tabs/query.php index cefc8caa..63acf674 100644 --- a/admin/tabs/query.php +++ b/admin/tabs/query.php @@ -327,7 +327,7 @@ - + diff --git a/assets/css/admin-common.css b/assets/css/admin-common.css index c56f8377..9e538702 100644 --- a/assets/css/admin-common.css +++ b/assets/css/admin-common.css @@ -142,7 +142,7 @@ h1.with-background.dark-background {} .ultraaddons-panel table tr th label{font-weight: 400;text-shadow: -1px 0 0px #0572a982;font-size: 17px;} .ultraaddons-panel table tr th, .ultraaddons-panel table tr td{ - padding: 6px 0 16px 0; + padding: 7px 10px; vertical-align: text-bottom; } diff --git a/assets/js/admin.js b/assets/js/admin.js index c0f963f4..86d02411 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -317,17 +317,20 @@ jQuery.fn.extend({ /**************Admin Panel's Setting Tab End Here****************/ /*********Columns , meta sorting orders and mobile checkbox controlling start here************/ - /** + /** * If chose Custom Meta value than * Custom meta value's input field will be visible * Otherise, By default, It stay hidden */ + $("#wpt_meta_value_wrapper").hide(); $('body.wpt_admin_body').on('change','#wpt_table_sort_order_by',function(){ var current_val = $(this).val(); if(current_val === 'meta_value' || current_val === 'meta_value_num'){ - $("#wpt_meta_value_wrapper").fadeIn(); + $("#wpt_meta_value_wrapper").css('background','#f0f0f1'); + $("#wpt_meta_value_wrapper").show('slow'); + }else{ - $("#wpt_meta_value_wrapper").fadeOut(); + $("#wpt_meta_value_wrapper").hide('slow'); } }); @@ -335,7 +338,7 @@ jQuery.fn.extend({ if(wpt_table_sort_order_by === 'meta_value' || wpt_table_sort_order_by === 'meta_value_num'){ $("#wpt_meta_value_wrapper").fadeIn(); } - + /** * On of Element based on Selected Value for Select Tag * Add an Attribute data-on="yes|.wpt_snf_on_off" or From cdf173ac6fd1f9621522e7896291f5932e3ca0e3 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 9 Aug 2022 14:49:58 +0600 Subject: [PATCH 11/14] #custom.js unnecessary code removed thisNewPagiWrappers --- assets/js/custom.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index 277eeafb..d954ad85 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -1674,11 +1674,11 @@ jQuery(function($) { thisPagiWrappers.html(paginate_data); changeSpanToAPagi(); var newjsonData = $('#table_id_' + temp_number + ' mypagi').attr('myjson'); - var thisNewPagiWrappers = $('#table_id_' + temp_number + ' .wpt_table_pagination').attr('data-whole_data'); - thisNewPagiWrappers = JSON.parse(thisNewPagiWrappers); - thisNewPagiWrappers = thisNewPagiWrappers.targetTableArgs; - // console.log('newjsonData',JSON.parse(newjsonData)); - // console.log('thisNewPagiWrappers',thisNewPagiWrappers); + // var thisNewPagiWrappers = $('#table_id_' + temp_number + ' .wpt_table_pagination').attr('data-whole_data'); + + // thisNewPagiWrappers = JSON.parse(thisNewPagiWrappers); + // thisNewPagiWrappers = thisNewPagiWrappers.targetTableArgs; + targetTable.attr( 'data-data_json', newjsonData ); thisPagiWrappers.removeClass('pagination_loading'); } From ce34e1c78a86fbae232ae6856d0d870900eab2cb Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 9 Aug 2022 15:26:53 +0600 Subject: [PATCH 12/14] icon issue has been fixed --- assets/css/universal.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/universal.css b/assets/css/universal.css index 66a1452d..7a33683f 100644 --- a/assets/css/universal.css +++ b/assets/css/universal.css @@ -1824,10 +1824,10 @@ input[type="submit"].loading::after, .added_to_cart.loading::after { -webkit-font-smoothing: antialiased; font-style: normal; - font-family: "Font Awesome 5 Free"; + font-weight: 900; vertical-align: baseline; - content: ""; + height: 20px; width: 20px; line-height: 20px; From 93c86af7ddf6c008678aa09d7aa1aef7f3c63ccc Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 14 Aug 2022 10:38:26 +0600 Subject: [PATCH 13/14] WC tested up to: 6.8.1 --- woo-product-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woo-product-table.php b/woo-product-table.php index 26f34266..7921a867 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -11,7 +11,7 @@ * Requires at least: 4.0.0 * Tested up to: 6.0.1 * WC requires at least: 3.0.0 - * WC tested up to: 6.6.1 + * WC tested up to: 6.8.1 * * * Text Domain: wpt_pro From fa0e52dfdcb1a67f845b9f9b1c011cf7096bf09b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 14 Aug 2022 17:58:26 +0600 Subject: [PATCH 14/14] universal.css padding-top: calc(50% - 8px); --- assets/css/universal.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/css/universal.css b/assets/css/universal.css index 7a33683f..55a077a2 100644 --- a/assets/css/universal.css +++ b/assets/css/universal.css @@ -1063,7 +1063,8 @@ div.wpt-footer-cart-wrapper.always_hide{display: none;} text-align: center; width: 100%; display: block; - padding-top: 35%; + padding-top: calc(50% - 8px); + height: 100%; } .wpt-footer-cart-wrapper > a:after { content: "";