diff --git a/admin/action-hook.php b/admin/action-hook.php
index a4675147..194120e7 100644
--- a/admin/action-hook.php
+++ b/admin/action-hook.php
@@ -318,6 +318,15 @@ function wpt_configure_basic_part( $settings,$current_config_value,$field_name )
+
+ |
+
+
+ |
+
@@ -358,7 +367,7 @@ function wpt_configure_label_part($settings, $current_config_value,$field_name){
- |
+ |
|
@@ -426,7 +435,7 @@ function wpt_configure_label_part($settings, $current_config_value,$field_name){
- |
+ |
|
diff --git a/admin/post_metabox.php b/admin/post_metabox.php
index dd7e32fd..5ebbcd02 100644
--- a/admin/post_metabox.php
+++ b/admin/post_metabox.php
@@ -297,12 +297,14 @@ function wpt_shortcode_configuration_metabox_save_meta( $post_id, $post ) { // s
'flags' => FILTER_REQUIRE_ARRAY,
),
'column_settings' => array(
- 'filter' => FILTER_SANITIZE_STRING,
+ 'filter' => FILTER_CALLBACK,
'flags' => FILTER_REQUIRE_ARRAY,
+ 'options' => 'wp_kses_post'
),
'column_settings_tablet' => array(
- 'filter' => FILTER_SANITIZE_STRING,
+ 'filter' => FILTER_CALLBACK,
'flags' => FILTER_REQUIRE_ARRAY,
+ 'options' => 'wp_kses_post'
),
'column_settings_mobile' => array(
'filter' => FILTER_SANITIZE_STRING,
diff --git a/assets/js/custom.js b/assets/js/custom.js
index 8e096977..24e973cc 100644
--- a/assets/js/custom.js
+++ b/assets/js/custom.js
@@ -119,6 +119,16 @@
var current_link = window.location.href;
window.history.pushState('data', null, current_link.replace(/(paged=\d)+/, "paged=" + (pageNumber-1)));
+
+ /**
+ * Scrolling to Table Top
+ *
+ * @type window.$|$
+ */
+ var body = $('html, body');
+ var thisTableTop = $('#table_id_' + temp_number).offset();
+ body.animate({scrollTop:thisTableTop.top}, 500, 'swing');
+
},
success: function(data) {
targetTableBody.html(data);
@@ -141,7 +151,7 @@
if($('#table_id_' + temp_number + ' table.wpt_product_table').attr('data-queried') !== 'true'){
- generat_url_by_search_query(temp_number);
+ generate_url_by_search_query(temp_number);
$('#table_id_' + temp_number + ' table.wpt_product_table').attr('data-queried','true');
}
@@ -451,7 +461,7 @@
* for Ajax add to cart
* for Variation product
*/
- $('body').on('click', 'a.ajax_active.wpt_variation_product.single_add_to_cart_button.button.enabled, a.ajax_active.add_to_cart_button.wpt_woo_add_cart_button', function(e) {
+ $('body').on('click', 'a.ajax_active.wpt_variation_product.single_add_to_cart_button.button.enabled, a.add_to_cart_button.ajax_add_to_cart, a.ajax_active.add_to_cart_button.wpt_woo_add_cart_button', function(e) {
e.preventDefault();
var thisButton = $(this);
//Adding disable and Loading class
@@ -1392,7 +1402,7 @@
/**
* Generate here where query
*/
- generat_url_by_search_query(temp_number, extra_link_tax_cf);
+ generate_url_by_search_query(temp_number, extra_link_tax_cf);
$('#wpt_query_reset_button_' + temp_number).fadeIn('medium');
/**
* Trigger on this event, when search will be completed
@@ -1460,7 +1470,13 @@
* @param {type} table_id
* @returns {undefined}
*/
- function generat_url_by_search_query( table_id = 0, extra = '' ){
+ function generate_url_by_search_query( table_id = 0, extra = '' ){
+ config_json = getConfig_json( table_id ); //Added vat v2.9.3.0
+
+ if(config_json.query_by_url !== '1'){
+ return;
+ }
+
var key,value;
var link = window.location.origin + window.location.pathname + "?table_ID=" + table_id + "&";
$('.query_box_direct_value').each(function(){
@@ -1576,15 +1592,29 @@
updateCheckBoxCount(temp_number);
}
-
+ /**
+ * Mainly for shortmessage field
+ */
+ $('body').on('change', '.wpt_row input.message', function() {
+ var temp_number = $(this).parents('tr.wpt_row').data('temp_number');
+ var msg = $(this).val();
+ var product_id = $(this).parents('tr').data('product_id');
+
+ var thisRow = '#table_id_' + temp_number + ' tr.product_id_' + product_id;
+ $( thisRow + ' input.message').val(msg);
+ });
$('body').on('change', '.wpt_row input.input-text.qty.text', function() {
var temp_number = $(this).parents('tr.wpt_row').data('temp_number');
var Qty_Val = $(this).val();
var product_id = $(this).parents('tr').data('product_id');
- //.product_id_' + product_id + ' This a Table Trow Class
- $('#table_id_' + temp_number + ' tr.product_id_' + product_id + ' input.input-text.qty.text').val(Qty_Val);
- $('#table_id_' + temp_number + ' tr.product_id_' + product_id).attr('data-quantity',Qty_Val);
+ var thisRow = '#table_id_' + temp_number + ' tr.product_id_' + product_id;
+
+ $( thisRow + ' input.input-text.qty.text').val(Qty_Val);
+ $( thisRow ).attr('data-quantity', Qty_Val);
+ $( thisRow + ' a.wpt_woo_add_cart_button').attr('data-quantity', Qty_Val);
+ $( thisRow + ' a.add_to_cart_button ').attr('data-quantity', Qty_Val);
+
var targetTotalSelector = $('#table_id_' + temp_number + ' .product_id_' + product_id + ' .wpt_total_item.total_general');
@@ -1622,7 +1652,6 @@
break;
}
- $('#table_id_' + temp_number + ' .product_id_' + product_id + ' .wpt_action a.wpt_woo_add_cart_button').attr('data-quantity', Qty_Val);
$('.yith_request_temp_' + temp_number + '_id_' + product_id).attr('data-quantity', Qty_Val);
$('#table_id_' + temp_number + ' .product_id_' + product_id + ' .wpt_total_item.total_general strong').html(newPrice);
//$(target_row_id + ' a.add_to_cart_button').attr('data-quantity', Qty_Val); //wpt_total_item total_general
@@ -1773,9 +1802,8 @@
if( typeof split_params[1] !== 'undefined' && type === 'variation' ){
quote_data = '&' + split_params[1];
}
- add_to_cart_info = 'action=yith_ywraq_action&ywraq_action=add_item';
+ add_to_cart_info = 'action=yith_ywraq_action&ywraq_action=add_item&quantity=' + quantity + '&product_id='+ product_id +'&_wpnonce='+ywraq_frontend.yith_ywraq_action_nonce;
add_to_cart_info += quote_data;
- add_to_cart_info += '&quantity=' + quantity;
/**
* When Table will show "Only Variation" as row
* Then Product ID will get from Parent ID
@@ -1788,14 +1816,13 @@
product_id = parent_id;
add_to_cart_info += '&variation_id=' + variation_id;
}
- add_to_cart_info += '&product_id=' + product_id;
- add_to_cart_info += '&wp_nonce=' + wp_nonce;
- add_to_cart_info += '&yith-add-to-cart=' + product_id;
+
var yith_ajax_url;// = ywraq_frontend.ajaxurl;
yith_ajax_url = ywraq_frontend.ajaxurl.toString().replace( '%%endpoint%%', 'yith_ywraq_action' );
+
$.ajax({
type : 'POST',
- url : yith_ajax_url,
+ url : ywraq_frontend.ajaxurl,//yith_ajax_url,
dataType: 'json',
data : add_to_cart_info,
beforeSend: function(){
@@ -1806,11 +1833,10 @@
success: function (response) {
if( response && ( response.result === 'true' || response.result === 'exists' ) ){
$('.' + selector).html(msg.added);
- if(response.result === 'exists'){
-
- $('.' + selector).attr('data-response_msg',response.message);
- //alert(response.message);
- }
+ //if(response.result === 'exists'){
+ //$('.' + selector).attr('data-response_msg',response.message);
+ //}
+ $('.' + selector).attr('data-response_msg',response.message);
var html;
//$('.wpt_quoterequest img').remove();
//$('.' + selector + '+.yith_ywraq_add_item_browse_message').remove();
diff --git a/includes/functions.php b/includes/functions.php
index a5dfca58..130a9486 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -1241,6 +1241,10 @@ function wpt_freeze_column_maintain( $table_ID, $args, $column_settings, $enable
if( !function_exists( 'wpt_add_div_at_top' ) ){
/**
+ * Top Scrollbar
+ * To hide, top scrollbar, we can use this action hook
+ *
+ *
* Add a new div at the top of the table, To add a Wrapper wrapper at the Top
*
* @param Int $table_ID
diff --git a/includes/helper-functions.php b/includes/helper-functions.php
index fd36c46b..054c56e4 100644
--- a/includes/helper-functions.php
+++ b/includes/helper-functions.php
@@ -55,7 +55,7 @@ function wpt_ajax_paginate_links_load(){
$table_ID = $args['table_ID'];
$search_from = get_post_meta( $table_ID, 'search_n_filter', true );
- $search_from = isset( $search_from['search_from'] ) && is_array( $search_from['search_from'] ) && count( $search_from['search_from'] ) > 0 ? sanitize_text_field( $search_from['search_from'] ) : false;
+ $search_from = isset( $search_from['search_from'] ) && is_array( $search_from['search_from'] ) && count( $search_from['search_from'] ) > 0 ? $search_from['search_from'] : false;
$search_key = isset( $directkey['s'] ) && !empty( $directkey['s'] ) ? sanitize_text_field( $directkey['s'] ) : "";
@@ -208,7 +208,7 @@ function wpt_ajax_table_row_load(){
$table_ID = $args['table_ID'];
$search_from = get_post_meta( $table_ID, 'search_n_filter', true );
- $search_from = isset($search_from['search_from']) && is_array( $search_from['search_from'] ) && count( $search_from['search_from'] ) > 0 ? sanitize_text_field( $search_from['search_from'] ) : false;
+ $search_from = isset($search_from['search_from']) && is_array( $search_from['search_from'] ) && count( $search_from['search_from'] ) > 0 ? $search_from['search_from'] : false;
$search_key = isset( $directkey['s'] ) && !empty( $directkey['s'] ) ? sanitize_text_field( $directkey['s'] ) : "";
diff --git a/includes/items/message.php b/includes/items/message.php
index 2106c81e..14999e17 100644
--- a/includes/items/message.php
+++ b/includes/items/message.php
@@ -1,4 +1,5 @@
-";
-
-
+'>
diff --git a/includes/items/quoterequest.php b/includes/items/quoterequest.php
index 4104dbf8..c9ac548e 100644
--- a/includes/items/quoterequest.php
+++ b/includes/items/quoterequest.php
@@ -5,8 +5,13 @@
if( $product->get_type() == 'variable' ){
$quote_class = 'variations_button disabled';
}
+
+$c_product_id = $data['id'];
$Add_to_Quote = $config_value['yith_add_to_quote_text'];//'Add to Quote';
$data_message = '{"text":"'. $Add_to_Quote .'","adding":"' . $config_value['yith_add_to_quote_adding'] . '","added":"' . $config_value['yith_add_to_quote_added'] . '"}';
+
+$q_final_class = "{$quote_class} yith_request_temp_{$temp_number}_id_{$data['id']} wpt_yith_add_to_quote_request wpt_add-request-quote-button";
+
?>
'
data-response_msg=''
@@ -21,4 +26,4 @@ class=''
data-selector=''>
-
\ No newline at end of file
+
diff --git a/includes/shortcode.php b/includes/shortcode.php
index 82b43cd2..53c5b049 100644
--- a/includes/shortcode.php
+++ b/includes/shortcode.php
@@ -1303,10 +1303,11 @@ function wpt_search_box($temp_number, $search_box_texonomiy_keyword = array( 'pr
$order_by = isset( $_GET['orderby'] ) ? sanitize_text_field( $_GET['orderby'] ) : $order_by;
$order = isset( $_GET['order'] ) ? sanitize_text_field( $_GET['order'] ) : $order;
- $single_keyword = $config_value['search_box_searchkeyword'];//__( 'Search keyword', 'wpt_pro' );
+ $single_keyword = $config_value['search_keyword_text'];//__( 'Search keyword', 'wpt_pro' );
+ $search_box_placeholder = $config_value['search_box_searchkeyword'];//__( 'Search keyword', 'wpt_pro' );
$html .= "";
$html .= '';
- $html .= '';
+ $html .= '';
$html .= "
";// End of .search_single_column
$order_by_validation = apply_filters( 'wpto_searchbox_order_show', false,$temp_number, $config_value, $search_box_texonomiy_keyword );
diff --git a/readme.txt b/readme.txt
index dc6f4843..bb954b6a 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Donate link: https://codecanyon.net/item/woo-product-table-pro/20676867?ref=Code
Tags: wc product table,woocommerce product table, product table, wc table, quick order table, wholesale table, restaurants table
Requires at least: 4.0.0
Tested up to: 5.7.2
-Stable tag: 2.9.1
+Stable tag: 2.9.3
Requires PHP: 5.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -157,6 +157,16 @@ You can easily show specific category products. While creating new table click o
== Changelog ==
+= 2.9.3 =
+ * Fixed: Shop page quantity issue
+ * Fixed: After add to cart quantity issue
+ * Fixed: Quote button issue
+ * Fixed: YITH Quote button issue
+ * Fixed: Short Message not sending issue
+ * Fixed: Advance Search on latest verion
+ * Added: Query by URL - on off from Configuraton page and tab
+ * Bug Fix
+
= 2.9.1 =
* escapping issue fixed
diff --git a/woo-product-table.php b/woo-product-table.php
index 33524123..2bd22920 100644
--- a/woo-product-table.php
+++ b/woo-product-table.php
@@ -7,11 +7,11 @@
* Author URI: https://profiles.wordpress.org/codersaiful/
* Tags: woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table
*
- * Version: 2.9.1
+ * Version: 2.9.3
* Requires at least: 4.0.0
* Tested up to: 5.7.2
* WC requires at least: 3.0.0
- * WC tested up to: 5.3.0
+ * WC tested up to: 5.4.1
*
* Text Domain: wpt_pro
* Domain Path: /languages/
@@ -30,7 +30,7 @@
}
if( !defined( 'WPT_DEV_VERSION' ) ){
- define( 'WPT_DEV_VERSION', '2.9.1.3' );
+ define( 'WPT_DEV_VERSION', '2.9.3.0' );
}
if( !defined( 'WPT_CAPABILITY' ) ){