Version Description
- 09/08/2022 =
- Long awaited product sync feature is out for our Pro users. Now you can manage your product sync duration and product batch size on your own at your convenience.
Download this release
Release Info
Developer | ramniktatvic |
Plugin | Enhanced Ecommerce Google Analytics Plugin for WooCommerce |
Version | 4.8.7 |
Comparing to | |
See all releases |
Code changes from version 4.8.6 to 4.8.7
admin/class-tvc-admin-helper.php
CHANGED
@@ -969,12 +969,26 @@ Class TVC_Admin_Helper{
|
|
969 |
}
|
970 |
|
971 |
public function get_auto_sync_time_space(){
|
972 |
-
|
973 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
974 |
}
|
975 |
|
976 |
public function get_auto_sync_batch_size(){
|
977 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
978 |
}
|
979 |
|
980 |
public function get_last_auto_sync_product_info(){
|
969 |
}
|
970 |
|
971 |
public function get_auto_sync_time_space(){
|
972 |
+
$plan_id = $this->get_plan_id();
|
973 |
+
$ee_additional_data = $this->get_ee_additional_data();
|
974 |
+
$product_sync_duration = (isset($ee_additional_data['product_sync_duration']) && $ee_additional_data['product_sync_duration'])?$ee_additional_data['product_sync_duration']:"";
|
975 |
+
$pro_snyc_time_limit = (int)(isset($ee_additional_data['pro_snyc_time_limit']) && $ee_additional_data['pro_snyc_time_limit'] > 0)?$ee_additional_data['pro_snyc_time_limit']:"";
|
976 |
+
if( $product_sync_duration != "" && $pro_snyc_time_limit > 0 && $plan_id != 1){
|
977 |
+
return strtotime($pro_snyc_time_limit." ".$product_sync_duration, 0);
|
978 |
+
}else{
|
979 |
+
return strtotime("25 days", 0);
|
980 |
+
}
|
981 |
}
|
982 |
|
983 |
public function get_auto_sync_batch_size(){
|
984 |
+
$plan_id = $this->get_plan_id();
|
985 |
+
$ee_additional_data = $this->get_ee_additional_data();
|
986 |
+
$product_sync_batch_size = (isset($ee_additional_data['product_sync_batch_size']) && $ee_additional_data['product_sync_batch_size'])?$ee_additional_data['product_sync_batch_size']:"";
|
987 |
+
if($product_sync_batch_size != "" && $plan_id != 1){
|
988 |
+
return $product_sync_batch_size;
|
989 |
+
}else{
|
990 |
+
return "50";
|
991 |
+
}
|
992 |
}
|
993 |
|
994 |
public function get_last_auto_sync_product_info(){
|
admin/css/enhanced-ecommerce-google-analytics-admin.css
CHANGED
@@ -705,4 +705,9 @@ img{
|
|
705 |
|
706 |
.google_conversion_label_message{
|
707 |
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
708 |
}
|
705 |
|
706 |
.google_conversion_label_message{
|
707 |
margin-top: 20px;
|
708 |
+
}
|
709 |
+
|
710 |
+
.auto_product_sync_save_button{
|
711 |
+
text-align: center;
|
712 |
+
margin-left: 80px;
|
713 |
}
|
admin/css/style.css
CHANGED
@@ -40,7 +40,6 @@ select#tvc_conversion_tracking_type{
|
|
40 |
}
|
41 |
.btn-11 {
|
42 |
overflow: hidden;
|
43 |
-
animation: shiny-btn2 2s ease-in-out infinite;
|
44 |
}
|
45 |
.btn-11:hover{-webkit-animation: 0;}
|
46 |
.btn-11:before {
|
@@ -52,28 +51,27 @@ select#tvc_conversion_tracking_type{
|
|
52 |
width: 30px;
|
53 |
height: 100%;
|
54 |
background-color: #fff;
|
55 |
-
animation: shiny-btn1 5s ease-in-out infinite;
|
56 |
}
|
57 |
|
58 |
-
|
59 |
0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
|
60 |
40% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
|
61 |
70% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
|
62 |
100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
|
63 |
}
|
64 |
@-webkit-keyframes shiny-btn2 {
|
65 |
-
|
66 |
25% { top:73%; }
|
67 |
50% { top:72%; }
|
68 |
75% { top:73%; }
|
69 |
-
100% { top:74%; }
|
70 |
0% { right:0%; }
|
71 |
25% { right:-1%; }
|
72 |
50% { right:-3%; }
|
73 |
75% { right:-1%; }
|
74 |
100% { right:0%; }
|
75 |
|
76 |
-
}
|
77 |
.product_batch_size{position: relative; margin-top: 10px; float: right;}
|
78 |
.product_batch_size label{ margin-right: 23px;}
|
79 |
.update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
|
@@ -1157,7 +1155,7 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
|
|
1157 |
right: 14px;
|
1158 |
}
|
1159 |
/* feedback-form */
|
1160 |
-
#feedback-form-wrapper #feedback_record_btn > button { position: fixed;right: 0;
|
1161 |
#feedback-form-wrapper .rating-input-wrapper input[type="radio"] { display: none; }
|
1162 |
.rating-input-wrapper input[type="radio"] ~ span { cursor: pointer; }
|
1163 |
.rating-input-wrapper{ display: flex;flex-direction: row;justify-content: flex-start; }
|
@@ -1170,7 +1168,7 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
|
|
1170 |
.feedback_txtarea_div{ display: flex;flex-direction: column;justify-content: flex-start; }
|
1171 |
.feedback_txtarea{ margin: 0px 2px; }
|
1172 |
#charcount{ text-align: end;padding: 1px 0px;font-size: smaller;}
|
1173 |
-
.feedback_btn{ margin: 0;text-transform: none;-webkit-appearance: button;transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;border: 1px solid transparent; text-align: center;text-decoration: none;vertical-align: middle;display: inline-block; font-weight: 400; line-height: 1.5; color: #fff;border-radius: 0!important; padding: 0.
|
1174 |
.feedback_btn:hover{ color: #fff; }
|
1175 |
/* end feedback-form */
|
1176 |
|
@@ -1369,4 +1367,9 @@ img.img-upload {
|
|
1369 |
.pmax-campaign .fromfiled{max-width: 350px;}
|
1370 |
.pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
|
1371 |
.pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
|
1372 |
-
/*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
.btn-11 {
|
42 |
overflow: hidden;
|
|
|
43 |
}
|
44 |
.btn-11:hover{-webkit-animation: 0;}
|
45 |
.btn-11:before {
|
51 |
width: 30px;
|
52 |
height: 100%;
|
53 |
background-color: #fff;
|
|
|
54 |
}
|
55 |
|
56 |
+
/*@-webkit-keyframes shiny-btn1 {
|
57 |
0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
|
58 |
40% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
|
59 |
70% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
|
60 |
100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
|
61 |
}
|
62 |
@-webkit-keyframes shiny-btn2 {
|
63 |
+
0% { top:74%; }
|
64 |
25% { top:73%; }
|
65 |
50% { top:72%; }
|
66 |
75% { top:73%; }
|
67 |
+
100% { top:74%; }
|
68 |
0% { right:0%; }
|
69 |
25% { right:-1%; }
|
70 |
50% { right:-3%; }
|
71 |
75% { right:-1%; }
|
72 |
100% { right:0%; }
|
73 |
|
74 |
+
}*/
|
75 |
.product_batch_size{position: relative; margin-top: 10px; float: right;}
|
76 |
.product_batch_size label{ margin-right: 23px;}
|
77 |
.update-nag, .updated, .error, .is-dismissible, .notice { display: none !important; }
|
1155 |
right: 14px;
|
1156 |
}
|
1157 |
/* feedback-form */
|
1158 |
+
#feedback-form-wrapper #feedback_record_btn > button { position: fixed;right: 0;bottom: 7%;transform: rotate(-90deg) translate(50%, -50%);transform-origin: right;z-index: 999;width: 110px;font-size: 19px; }
|
1159 |
#feedback-form-wrapper .rating-input-wrapper input[type="radio"] { display: none; }
|
1160 |
.rating-input-wrapper input[type="radio"] ~ span { cursor: pointer; }
|
1161 |
.rating-input-wrapper{ display: flex;flex-direction: row;justify-content: flex-start; }
|
1168 |
.feedback_txtarea_div{ display: flex;flex-direction: column;justify-content: flex-start; }
|
1169 |
.feedback_txtarea{ margin: 0px 2px; }
|
1170 |
#charcount{ text-align: end;padding: 1px 0px;font-size: smaller;}
|
1171 |
+
.feedback_btn{ margin: 0;text-transform: none;-webkit-appearance: button;transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;border: 1px solid transparent; text-align: center;text-decoration: none;vertical-align: middle;display: inline-block; font-weight: 400; line-height: 1.5; color: #fff;border-radius: 0!important; padding: 0.1rem 0rem; background-color: #2D62ED;border-color: #2D62ED; }
|
1172 |
.feedback_btn:hover{ color: #fff; }
|
1173 |
/* end feedback-form */
|
1174 |
|
1367 |
.pmax-campaign .fromfiled{max-width: 350px;}
|
1368 |
.pmax-campaign .cmp_urls .fromfiled{max-width: 500px;}
|
1369 |
.pmax-campaign .cmp_urls .form-col-8 {width: 45%;}
|
1370 |
+
/*.pmax-campaign .fromfiled.smtext{max-width: 200px;}*/
|
1371 |
+
|
1372 |
+
.tvc-auto-product-sync-form .ga-title{position: relative;}
|
1373 |
+
.tvc-product-sync-toolip{ position: absolute; display: inline-block; width: auto; top: -5px; margin-left: 2px;}
|
1374 |
+
.tvc-product-sync-toolip .tvc-tooltip-right{ line-height: 1.2; bottom: 6px; left: 125%; top: auto;}
|
1375 |
+
.tvc-auto-product-sync-form .tvc-pro {margin-left: 20px;}
|
enhanced-ecommerce-google-analytics.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
|
16 |
* Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
|
17 |
* Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
|
18 |
-
* Version: 4.8.
|
19 |
* Author: Conversios
|
20 |
* Author URI: conversios.io
|
21 |
* License: GPL-2.0+
|
@@ -37,7 +37,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
-
define( 'PLUGIN_TVC_VERSION', '4.8.
|
41 |
$fullName = plugin_basename( __FILE__ );
|
42 |
$dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
|
43 |
if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
|
15 |
* Plugin Name: Conversios.io - Google Analytics and Google Shopping plugin for WooCommerce
|
16 |
* Plugin URI: https://www.tatvic.com/tatvic-labs/woocommerce-extension/
|
17 |
* Description: Automates eCommerce tracking in Google Analytics, dynamic remarkting in Google Ads, and provides complete Google Shopping features.
|
18 |
+
* Version: 4.8.7
|
19 |
* Author: Conversios
|
20 |
* Author URI: conversios.io
|
21 |
* License: GPL-2.0+
|
37 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
38 |
* Rename this for your plugin and update it as you release new versions.
|
39 |
*/
|
40 |
+
define( 'PLUGIN_TVC_VERSION', '4.8.7' );
|
41 |
$fullName = plugin_basename( __FILE__ );
|
42 |
$dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
|
43 |
if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
|
includes/data/class-tvc-ajax-file.php
CHANGED
@@ -35,6 +35,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
|
|
35 |
add_action('wp_ajax_tvc_call_site_verified', array($this, 'tvc_call_site_verified'));
|
36 |
add_action('wp_ajax_tvc_call_notice_dismiss', array($this, 'tvc_call_notice_dismiss'));
|
37 |
add_action('wp_ajax_tvc_call_notification_dismiss', array($this, 'tvc_call_notification_dismiss'));
|
|
|
38 |
add_action('wp_ajax_tvc_call_active_licence', array($this, 'tvc_call_active_licence'));
|
39 |
add_action('wp_ajax_tvc_call_add_survey', array($this, 'tvc_call_add_survey'));
|
40 |
|
@@ -279,7 +280,26 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
|
|
279 |
}
|
280 |
exit;
|
281 |
}
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
public function tvc_call_notification_dismiss(){
|
284 |
if($this->safe_ajax_call(filter_input(INPUT_POST, 'TVCNonce'), 'tvc_call_notification_dismiss-nonce')){
|
285 |
$ee_dismiss_id = isset($_POST['data']['ee_dismiss_id'])?sanitize_text_field($_POST['data']['ee_dismiss_id']):"";
|
35 |
add_action('wp_ajax_tvc_call_site_verified', array($this, 'tvc_call_site_verified'));
|
36 |
add_action('wp_ajax_tvc_call_notice_dismiss', array($this, 'tvc_call_notice_dismiss'));
|
37 |
add_action('wp_ajax_tvc_call_notification_dismiss', array($this, 'tvc_call_notification_dismiss'));
|
38 |
+
add_action('wp_ajax_auto_product_sync_setting', array($this, 'auto_product_sync_setting'));
|
39 |
add_action('wp_ajax_tvc_call_active_licence', array($this, 'tvc_call_active_licence'));
|
40 |
add_action('wp_ajax_tvc_call_add_survey', array($this, 'tvc_call_add_survey'));
|
41 |
|
280 |
}
|
281 |
exit;
|
282 |
}
|
283 |
+
public function auto_product_sync_setting(){
|
284 |
+
if ( is_admin() ) {
|
285 |
+
as_unschedule_all_actions( 'ee_auto_product_sync_check' );
|
286 |
+
$product_sync_duration = isset($_POST['product_sync_duration'])?sanitize_text_field($_POST['product_sync_duration']):"";
|
287 |
+
$pro_snyc_time_limit = isset($_POST['pro_snyc_time_limit'])?sanitize_text_field($_POST['pro_snyc_time_limit']):"";
|
288 |
+
$product_sync_batch_size = isset($_POST['product_sync_batch_size'])?sanitize_text_field($_POST['product_sync_batch_size']):"";
|
289 |
+
$TVC_Admin_Helper = new TVC_Admin_Helper();
|
290 |
+
if($product_sync_duration != "" && $pro_snyc_time_limit != "" && $product_sync_batch_size != ""){
|
291 |
+
$ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
|
292 |
+
$ee_additional_data['product_sync_duration'] = $product_sync_duration;
|
293 |
+
$ee_additional_data['pro_snyc_time_limit'] = $pro_snyc_time_limit;
|
294 |
+
$ee_additional_data['product_sync_batch_size'] = $product_sync_batch_size;
|
295 |
+
$TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
|
296 |
+
echo json_encode(array('error' => false, 'message' => esc_html__("Time interval and batch size successfully saved.","conversios")));
|
297 |
+
}else{
|
298 |
+
echo json_encode(array('error' => true, 'message' => esc_html__("Error occured while saving the settings.","conversios")));
|
299 |
+
}
|
300 |
+
}
|
301 |
+
exit;
|
302 |
+
}
|
303 |
public function tvc_call_notification_dismiss(){
|
304 |
if($this->safe_ajax_call(filter_input(INPUT_POST, 'TVCNonce'), 'tvc_call_notification_dismiss-nonce')){
|
305 |
$ee_dismiss_id = isset($_POST['data']['ee_dismiss_id'])?sanitize_text_field($_POST['data']['ee_dismiss_id']):"";
|
includes/setup/google-shopping-feed-gaa-config.php
CHANGED
@@ -3,13 +3,15 @@ class GAAConfiguration {
|
|
3 |
protected $TVC_Admin_Helper;
|
4 |
protected $subscriptionId;
|
5 |
protected $TVCProductSyncHelper;
|
|
|
6 |
public function __construct() {
|
7 |
$this->includes();
|
8 |
$this->TVC_Admin_Helper = new TVC_Admin_Helper();
|
9 |
$this->TVCProductSyncHelper = new TVCProductSyncHelper();
|
10 |
$this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
|
11 |
$this->site_url = "admin.php?page=conversios-google-shopping-feed&tab=";
|
12 |
-
$this->url = $this->TVC_Admin_Helper->get_onboarding_page_url();
|
|
|
13 |
$this->html_run();
|
14 |
}
|
15 |
public function includes() {
|
@@ -41,6 +43,10 @@ class GAAConfiguration {
|
|
41 |
$category_wrapper = $category_wrapper_obj->category_table_content('mapping');
|
42 |
$googleDetail = [];
|
43 |
$google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
|
|
|
|
|
|
|
|
|
44 |
if(isset($google_detail['setting'])){
|
45 |
if ($google_detail['setting']) {
|
46 |
$googleDetail = $google_detail['setting'];
|
@@ -91,15 +97,15 @@ class GAAConfiguration {
|
|
91 |
<?php
|
92 |
if (isset($googleDetail->google_merchant_center_id) && esc_attr($googleDetail->google_merchant_center_id) != '') {?>
|
93 |
<div class="row mb-3">
|
94 |
-
<div class="col-6 col-md-
|
95 |
<h2 class="ga-title"><?php esc_html_e("Sync Products:","conversios"); ?></h2>
|
96 |
</div>
|
97 |
-
<div class="col-6 col-md-
|
98 |
<button id="tvc_btn_product_sync" type="button" class="btn btn-primary btn-success" data-bs-toggle="modal" data-bs-target="#syncProduct"><?php esc_html_e("Sync New Products","conversios"); ?></button>
|
99 |
</div>
|
100 |
</div>
|
101 |
<div class="row mb-3">
|
102 |
-
<div class="col-6 col-md-
|
103 |
<h2 class="ga-title"><?php esc_html_e("Smart Shopping Campaigns:","conversios"); ?></h2>
|
104 |
</div>
|
105 |
<div class="col-6 col-md-6">
|
@@ -108,22 +114,85 @@ class GAAConfiguration {
|
|
108 |
</div>
|
109 |
<?php }else{ ?>
|
110 |
<div class="row mb-3">
|
111 |
-
<div class="col-6 col-md-
|
112 |
<h2 class="ga-title"><?php esc_html_e("Sync Products:","conversios"); ?></h2>
|
113 |
</div>
|
114 |
-
<div class="col-6 col-md-
|
115 |
<a href="<?php echo esc_url_raw($this->url); ?>" class="btn btn-primary btn-success"><?php esc_html_e("Sync New Products","conversios"); ?></a>
|
116 |
</div>
|
117 |
</div>
|
118 |
<div class="row mb-3">
|
119 |
-
<div class="col-6 col-md-
|
120 |
<h2 class="ga-title"><?php esc_html_e("Smart Shopping Campaigns:","conversios"); ?></h2>
|
121 |
</div>
|
122 |
<div class="col-6 col-md-6">
|
123 |
-
<a href="<?php echo esc_url_raw($this->url); ?>" class="btn btn-primary btn-success"><?php esc_html_e("Create Smart Shopping Campaign","conversios"); ?></a>
|
124 |
</div>
|
125 |
</div>
|
126 |
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
</div>
|
128 |
</div>
|
129 |
</div>
|
@@ -163,6 +232,82 @@ if(isset($googleDetail->google_merchant_center_id) && esc_attr($googleDetail->go
|
|
163 |
}
|
164 |
});
|
165 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
</script>
|
167 |
<?php
|
168 |
} //create_form
|
3 |
protected $TVC_Admin_Helper;
|
4 |
protected $subscriptionId;
|
5 |
protected $TVCProductSyncHelper;
|
6 |
+
protected $plan_id;
|
7 |
public function __construct() {
|
8 |
$this->includes();
|
9 |
$this->TVC_Admin_Helper = new TVC_Admin_Helper();
|
10 |
$this->TVCProductSyncHelper = new TVCProductSyncHelper();
|
11 |
$this->subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
|
12 |
$this->site_url = "admin.php?page=conversios-google-shopping-feed&tab=";
|
13 |
+
$this->url = $this->TVC_Admin_Helper->get_onboarding_page_url();
|
14 |
+
$this->plan_id = $this->TVC_Admin_Helper->get_plan_id();
|
15 |
$this->html_run();
|
16 |
}
|
17 |
public function includes() {
|
43 |
$category_wrapper = $category_wrapper_obj->category_table_content('mapping');
|
44 |
$googleDetail = [];
|
45 |
$google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
|
46 |
+
$ee_additional_data = $this->TVC_Admin_Helper->get_ee_additional_data();
|
47 |
+
$product_sync_duration = isset($ee_additional_data['product_sync_duration'])?sanitize_text_field($ee_additional_data['product_sync_duration']):"";
|
48 |
+
$pro_snyc_time_limit = (isset($ee_additional_data['pro_snyc_time_limit']) && $ee_additional_data['pro_snyc_time_limit'] > 0) ? sanitize_text_field($ee_additional_data['pro_snyc_time_limit']):"25";
|
49 |
+
$product_sync_batch_size = (isset($ee_additional_data['product_sync_batch_size']) && $ee_additional_data['product_sync_batch_size'] > 0) ? sanitize_text_field($ee_additional_data['product_sync_batch_size']):"50";
|
50 |
if(isset($google_detail['setting'])){
|
51 |
if ($google_detail['setting']) {
|
52 |
$googleDetail = $google_detail['setting'];
|
97 |
<?php
|
98 |
if (isset($googleDetail->google_merchant_center_id) && esc_attr($googleDetail->google_merchant_center_id) != '') {?>
|
99 |
<div class="row mb-3">
|
100 |
+
<div class="col-6 col-md-6">
|
101 |
<h2 class="ga-title"><?php esc_html_e("Sync Products:","conversios"); ?></h2>
|
102 |
</div>
|
103 |
+
<div class="col-6 col-md-6">
|
104 |
<button id="tvc_btn_product_sync" type="button" class="btn btn-primary btn-success" data-bs-toggle="modal" data-bs-target="#syncProduct"><?php esc_html_e("Sync New Products","conversios"); ?></button>
|
105 |
</div>
|
106 |
</div>
|
107 |
<div class="row mb-3">
|
108 |
+
<div class="col-6 col-md-6">
|
109 |
<h2 class="ga-title"><?php esc_html_e("Smart Shopping Campaigns:","conversios"); ?></h2>
|
110 |
</div>
|
111 |
<div class="col-6 col-md-6">
|
114 |
</div>
|
115 |
<?php }else{ ?>
|
116 |
<div class="row mb-3">
|
117 |
+
<div class="col-6 col-md-6">
|
118 |
<h2 class="ga-title"><?php esc_html_e("Sync Products:","conversios"); ?></h2>
|
119 |
</div>
|
120 |
+
<div class="col-6 col-md-6">
|
121 |
<a href="<?php echo esc_url_raw($this->url); ?>" class="btn btn-primary btn-success"><?php esc_html_e("Sync New Products","conversios"); ?></a>
|
122 |
</div>
|
123 |
</div>
|
124 |
<div class="row mb-3">
|
125 |
+
<div class="col-6 col-md-6">
|
126 |
<h2 class="ga-title"><?php esc_html_e("Smart Shopping Campaigns:","conversios"); ?></h2>
|
127 |
</div>
|
128 |
<div class="col-6 col-md-6">
|
129 |
+
<a href="<?php echo esc_url_raw($this->url); ?>" class="btn btn-primary btn-success "><?php esc_html_e("Create Smart Shopping Campaign","conversios"); ?></a>
|
130 |
</div>
|
131 |
</div>
|
132 |
<?php } ?>
|
133 |
+
<?php if($this->plan_id != 1){ ?>
|
134 |
+
<form method="post" class="tvc-auto-product-sync-form">
|
135 |
+
<div class="row mb-3">
|
136 |
+
<div class="col-6 col-md-6 col-lg-6">
|
137 |
+
<h2 class="ga-title"><?php esc_html_e("Select time interval for product sync","conversios"); ?>
|
138 |
+
<div class="tvc-tooltip tvc-product-sync-toolip">
|
139 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("This will periodically sync your products in the google merchant center as it is important to keep your store products updated in the merchant center if you are running shopping ads. By default the products will get sync after every 25 days.","conversios"); ?></span>
|
140 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
141 |
+
</div>
|
142 |
+
<span class="tvc-pro">: (PRO)</span></h2>
|
143 |
+
</div>
|
144 |
+
<div class="col-6 col-md-6 col-lg-6 text-right">
|
145 |
+
<input id="pro_snyc_time_limit" name="pro_snyc_time_limit" value="<?php echo esc_attr($pro_snyc_time_limit);?>" class="pro_snyc_time_limit" type="number" min="1" max="28" >
|
146 |
+
<select name="product_sync_duration" class="product_sync_duration">
|
147 |
+
<option value="Day" <?php echo esc_attr($product_sync_duration) == 'Day' ? 'selected' : ''?>>Day</option>
|
148 |
+
<option value="hour" <?php echo esc_attr($product_sync_duration) == 'hour' ? 'selected' : ''?>>Hour</option>
|
149 |
+
</select>
|
150 |
+
</div>
|
151 |
+
</div>
|
152 |
+
<div class="row mb-3">
|
153 |
+
<div class="col-6 col-md-6 col-lg-6">
|
154 |
+
<h2 class="ga-title"><?php esc_html_e("Select product sync batch size","conversios"); ?>
|
155 |
+
<div class="tvc-tooltip tvc-product-sync-toolip">
|
156 |
+
<span class="tvc-tooltiptext tvc-tooltip-right"><?php esc_html_e("The product sync will happen based on the batch size you select. By default the batch size is 50 products per batch. This should be set up based on your server configuration in order to manage your site performance.","conversios"); ?></span>
|
157 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg"); ?>" alt=""/>
|
158 |
+
</div>
|
159 |
+
<span class="tvc-pro">: (PRO)</span></h2>
|
160 |
+
</div>
|
161 |
+
<div class="col-6 col-md-6 col-lg-6 text-right">
|
162 |
+
<select name="product_sync_batch_size" class="product_sync_batch_size">
|
163 |
+
|
164 |
+
<option value="10" <?php echo esc_attr($product_sync_batch_size) == '10' ? 'selected' : ''?> >10</option>
|
165 |
+
<option value="25" <?php echo esc_attr($product_sync_batch_size) == '25' ? 'selected' : ''?>>25</option>
|
166 |
+
<option value="50" <?php echo esc_attr($product_sync_batch_size) == '50' ? 'selected' : ''?>>50</option>
|
167 |
+
<option value="100" <?php echo esc_attr($product_sync_batch_size) == '100' ? 'selected' : ''?>>100</option>
|
168 |
+
|
169 |
+
</select>
|
170 |
+
</div>
|
171 |
+
</div>
|
172 |
+
<div class="auto_product_sync_save_button mb-3">
|
173 |
+
<div class="col-12 col-md-12 col-lg-12">
|
174 |
+
<button type="submit" id="auto_product_sync_save" class="auto_product_sync_save btn btn-primary btn-success" name="auto_product_sync_setting_save"><?php esc_html_e("Save","conversios"); ?></button>
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
</form>
|
178 |
+
<?php }else{ ?>
|
179 |
+
<div class="row">
|
180 |
+
<div class="col-6 col-md-6 col-lg-6">
|
181 |
+
<h2 class="ga-title"><?php esc_html_e("Select time interval for product sync:","conversios"); ?><span class="tvc-pro"> (PRO)</span></h2>
|
182 |
+
</div>
|
183 |
+
<div class="col-6 col-md-6 col-lg-6 mt-2">
|
184 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>">
|
185 |
+
</div>
|
186 |
+
</div>
|
187 |
+
<div class="row ">
|
188 |
+
<div class="col-6 col-md-6 col-lg-6">
|
189 |
+
<h2 class="ga-title"><?php esc_html_e("Select product sync batch size:","conversios"); ?><span class="tvc-pro"> (PRO)</span></h2>
|
190 |
+
</div>
|
191 |
+
<div class="col-6 col-md-6 col-lg-6 mt-2">
|
192 |
+
<img src="<?php echo esc_url_raw(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" >
|
193 |
+
</div>
|
194 |
+
</div>
|
195 |
+
<?php } ?>
|
196 |
</div>
|
197 |
</div>
|
198 |
</div>
|
232 |
}
|
233 |
});
|
234 |
});
|
235 |
+
</script>
|
236 |
+
<script type="text/javascript">
|
237 |
+
jQuery(".auto_product_sync_save").click(function(e){
|
238 |
+
e.preventDefault();
|
239 |
+
let pro_snyc_time_limit = jQuery(".pro_snyc_time_limit").val();
|
240 |
+
let product_sync_duration = jQuery(".product_sync_duration").val();
|
241 |
+
let product_sync_batch_size = jQuery(".product_sync_batch_size").val();
|
242 |
+
var data = {
|
243 |
+
action: "auto_product_sync_setting",
|
244 |
+
product_sync_duration:product_sync_duration,
|
245 |
+
pro_snyc_time_limit:pro_snyc_time_limit,
|
246 |
+
product_sync_batch_size:product_sync_batch_size
|
247 |
+
};
|
248 |
+
|
249 |
+
jQuery.ajax({
|
250 |
+
type: "POST",
|
251 |
+
dataType: "json",
|
252 |
+
url: tvc_ajax_url,
|
253 |
+
data: data,
|
254 |
+
beforeSend: function(){
|
255 |
+
tvc_helper.loaderSection(true);
|
256 |
+
},
|
257 |
+
success: function(response){
|
258 |
+
if (response.error === false) {
|
259 |
+
tvc_helper.tvc_alert("success","",response.message);
|
260 |
+
|
261 |
+
}else{
|
262 |
+
tvc_helper.tvc_alert("error","",response.message);
|
263 |
+
}
|
264 |
+
setTimeout(function(){
|
265 |
+
tvc_helper.loaderSection(false);
|
266 |
+
}, 2000);
|
267 |
+
}
|
268 |
+
});
|
269 |
+
});
|
270 |
+
</script>
|
271 |
+
<script type="text/javascript">
|
272 |
+
var selectedopt =jQuery('.product_sync_duration').val();
|
273 |
+
jQuery('#pro_snyc_time_limit').on('blur', function(e){
|
274 |
+
e.preventDefault();
|
275 |
+
var val = Number(jQuery(this).val());
|
276 |
+
if(selectedopt== "hour"){
|
277 |
+
if (val > 23 ) {
|
278 |
+
jQuery(this).val(23);
|
279 |
+
} else if (val < 12) {
|
280 |
+
jQuery(this).val(12);
|
281 |
+
}
|
282 |
+
}else{
|
283 |
+
if (val > 28 ) {
|
284 |
+
jQuery(this).val(28);
|
285 |
+
} else if (val < 1) {
|
286 |
+
jQuery(this).val(1);
|
287 |
+
}
|
288 |
+
}
|
289 |
+
});
|
290 |
+
|
291 |
+
|
292 |
+
jQuery('.product_sync_duration').change(function(){
|
293 |
+
var val = Number(jQuery("#pro_snyc_time_limit").val());
|
294 |
+
selectedopt= jQuery(this).val();
|
295 |
+
if(selectedopt== "hour"){
|
296 |
+
if (val > 23 ) {
|
297 |
+
//alert("hour");
|
298 |
+
jQuery("#pro_snyc_time_limit").val(23);
|
299 |
+
} else if (val < 12) {
|
300 |
+
jQuery("#pro_snyc_time_limit").val(12);
|
301 |
+
}
|
302 |
+
}else{
|
303 |
+
if (val > 28 ) {
|
304 |
+
//alert("day");
|
305 |
+
jQuery("#pro_snyc_time_limit").val(28);
|
306 |
+
} else if (val < 1) {
|
307 |
+
jQuery("#pro_snyc_time_limit").val(1);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
});
|
311 |
</script>
|
312 |
<?php
|
313 |
} //create_form
|
readme.txt
CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
|
|
8 |
Requires at least: 3.5.0
|
9 |
Tested up to: 6.0.1
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
-
Stable tag: 4.8.
|
12 |
-
Version: 4.8.
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
@@ -416,6 +416,9 @@ In GA3 (Universal Analytics) usually, it takes 0 to 45 mins and in GA4 it can ta
|
|
416 |
|
417 |
|
418 |
== Changelog ==
|
|
|
|
|
|
|
419 |
= 4.8.6 - 04/08/2022 =
|
420 |
* Fix: Minor bugs fixes.
|
421 |
|
8 |
Requires at least: 3.5.0
|
9 |
Tested up to: 6.0.1
|
10 |
Requires PHP: 5.6 or Higher
|
11 |
+
Stable tag: 4.8.7
|
12 |
+
Version: 4.8.7
|
13 |
License: GPLv3
|
14 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
15 |
|
416 |
|
417 |
|
418 |
== Changelog ==
|
419 |
+
= 4.8.7 - 09/08/2022 =
|
420 |
+
* Long awaited product sync feature is out for our Pro users. Now you can manage your product sync duration and product batch size on your own at your convenience.
|
421 |
+
|
422 |
= 4.8.6 - 04/08/2022 =
|
423 |
* Fix: Minor bugs fixes.
|
424 |
|