Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 3.0.3

Version Description

  • 30/03/2021 =
    • Added double check for auto site verification for merchant center accounts
    • Added double check for auto domain claim for merchant center accounts
    • Bug fix for HTTP_HOST php warning raised by some clients
    • User friendly feature notifications
    • Removal of Brand, GTIN and MPN custom product meta fields addition from the plugin
Download this release

Release Info

Developer Tatvic
Plugin Icon 128x128 Enhanced Ecommerce Google Analytics Plugin for WooCommerce
Version 3.0.3
Comparing to
See all releases

Code changes from version 3.0.2 to 3.0.3

admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -51,17 +51,38 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
51
  protected $ga_id;
52
  protected $ga_LC;
53
  protected $ga_eeT;
54
- protected $setting_status;
55
  protected $site_url;
56
  public function __construct($plugin_name, $version) {
57
  $this->plugin_name = $plugin_name;
58
  $this->version = $version;
59
- $this->accessToken = isset($_GET['access_token']) ? $_GET['access_token'] : '';
60
- $this->refreshToken = isset($_GET['refresh_token']) ? $_GET['refresh_token'] : '';
61
- $this->email = isset($_GET['email']) ? $_GET['email'] : '';
62
  $this->url = $this->get_connect_url();
63
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
64
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  /**
67
  * Register the stylesheets for the admin area.
@@ -113,7 +134,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
113
  wp_enqueue_script('aga_bootstrap_mod');
114
  wp_register_script('aga_confirm_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js');
115
  wp_enqueue_script('aga_confirm_js');
116
- // wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/enhanced-ecommerce-google-analytics-admin.js', array('jquery'), $this->version, false);
117
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
118
  wp_register_script('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js');
119
  wp_enqueue_script('plugin-select2');
@@ -166,6 +187,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
166
  echo '<div class="tvc_plugin_container">';
167
  require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
168
  new TVC_Tabs();
 
169
  if (!empty($_GET['tab'])) {
170
  $get_action = $_GET['tab'];
171
  } else {
@@ -175,6 +197,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
175
  $this->$get_action();
176
  }
177
  echo '</div>';
 
178
  }
179
  public function check_nall_and_message($val, $msg, $msg_false){
180
  if((isset($val) && $val != "" && $val != 0) ){
@@ -183,161 +206,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
183
  return $msg_false;
184
  }
185
  }
186
- public function check_setting_status(){
187
- if(!empty($this->setting_status)){
188
- return $this->setting_status;
189
- }else{
190
- $google_detail = $this->get_ee_options_data();
191
- $setting_status = array();
192
- if(isset($google_detail['setting'])){
193
- $googleDetail = $google_detail['setting'];
194
- //for google analytic
195
- if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "BOTH" ){
196
- if($googleDetail->property_id != "" && $googleDetail->measurement_id != ""){
197
- $setting_status['google_analytic']= true;
198
- $setting_status['google_analytic_msg']= "";
199
- }else if($googleDetail->property_id == "" ){
200
- $setting_status['google_analytic']= false;
201
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
202
- }else if($googleDetail->measurement_id == "" ){
203
- $setting_status['google_analytic']= false;
204
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
205
- }
206
- }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
207
- if( $googleDetail->measurement_id != ""){
208
- $setting_status['google_analytic']= true;
209
- $setting_status['google_analytic_msg']= "";
210
- }else{
211
- $setting_status['google_analytic']= false;
212
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
213
- }
214
- }else if(isset($googleDetail->tracking_option) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "UA" ){
215
- if($googleDetail->property_id != ""){
216
- $setting_status['google_analytic']= true;
217
- $setting_status['google_analytic_msg']= "";
218
- }else{
219
- $setting_status['google_analytic']= false;
220
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
221
- }
222
- }else{
223
- $setting_status['google_analytic']= false;
224
- $setting_status['google_analytic_msg']= "";
225
- }
226
- // for google shopping
227
- if(property_exists($googleDetail,"google_merchant_center_id") && property_exists($googleDetail,"google_ads_id") ){
228
- //main tab
229
- if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
230
- $setting_status['google_shopping']= true;
231
- $setting_status['google_shopping_msg']= "";
232
- }else if($googleDetail->google_merchant_center_id == ""){
233
- $setting_status['google_shopping']= false;
234
- $setting_status['google_shopping_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
235
- }else if($googleDetail->google_ads_id == ""){
236
- $setting_status['google_shopping']= false;
237
- $setting_status['google_shopping_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
238
- }
239
- }else{
240
- $setting_status['google_shopping']= false;
241
- $setting_status['google_shopping_msg']= "";
242
- }
243
-
244
- //google_ads_id
245
- if(property_exists($googleDetail,"google_ads_id") && property_exists($googleDetail,"google_merchant_center_id") ){
246
- if( $googleDetail->google_ads_id != "" && $googleDetail->google_merchant_center_id != ""){
247
- $setting_status['google_ads']= true;
248
- $setting_status['google_ads_msg']= "";
249
- }else if($googleDetail->google_merchant_center_id == ""){
250
- $setting_status['google_ads']= false;
251
- $setting_status['google_ads_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
252
- }else if($googleDetail->google_ads_id == ""){
253
- $setting_status['google_ads']= false;
254
- $setting_status['google_ads_msg']= "Configure Google Ads account to reach to millions of interested shoppers <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
255
- }
256
- }else{
257
- $setting_status['google_ads']= false;
258
- $setting_status['google_ads_msg']= "";
259
- }
260
- }
261
- $this->setting_status = $setting_status;
262
- return $setting_status;
263
- }
264
- }
265
- public function check_setting_status_sub_tabs(){
266
- $google_detail = $this->get_ee_options_data();
267
- $setting_status = array();
268
- if(isset($google_detail['setting'])){
269
- $googleDetail = $google_detail['setting'];
270
- //sub tab shopping config
271
- if(property_exists($googleDetail,"google_merchant_center_id") && property_exists($googleDetail,"is_site_verified") && property_exists($googleDetail,"is_domain_claim") && property_exists($googleDetail,"google_ads_id")){
272
- if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != "" && $googleDetail->is_site_verified == 1 && $googleDetail->is_domain_claim == 1 ){
273
- $setting_status['google_shopping_conf']= true;
274
- $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
275
- }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
276
- $setting_status['google_shopping_conf']= false;
277
- $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
278
- }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
279
- $setting_status['google_shopping_conf']= false;
280
- $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
281
- }else if($googleDetail->is_site_verified ==0 ){
282
- $setting_status['google_shopping_conf']= false;
283
- $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
284
- }else if($googleDetail->is_domain_claim ==0 ){
285
- $setting_status['google_shopping_conf']= false;
286
- $setting_status['google_shopping_conf_msg']= "Domain claim is pending. Your store url may be linked to other merchant center account.";
287
- }
288
- }else{
289
- $setting_status['google_shopping_conf']= false;
290
- $missing="";
291
- }
292
- //sub tab product sync
293
- $syncProductList = [];
294
- $syncProductStat = [];
295
- if(property_exists($googleDetail,"google_merchant_center_id") && $googleDetail->google_merchant_center_id != ''){
296
- if(isset($google_detail['prod_sync_status']) && $google_detail['prod_sync_status']){
297
- $syncProductStat = $google_detail['prod_sync_status'];
298
- $sync_product_total = (!empty($syncProductStat)) ? $syncProductStat->total : "0";
299
- $sync_product_approved = (!empty($syncProductStat)) ? $syncProductStat->approved : "0";
300
- $sync_product_disapproved = (!empty($syncProductStat)) ? $syncProductStat->disapproved : "0";
301
- $sync_product_pending = (!empty($syncProductStat)) ? $syncProductStat->pending : "0";
302
-
303
- if($sync_product_total > 1 && $sync_product_approved > 1 && $sync_product_disapproved < 1){
304
- $setting_status['google_shopping_p_sync']= true;
305
- $setting_status['google_shopping_p_sync_msg']= "Google Shopping product sync is a success.";
306
- }else if($sync_product_total < 1){
307
- $setting_status['google_shopping_p_sync']= false;
308
- $setting_status['google_shopping_p_sync_msg']= "Sync your product data into Merchant center and get eligible for free listing across Google.";
309
- }else if($sync_product_disapproved > 0){
310
- $setting_status['google_shopping_p_sync']= false;
311
- $setting_status['google_shopping_p_sync_msg']= "There seems to be some problem with your product data. Rectify the issues by selecting right attributes.";
312
- }
313
- }
314
- }else{
315
- $setting_status['google_shopping_p_sync']= false;
316
- $setting_status['google_shopping_p_sync_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
317
- }
318
-
319
- //sub tab product Campaigns
320
- if(property_exists($googleDetail,"google_merchant_center_id") && $googleDetail->google_merchant_center_id != ''){
321
- if(isset($google_detail['campaigns_list']) && $google_detail['campaigns_list']){
322
- $campaigns_list = $google_detail['campaigns_list'];
323
- $totalCampaigns = count($campaigns_list);
324
- if($totalCampaigns < 1){
325
- $setting_status['google_shopping_p_campaigns']= false;
326
- $setting_status['google_shopping_p_campaigns_msg']= "Reach out to customers based on their past site behavior by running start shopping campaign.";
327
- }else{
328
- $setting_status['google_shopping_p_campaigns']= true;
329
- }
330
- }else{
331
- $setting_status['google_shopping_p_campaigns']= false;
332
- $setting_status['google_shopping_p_campaigns_msg']= "Reach out to customers based on their past site behavior by running start shopping campaign.";
333
- }
334
- }else{
335
- $setting_status['google_shopping_p_campaigns']= false;
336
- $setting_status['google_shopping_p_campaigns_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
337
- }
338
- }
339
- return $setting_status;
340
- }
341
  public function general_settings() {
342
  require_once( 'partials/general-fields.php');
343
  }
51
  protected $ga_id;
52
  protected $ga_LC;
53
  protected $ga_eeT;
 
54
  protected $site_url;
55
  public function __construct($plugin_name, $version) {
56
  $this->plugin_name = $plugin_name;
57
  $this->version = $version;
 
 
 
58
  $this->url = $this->get_connect_url();
59
  $this->site_url = "admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=";
60
  }
61
+ public function tvc_admin_notice(){
62
+ //global $pagenow;
63
+ if(!$this->get_subscriptionId()){
64
+ echo '<div class="notice notice-info is-dismissible">
65
+ <p>Tatvic EE plugin is now fully compatible with Google Analytics 4. Also, explore the new features of Google Shopping and Dynamic remarketing to reach million of shoppers across Google and scale your eCommerce business faster. <a href="admin.php?page=enhanced-ecommerce-google-analytics-admin-display"><b><u>CONFIGURE NOW</u></b></a></p>
66
+ </div>';
67
+ }
68
+ $google_detail = $this->get_ee_options_data();
69
+ if(isset($google_detail['setting']) && $google_detail['setting']){
70
+ $googleDetail = $google_detail['setting'];
71
+ if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
72
+ echo '<div class="notice notice-info is-dismissible">
73
+ <p>Leverage the power of Google Shopping to reach out millions of shoppers across Google. Automate entire Google Shopping and get eligible for free listing when user searches on Google for products similar to your eCommerce business. <a href="admin.php?page=enhanced-ecommerce-google-analytics-admin-display"><b><u>Automate now</u></b></a></p>
74
+ </div>';
75
+ ?>
76
+ <style>
77
+ <?php
78
+
79
+ }
80
+ }
81
+
82
+
83
+
84
+ }
85
+
86
 
87
  /**
88
  * Register the stylesheets for the admin area.
134
  wp_enqueue_script('aga_bootstrap_mod');
135
  wp_register_script('aga_confirm_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js');
136
  wp_enqueue_script('aga_confirm_js');
137
+ wp_enqueue_script( 'tvc-ee-custom-js', ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js', array( 'jquery' ), $this->version, false );
138
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
139
  wp_register_script('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js');
140
  wp_enqueue_script('plugin-select2');
187
  echo '<div class="tvc_plugin_container">';
188
  require_once( 'partials/enhanced-ecommerce-google-analytics-admin-display.php');
189
  new TVC_Tabs();
190
+ echo $this->call_tvc_site_verified_and_domain_claim();
191
  if (!empty($_GET['tab'])) {
192
  $get_action = $_GET['tab'];
193
  } else {
197
  $this->$get_action();
198
  }
199
  echo '</div>';
200
+ echo $this->get_tvc_popup_message();
201
  }
202
  public function check_nall_and_message($val, $msg, $msg_false){
203
  if((isset($val) && $val != "" && $val != 0) ){
206
  return $msg_false;
207
  }
208
  }
209
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  public function general_settings() {
211
  require_once( 'partials/general-fields.php');
212
  }
admin/class-tvc-admin-helper.php CHANGED
@@ -14,10 +14,12 @@ Class TVC_Admin_Helper{
14
  protected $currentCustomerId = "";
15
  protected $user_currency_symbol = "";
16
  protected $setting_status = "";
17
- public function __construct($theURL = '') {
 
18
  $this->includes();
19
  $this->customApiObj = new CustomApi();
20
  }
 
21
  public function includes() {
22
  if (!class_exists('CustomApi.php')) {
23
  require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
@@ -27,6 +29,22 @@ Class TVC_Admin_Helper{
27
  }
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  public function is_ee_options_data_empty(){
31
  if($this->get_subscriptionId() != ""){
32
  if(empty($this->get_ee_options_data())){
@@ -78,7 +96,6 @@ Class TVC_Admin_Helper{
78
  $syncProductList = [];
79
  $campaigns_list = [];
80
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
81
-
82
  $syncProduct_list_res = $this->customApiObj->getSyncProductList(['merchant_id' => $this->get_merchantId()]);
83
  if(isset($syncProduct_list_res->data) && isset($syncProduct_list_res->status) && $syncProduct_list_res->status == 200){
84
  if (isset($syncProduct_list_res->data->statistics)) {
@@ -98,7 +115,7 @@ Class TVC_Admin_Helper{
98
  }
99
  }
100
  $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" =>$syncProductStat,"prod_sync_list" =>$syncProductList, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
101
- $tvc_msg ="";
102
  if(!empty($googleDetail)){
103
  $tvc_msg = "Configuration Setting";
104
  }
@@ -107,14 +124,27 @@ Class TVC_Admin_Helper{
107
  }
108
  if(!empty($campaigns_list)){
109
  $tvc_msg = ($tvc_msg != "")?$tvc_msg.", Shopping Campaigns":"Shopping Campaigns";
110
- }
111
- return "Success to sync up of ".$tvc_msg.".";
112
  }
113
 
114
  public function set_ee_options_data($ee_options_data){
115
  update_option("ee_api_data", serialize($ee_options_data));
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  public function get_ee_options_settings(){
119
  if(!empty($this->e_options_settings)){
120
  return $this->e_options_settings;
@@ -169,8 +199,8 @@ Class TVC_Admin_Helper{
169
  }else{
170
  $timezone = get_option('timezone_string');
171
  if($timezone == ""){
172
- $timezone = "America/New_York";
173
- }
174
  $this->time_zone = $timezone;
175
  return $this->time_zone;
176
  }
@@ -180,7 +210,7 @@ Class TVC_Admin_Helper{
180
  if(!empty($this->connect_actual_link)){
181
  return $this->connect_actual_link;
182
  }else{
183
- $this->connect_actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]";
184
  return $this->connect_actual_link;
185
  }
186
  }
@@ -198,9 +228,9 @@ Class TVC_Admin_Helper{
198
  if(!empty($this->woo_currency)){
199
  return $this->woo_currency;
200
  }else{
201
- $this->woo_currency = get_option('woocommerce_currency');
202
  return $this->woo_currency;
203
- }
204
  }
205
 
206
  public function get_woo_country(){
@@ -209,9 +239,9 @@ Class TVC_Admin_Helper{
209
  }else{
210
  $store_raw_country = get_option('woocommerce_default_country');
211
  $country = explode(":", $store_raw_country);
212
- $this->woo_country = (isset($country[0]))?$country[0]:"";
213
- return $this->woo_country;
214
- }
215
  }
216
  //tvc_customer = >google_ads_id
217
  public function get_currentCustomerId(){
@@ -227,18 +257,18 @@ Class TVC_Admin_Helper{
227
  }
228
  }
229
  public function get_user_currency_symbol(){
230
- if(!empty($this->get_user_currency_symbol)){
231
- return $this->get_user_currency_symbol;
232
  }else{
233
  $currency_symbol="";
234
  $currency_symbol_rs = $this->customApiObj->getCampaignCurrencySymbol(['customer_id' => $this->get_currentCustomerId()]);
235
- if(isset($currency_symbol_rs->data) && isset($currency_symbol_rs->data['status']) && $currency_symbol_rs->data['status'] == 200){
236
- $currency_symbol = get_woocommerce_currency_symbol($currency_symbol_rs->data['data']->currency);
237
- }else{
238
- $currency_symbol = get_woocommerce_currency_symbol("USD");
239
- }
240
- $this->currentCustomerId = $currency_symbol;
241
- return $this->currentCustomerId;
242
  }
243
  }
244
 
@@ -279,7 +309,7 @@ Class TVC_Admin_Helper{
279
  $countries_list = $this->get_gmc_language_list();
280
  ?>
281
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
282
- <option value="0"><?php echo $label; ?></option>
283
  <?php foreach ($countries_list as $Key => $val) {?>
284
  <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"]." (".$val["native_name"].")";?></option>
285
  <?php
@@ -294,7 +324,7 @@ Class TVC_Admin_Helper{
294
  $sel_val = $this->get_woo_country();
295
  ?>
296
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
297
- <option value="0"><?php echo $label; ?></option>
298
  <?php foreach ($countries_list as $Key => $val) {?>
299
  <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"];?></option>
300
  <?php
@@ -307,7 +337,7 @@ Class TVC_Admin_Helper{
307
  if(!empty($option_list) && $name){
308
  ?>
309
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
310
- <option value="0"><?php echo $label; ?></option>
311
  <?php foreach ($option_list as $Key => $val) {?>
312
  <option value="<?php echo $val["field"];?>" <?php echo($val["field"] == $sel_val)?"selected":""; ?>><?php echo $val["field"];?></option>
313
  <?php
@@ -338,10 +368,10 @@ Class TVC_Admin_Helper{
338
  $setting_status['google_analytic_msg']= "";
339
  }else if($googleDetail->property_id == "" ){
340
  $setting_status['google_analytic']= false;
341
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
342
  }else if($googleDetail->measurement_id == "" ){
343
  $setting_status['google_analytic']= false;
344
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
345
  }
346
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
347
  if( $googleDetail->measurement_id != ""){
@@ -349,7 +379,7 @@ Class TVC_Admin_Helper{
349
  $setting_status['google_analytic_msg']= "";
350
  }else{
351
  $setting_status['google_analytic']= false;
352
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
353
  }
354
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "UA" ){
355
  if($googleDetail->property_id != ""){
@@ -357,13 +387,15 @@ Class TVC_Admin_Helper{
357
  $setting_status['google_analytic_msg']= "";
358
  }else{
359
  $setting_status['google_analytic']= false;
360
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
361
  }
362
  }else{
363
  $setting_status['google_analytic']= false;
364
  $setting_status['google_analytic_msg']= "";
365
  }
366
  // for google shopping
 
 
367
  if(property_exists($googleDetail,"google_merchant_center_id") && property_exists($googleDetail,"google_ads_id") ){
368
  //main tab
369
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
@@ -371,10 +403,10 @@ Class TVC_Admin_Helper{
371
  $setting_status['google_shopping_msg']= "";
372
  }else if($googleDetail->google_merchant_center_id == ""){
373
  $setting_status['google_shopping']= false;
374
- $setting_status['google_shopping_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
375
  }else if($googleDetail->google_ads_id == ""){
376
  $setting_status['google_shopping']= false;
377
- $setting_status['google_shopping_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
378
  }
379
  }else{
380
  $setting_status['google_shopping']= false;
@@ -388,10 +420,10 @@ Class TVC_Admin_Helper{
388
  $setting_status['google_ads_msg']= "";
389
  }else if($googleDetail->google_merchant_center_id == ""){
390
  $setting_status['google_ads']= false;
391
- $setting_status['google_ads_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
392
  }else if($googleDetail->google_ads_id == ""){
393
  $setting_status['google_ads']= false;
394
- $setting_status['google_ads_msg']= "Configure Google Ads account to reach to millions of interested shoppers <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
395
  }
396
  }else{
397
  $setting_status['google_ads']= false;
@@ -414,7 +446,7 @@ Class TVC_Admin_Helper{
414
  $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
415
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
416
  $setting_status['google_shopping_conf']= false;
417
- $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
418
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
419
  $setting_status['google_shopping_conf']= false;
420
  $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
@@ -453,7 +485,7 @@ Class TVC_Admin_Helper{
453
  }
454
  }else{
455
  $setting_status['google_shopping_p_sync']= false;
456
- $setting_status['google_shopping_p_sync_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
457
  }
458
 
459
  //sub tab product Campaigns
@@ -473,7 +505,7 @@ Class TVC_Admin_Helper{
473
  }
474
  }else{
475
  $setting_status['google_shopping_p_campaigns']= false;
476
- $setting_status['google_shopping_p_campaigns_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->url)."'>click here</a>.";
477
  }
478
  }
479
  return $setting_status;
@@ -515,13 +547,95 @@ Class TVC_Admin_Helper{
515
  return $tvc_cat_id_list;
516
  }
517
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
  public function call_domain_claim(){
519
  $googleDetail = [];
520
  $google_detail = $this->get_ee_options_data();
521
  //print_r($google_detail);
522
  if(isset($google_detail['setting']) && $google_detail['setting']){
523
  $googleDetail = $google_detail['setting'];
524
- if($googleDetail->is_domain_claim == '0'){
 
 
525
  $postData = [
526
  'merchant_id' => $googleDetail->merchant_id,
527
  'website_url' => $googleDetail->site_url,
@@ -529,7 +643,6 @@ Class TVC_Admin_Helper{
529
  'account_id' => $googleDetail->google_merchant_center_id
530
  ];
531
  $claimWebsite = $this->customApiObj->claimWebsite($postData);
532
- //print_r($claimWebsite);
533
  if(isset($claimWebsite->error) && !empty($claimWebsite->errors)){
534
  return array('error'=>true, 'msg'=>$claimWebsite->errors[0]);
535
  }else{
@@ -537,9 +650,80 @@ Class TVC_Admin_Helper{
537
  return array('error'=>false, 'msg'=>"Domain claimed successfully.");
538
  }
539
  }else{
540
- return array('error'=>true, 'msg'=>"already domain claimed successfully");
541
  }
542
  }
543
  }
544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  }?>
14
  protected $currentCustomerId = "";
15
  protected $user_currency_symbol = "";
16
  protected $setting_status = "";
17
+ protected $ee_additional_data = "";
18
+ public function __construct() {
19
  $this->includes();
20
  $this->customApiObj = new CustomApi();
21
  }
22
+
23
  public function includes() {
24
  if (!class_exists('CustomApi.php')) {
25
  require_once(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
29
  }
30
  }
31
 
32
+ public function is_need_to_update_api_to_db(){
33
+ if($this->get_subscriptionId() != ""){
34
+ $google_detail = $this->get_ee_options_data();
35
+ if(isset($google_detail['sync_time']) && $google_detail['sync_time']){
36
+ $current = current_time( 'timestamp' );
37
+ //echo date( 'M-d-Y H:i', current_time( 'timestamp' ))."==>".date( 'M-d-Y H:i', $google_detail['sync_time']);
38
+ $diffrent_hours = floor(( $current - $google_detail['sync_time'])/(60*60));
39
+ if($diffrent_hours > 5){
40
+ return true;
41
+ }
42
+ }else if(empty($google_detail)){
43
+ return true;
44
+ }
45
+ }
46
+ return false;
47
+ }
48
  public function is_ee_options_data_empty(){
49
  if($this->get_subscriptionId() != ""){
50
  if(empty($this->get_ee_options_data())){
96
  $syncProductList = [];
97
  $campaigns_list = [];
98
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
 
99
  $syncProduct_list_res = $this->customApiObj->getSyncProductList(['merchant_id' => $this->get_merchantId()]);
100
  if(isset($syncProduct_list_res->data) && isset($syncProduct_list_res->status) && $syncProduct_list_res->status == 200){
101
  if (isset($syncProduct_list_res->data->statistics)) {
115
  }
116
  }
117
  $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" =>$syncProductStat,"prod_sync_list" =>$syncProductList, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
118
+ /*$tvc_msg ="";
119
  if(!empty($googleDetail)){
120
  $tvc_msg = "Configuration Setting";
121
  }
124
  }
125
  if(!empty($campaigns_list)){
126
  $tvc_msg = ($tvc_msg != "")?$tvc_msg.", Shopping Campaigns":"Shopping Campaigns";
127
+ }*/
128
+ return "Details updated successfully.";
129
  }
130
 
131
  public function set_ee_options_data($ee_options_data){
132
  update_option("ee_api_data", serialize($ee_options_data));
133
  }
134
 
135
+ public function set_ee_additional_data($ee_additional_data){
136
+ update_option("ee_additional_data", serialize($ee_additional_data));
137
+ }
138
+
139
+ public function get_ee_additional_data(){
140
+ if(!empty($this->ee_additional_data)){
141
+ return $this->ee_additional_data;
142
+ }else{
143
+ $this->ee_additional_data = unserialize(get_option('ee_additional_data'));
144
+ return $this->ee_additional_data;
145
+ }
146
+ }
147
+
148
  public function get_ee_options_settings(){
149
  if(!empty($this->e_options_settings)){
150
  return $this->e_options_settings;
199
  }else{
200
  $timezone = get_option('timezone_string');
201
  if($timezone == ""){
202
+ $timezone = "America/New_York";
203
+ }
204
  $this->time_zone = $timezone;
205
  return $this->time_zone;
206
  }
210
  if(!empty($this->connect_actual_link)){
211
  return $this->connect_actual_link;
212
  }else{
213
+ $this->connect_actual_link = get_site_url();
214
  return $this->connect_actual_link;
215
  }
216
  }
228
  if(!empty($this->woo_currency)){
229
  return $this->woo_currency;
230
  }else{
231
+ $this->woo_currency = get_option('woocommerce_currency');
232
  return $this->woo_currency;
233
+ }
234
  }
235
 
236
  public function get_woo_country(){
239
  }else{
240
  $store_raw_country = get_option('woocommerce_default_country');
241
  $country = explode(":", $store_raw_country);
242
+ $this->woo_country = (isset($country[0]))?$country[0]:"";
243
+ return $this->woo_country;
244
+ }
245
  }
246
  //tvc_customer = >google_ads_id
247
  public function get_currentCustomerId(){
257
  }
258
  }
259
  public function get_user_currency_symbol(){
260
+ if(!empty($this->user_currency_symbol)){
261
+ return $this->user_currency_symbol;
262
  }else{
263
  $currency_symbol="";
264
  $currency_symbol_rs = $this->customApiObj->getCampaignCurrencySymbol(['customer_id' => $this->get_currentCustomerId()]);
265
+ if(isset($currency_symbol_rs->data) && isset($currency_symbol_rs->data['status']) && $currency_symbol_rs->data['status'] == 200){
266
+ $currency_symbol = get_woocommerce_currency_symbol($currency_symbol_rs->data['data']->currency);
267
+ }else{
268
+ $currency_symbol = get_woocommerce_currency_symbol("USD");
269
+ }
270
+ $this->user_currency_symbol = $currency_symbol;
271
+ return $this->user_currency_symbol;
272
  }
273
  }
274
 
309
  $countries_list = $this->get_gmc_language_list();
310
  ?>
311
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
312
+ <option value=""><?php echo $label; ?></option>
313
  <?php foreach ($countries_list as $Key => $val) {?>
314
  <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"]." (".$val["native_name"].")";?></option>
315
  <?php
324
  $sel_val = $this->get_woo_country();
325
  ?>
326
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
327
+ <option value=""><?php echo $label; ?></option>
328
  <?php foreach ($countries_list as $Key => $val) {?>
329
  <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"];?></option>
330
  <?php
337
  if(!empty($option_list) && $name){
338
  ?>
339
  <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
340
+ <option value=""><?php echo $label; ?></option>
341
  <?php foreach ($option_list as $Key => $val) {?>
342
  <option value="<?php echo $val["field"];?>" <?php echo($val["field"] == $sel_val)?"selected":""; ?>><?php echo $val["field"];?></option>
343
  <?php
368
  $setting_status['google_analytic_msg']= "";
369
  }else if($googleDetail->property_id == "" ){
370
  $setting_status['google_analytic']= false;
371
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
372
  }else if($googleDetail->measurement_id == "" ){
373
  $setting_status['google_analytic']= false;
374
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
375
  }
376
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
377
  if( $googleDetail->measurement_id != ""){
379
  $setting_status['google_analytic_msg']= "";
380
  }else{
381
  $setting_status['google_analytic']= false;
382
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
383
  }
384
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "UA" ){
385
  if($googleDetail->property_id != ""){
387
  $setting_status['google_analytic_msg']= "";
388
  }else{
389
  $setting_status['google_analytic']= false;
390
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
391
  }
392
  }else{
393
  $setting_status['google_analytic']= false;
394
  $setting_status['google_analytic_msg']= "";
395
  }
396
  // for google shopping
397
+ //echo "<pre>";
398
+ //print_r($googleDetail);
399
  if(property_exists($googleDetail,"google_merchant_center_id") && property_exists($googleDetail,"google_ads_id") ){
400
  //main tab
401
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
403
  $setting_status['google_shopping_msg']= "";
404
  }else if($googleDetail->google_merchant_center_id == ""){
405
  $setting_status['google_shopping']= false;
406
+ $setting_status['google_shopping_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
407
  }else if($googleDetail->google_ads_id == ""){
408
  $setting_status['google_shopping']= false;
409
+ $setting_status['google_shopping_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
410
  }
411
  }else{
412
  $setting_status['google_shopping']= false;
420
  $setting_status['google_ads_msg']= "";
421
  }else if($googleDetail->google_merchant_center_id == ""){
422
  $setting_status['google_ads']= false;
423
+ $setting_status['google_ads_msg']= "Link your Google Ads with Merchant center to start running shopping campaigns <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
424
  }else if($googleDetail->google_ads_id == ""){
425
  $setting_status['google_ads']= false;
426
+ $setting_status['google_ads_msg']= "Configure Google Ads account to reach to millions of interested shoppers <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
427
  }
428
  }else{
429
  $setting_status['google_ads']= false;
446
  $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
447
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
448
  $setting_status['google_shopping_conf']= false;
449
+ $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
450
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
451
  $setting_status['google_shopping_conf']= false;
452
  $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
485
  }
486
  }else{
487
  $setting_status['google_shopping_p_sync']= false;
488
+ $setting_status['google_shopping_p_sync_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
489
  }
490
 
491
  //sub tab product Campaigns
505
  }
506
  }else{
507
  $setting_status['google_shopping_p_campaigns']= false;
508
+ $setting_status['google_shopping_p_campaigns_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a target='_blank' href='".esc_url($this->get_connect_url())."'>click here</a>.";
509
  }
510
  }
511
  return $setting_status;
547
  return $tvc_cat_id_list;
548
  }
549
 
550
+ public function call_tvc_site_verified_and_domain_claim(){
551
+ $google_detail = $this->get_ee_options_data();
552
+ $class = 'notice notice-error tvc-notice-error';
553
+ if(!isset($_GET['welcome_msg']) && isset($google_detail['setting']) && $google_detail['setting'] ){
554
+ $googleDetail = $google_detail['setting'];
555
+ if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id){
556
+ $message = "";
557
+ $call_js_function_args="";
558
+ if (isset($googleDetail->is_site_verified) && isset($googleDetail->is_domain_claim) && $googleDetail->is_site_verified == '0' && $googleDetail->is_domain_claim == '0') {
559
+ $message = esc_html__('Site verification and domain claim for merchant center account failed. Without a verified and claimed website, your products will get disapproved.');
560
+ $call_js_function_args = "both";
561
+ }else if(isset($googleDetail->is_site_verified) && $googleDetail->is_site_verified == '0'){
562
+ $message = esc_html__('Site verification and domain claim for merchant center account failed. Without a verified and claimed website, your products will get disapproved.');
563
+ $call_js_function_args = "site_verified";
564
+ }else if(isset($googleDetail->is_domain_claim) && $googleDetail->is_domain_claim == '0'){
565
+ $message = esc_html__('Domain claim for merchant center account failed. Without a verified and claimed website, your products will get disapproved.');
566
+ $call_js_function_args = "domain_claim";
567
+ }
568
+ if($message!= ""){
569
+ printf('<div class="%1$s"><p><b>%2$s Click <a href="javascript:void(0)" id="call_both_verification" onclick="call_tvc_site_verified_and_domain_claim(\'%3$s\');">here</a></b> to verify and claim the domain.</p></div>', esc_attr($class), esc_html($message),$call_js_function_args);
570
+ ?>
571
+ <script>
572
+ function call_tvc_site_verified_and_domain_claim(call_args){
573
+ var tvs_this = event.target;
574
+ $("#call_both_verification").css("visibility","hidden");
575
+ $(tvs_this).after('<div class="call_both_verification-spinner tvc-nb-spinner" id="both_verification-spinner"></div>');
576
+ if(call_args == "domain_claim"){
577
+ call_domain_claim_both();
578
+ }else{
579
+ jQuery.post(myAjaxNonces.ajaxurl,{
580
+ action: "tvc_call_site_verified",
581
+ apiDomainClaimNonce: myAjaxNonces.SiteVerifiedNonce
582
+ },function( response ){
583
+ var rsp = JSON.parse(response);
584
+ if(rsp.status == "success"){
585
+ if(call_args == "site_verified"){
586
+ tvc_helper.tvc_alert("success","",rsp.message);
587
+ location.reload();
588
+ }else{
589
+ call_domain_claim_both(rsp.message);
590
+ }
591
+ }else{
592
+ tvc_helper.tvc_alert("error","",rsp.message);
593
+ $("#both_verification-spinner").remove();
594
+ }
595
+ });
596
+ }
597
+ }
598
+ function call_domain_claim_both(first_message=null){
599
+ //console.log("call_domain_claim");
600
+ jQuery.post(myAjaxNonces.ajaxurl,{
601
+ action: "tvc_call_domain_claim",
602
+ apiDomainClaimNonce: myAjaxNonces.apiDomainClaimNonce
603
+ },function( response ){
604
+ var rsp = JSON.parse(response);
605
+ if(rsp.status == "success"){
606
+ if(first_message != "" || first_message == null){
607
+ tvc_helper.tvc_alert("success","",first_message,true,4000);
608
+ setTimeout(function(){
609
+ tvc_helper.tvc_alert("success","",rsp.message,true,4000);
610
+ location.reload();
611
+ }, 4000);
612
+ }else{
613
+ tvc_helper.tvc_alert("success","",rsp.message,true,4000);
614
+ setTimeout(function(){
615
+ location.reload();
616
+ }, 4000);
617
+ }
618
+ }else{
619
+ tvc_helper.tvc_alert("error","",rsp.message,true)
620
+ }
621
+ $("#both_verification-spinner").remove();
622
+ });
623
+ }
624
+ </script>
625
+ <?php
626
+ }
627
+ }
628
+ }
629
+ }
630
  public function call_domain_claim(){
631
  $googleDetail = [];
632
  $google_detail = $this->get_ee_options_data();
633
  //print_r($google_detail);
634
  if(isset($google_detail['setting']) && $google_detail['setting']){
635
  $googleDetail = $google_detail['setting'];
636
+ if($googleDetail->is_site_verified == '0'){
637
+ return array('error'=>true, 'msg'=>"First need to verified your site. Click on site verification refresh icon to verified your site.");
638
+ }else if(property_exists($googleDetail,"is_domain_claim") && $googleDetail->is_domain_claim == '0'){
639
  $postData = [
640
  'merchant_id' => $googleDetail->merchant_id,
641
  'website_url' => $googleDetail->site_url,
643
  'account_id' => $googleDetail->google_merchant_center_id
644
  ];
645
  $claimWebsite = $this->customApiObj->claimWebsite($postData);
 
646
  if(isset($claimWebsite->error) && !empty($claimWebsite->errors)){
647
  return array('error'=>true, 'msg'=>$claimWebsite->errors[0]);
648
  }else{
650
  return array('error'=>false, 'msg'=>"Domain claimed successfully.");
651
  }
652
  }else{
653
+ return array('error'=>false, 'msg'=>"Already domain claimed successfully.");
654
  }
655
  }
656
  }
657
 
658
+
659
+ public function call_site_verified(){
660
+ $googleDetail = [];
661
+ $google_detail = $this->get_ee_options_data();
662
+ if(isset($google_detail['setting']) && $google_detail['setting']){
663
+ $googleDetail = $google_detail['setting'];
664
+ if(property_exists($googleDetail,"is_site_verified") && $googleDetail->is_site_verified == '0'){
665
+ $postData = [
666
+ 'merchant_id' => $googleDetail->merchant_id,
667
+ 'website_url' => $googleDetail->site_url,
668
+ 'subscription_id' => $googleDetail->id,
669
+ 'account_id' => $googleDetail->google_merchant_center_id
670
+ ];
671
+ $postData['method']="file";
672
+ $siteVerificationToken = $this->customApiObj->siteVerificationToken($postData);
673
+
674
+ if(isset($siteVerificationToken->error) && !empty($siteVerificationToken->errors)){
675
+ goto call_method_tag;
676
+ }else{
677
+ $myFile = ABSPATH.$siteVerificationToken->data->token;
678
+ if(!file_exists($myFile)){
679
+ $fh = fopen($myFile, 'w+');
680
+ chmod($myFile,0777);
681
+ $stringData = "google-site-verification: ".$siteVerificationToken->data->token;
682
+ fwrite($fh, $stringData);
683
+ fclose($fh);
684
+ }
685
+ $postData['method']="file";
686
+ $siteVerification = $this->customApiObj->siteVerification($postData);
687
+ if(isset($siteVerification->error) && !empty($siteVerification->errors)){
688
+ call_method_tag:
689
+ //methd using tag
690
+ $postData['method']="meta";
691
+ $siteVerificationToken_tag = $this->customApiObj->siteVerificationToken($postData);
692
+ if(isset($siteVerificationToken_tag->data->token) && $siteVerificationToken_tag->data->token){
693
+ $this->set_ee_additional_data(array("add_site_varification_tag"=>1,"site_varification_tag_val"=> base64_encode($siteVerificationToken_tag->data->token)));
694
+ sleep(1);
695
+ $siteVerification_tag = $this->customApiObj->siteVerification($postData);
696
+ if(isset($siteVerification_tag->error) && !empty($siteVerification_tag->errors)){
697
+ return array('error'=>true, 'msg'=>$siteVerification_tag->errors[0]);
698
+ }else{
699
+ $this->set_update_api_to_db();
700
+ return array('error'=>false, 'msg'=>"Site verification successfully.");
701
+ }
702
+ }else{
703
+ return array('error'=>true, 'msg'=>$siteVerificationToken_tag->errors[0]);
704
+ }
705
+ // one more try
706
+ }else{
707
+ $this->set_update_api_to_db();
708
+ return array('error'=>false, 'msg'=>"Site verification successfully.");
709
+ }
710
+ }
711
+ }else{
712
+ return array('error'=>false, 'msg'=>"Already site verification successfully.");
713
+ }
714
+ }
715
+ }
716
+
717
+ public function get_tvc_popup_message(){
718
+ return '<div id="tvc_popup_box">
719
+ <span class="close" id="tvc_close_msg" onclick="tvc_helper.tvc_close_msg()"> × </span>
720
+ <div id="box">
721
+ <div class="tvc_msg_icon" id="tvc_msg_icon"></div>
722
+ <h4 id="tvc_msg_title"></h4>
723
+ <p id="tvc_msg_content"></p>
724
+ <div id="tvc_closeModal"></div>
725
+ </div>
726
+ </div>';
727
+ }
728
+
729
  }?>
admin/css/enhanced-ecommerce-google-analytics-admin.css CHANGED
@@ -290,11 +290,11 @@ img.config-success, .nav-tabs li img.config-success, .nav-tabs li img.config-fai
290
  visibility: hidden;
291
  position: absolute;
292
  min-width: 400px;
293
- background-color: #fff;
294
  border:1px solid #2D73C5;
295
- color: #212529;
296
- text-align: center;
297
- padding: 8px 0;
298
  border-radius: 6px;
299
  z-index: 999;
300
 
@@ -431,9 +431,10 @@ button.tvc_animate_btn:hover::after, button.tvc_animate_btn:focus::after {
431
  line-height: 22px;
432
  min-height: 30px;
433
  }
434
- ul.nav-tabs{
435
  margin-top: 20px;
436
  background-color: #fff;
 
437
  }
438
  .wp-core-ui .notice.is-dismissible {
439
  padding: 0 1.4rem 0 1rem;
@@ -510,7 +511,7 @@ ul.nav-tabs{
510
  }
511
  .tvc-menu-free-plan{ position: absolute;
512
  right: 35px;
513
- top: 31px;}
514
  .tvc-menu-free-plan span {
515
  color: #03a2b7;
516
  font-size: 14px;
@@ -563,3 +564,82 @@ ul.nav-tabs{
563
  font-size: 14px;
564
  }
565
  #feed-spinner img{width: 60px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  visibility: hidden;
291
  position: absolute;
292
  min-width: 400px;
293
+ background-color: #2D73C5;
294
  border:1px solid #2D73C5;
295
+ color: #fff;
296
+ text-align: left;
297
+ padding: 8px;
298
  border-radius: 6px;
299
  z-index: 999;
300
 
431
  line-height: 22px;
432
  min-height: 30px;
433
  }
434
+ .tvc_plugin_container ul.nav-tabs{
435
  margin-top: 20px;
436
  background-color: #fff;
437
+ position: relative;
438
  }
439
  .wp-core-ui .notice.is-dismissible {
440
  padding: 0 1.4rem 0 1rem;
511
  }
512
  .tvc-menu-free-plan{ position: absolute;
513
  right: 35px;
514
+ top: 11px;}
515
  .tvc-menu-free-plan span {
516
  color: #03a2b7;
517
  font-size: 14px;
564
  font-size: 14px;
565
  }
566
  #feed-spinner img{width: 60px;}
567
+ /* Popup box BEGIN */
568
+ @-webkit-keyframes tvc_popup_box_open {
569
+ 0%{opacity: 0; margin-top: -20%;}
570
+ 75%{margin-top: 5%;}
571
+ 100%{opacity: 1;}
572
+ }
573
+ @keyframes tvc_popup_box_open {
574
+ 0%{opacity: 0; margin-top: -20%;}
575
+ 75%{margin-top: 5%;}
576
+ 100%{opacity: 1;}
577
+ }
578
+ @-webkit-keyframes tvc_popup_box_close {
579
+ 0%{opacity: 1;}
580
+ 75%{opacity: 1; margin-top: -20%;}
581
+ 100%{opacity: 0;margin-top: 40%;}
582
+ }
583
+ @keyframes tvc_popup_box_close {
584
+ 0%{opacity: 1;}
585
+ 75%{opacity: 1; margin-top: -20%;}
586
+ 100%{opacity: 0;margin-top: 40%;}
587
+ }
588
+ #tvc_popup_box{
589
+ width: 500px;
590
+ overflow: hidden;
591
+ background: #EEEEEE;
592
+ box-shadow: 0 0 10px black;
593
+ border-radius: 10px;
594
+ position: absolute;
595
+ top: 30%;
596
+ left: 40%;
597
+ display: none;
598
+ }
599
+ #tvc_popup_box.tvc_popup_box{
600
+ width: 500px;
601
+ overflow: hidden;
602
+ background: #EEEEEE;
603
+ box-shadow: 0 0 10px black;
604
+ border-radius: 10px;
605
+ position: fixed;
606
+ top: 30%;
607
+ left: 50%;
608
+ margin-top: 100px;
609
+ transform: translate(-50%, -50%);
610
+ z-index: 9999;
611
+ padding: 10px;
612
+ text-align: center;
613
+ display: block;
614
+ animation: tvc_popup_box_open 0.5s;
615
+ -webkit-animation: tvc_popup_box_open 0.5s;
616
+
617
+ }
618
+ #tvc_popup_box.tvc_popup_box_close{
619
+ display: none;
620
+ animation: tvc_popup_box_close 0.5s;
621
+ -webkit-animation: tvc_popup_box_close 0.5s;
622
+ -webkit-animation-fill-mode: forwards;
623
+ animation-fill-mode: forwards;
624
+ }
625
+
626
+ #tvc_popup_box #tvc_msg_content{ color: #000000;
627
+ font-size: 16px; padding: 0 20px;line-height: 20px;}
628
+ #tvc_popup_box .close {
629
+ position: absolute;
630
+ top: 0px;
631
+ right: 10px;
632
+ transition: all 200ms;
633
+ font-size: 30px;
634
+ font-weight: bold;
635
+ text-decoration: none;
636
+ cursor: pointer;
637
+ }
638
+ #tvc_popup_box .fa-exclamation-circle, #tvc_popup_box .tvc-error{color: #FF0000;}
639
+ #tvc_popup_box .fa-check-circle.tvc-success, #tvc_popup_box .tvc-success{color: #218938;}
640
+
641
+ /* Popup box BEGIN */
642
+ .tvc-notice-error{position: relative;}
643
+ .tvc-notice-error .call_both_verification-spinner{
644
+ right: 5px;top: 10px;margin-left: 0;
645
+ }
admin/js/tvc-ee-custom.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var tvc_helper = {
2
+ tvc_alert:function(msg_type=null, msg_subject=null, msg, auto_close=false, tvc_time=7000){
3
+ document.getElementById('tvc_msg_title').innerHTML ="";
4
+ document.getElementById('tvc_msg_content').innerHTML ="";
5
+ document.getElementById('tvc_msg_icon').innerHTML ="";
6
+
7
+ if(msg != ""){
8
+ let tvc_popup_box = document.getElementById('tvc_popup_box');
9
+ tvc_popup_box.classList.remove("tvc_popup_box_close");
10
+ tvc_popup_box.classList.add("tvc_popup_box");
11
+
12
+ //tvc_popup_box.style.display = "block";
13
+ document.getElementById('tvc_msg_title').innerHTML =this.tvc_subject_title(msg_type, msg_subject);
14
+ document.getElementById('tvc_msg_content').innerHTML =msg;
15
+ if(msg_type=="success"){
16
+ document.getElementById('tvc_msg_icon').innerHTML ='<i class="fas fa-check-circle fa-3x tvc-success"></i>';
17
+ }else{
18
+ document.getElementById('tvc_msg_icon').innerHTML ='<i class="fas fa-exclamation-circle fa-3x"></i>';
19
+ }
20
+ if(auto_close == true){
21
+ setTimeout(function(){ //tvc_popup_box.style.display = "none";
22
+ tvc_popup_box.classList.add("tvc_popup_box_close");
23
+ tvc_popup_box.classList.remove("tvc_popup_box");
24
+ }
25
+ , tvc_time);
26
+ }
27
+ }
28
+ },
29
+ tvc_subject_title:function(msg_type=null, msg_subject=null){
30
+ if(msg_subject == null || msg_subject ==""){
31
+ if(msg_type=="success" ){
32
+ return '<span class="tvc-success">Success!!</span>';
33
+ }else{
34
+ return '<span class="tvc-error">Oops!</span>';
35
+ }
36
+ }else{
37
+ if(msg_type=="success" ){
38
+ return '<span class="tvc-success">'+msg_subject+'</span>';
39
+ }else{
40
+ return '<span>'+msg_subject+'</span>';
41
+ }
42
+ }
43
+ },
44
+ tvc_close_msg:function(){
45
+ let tvc_popup_box = document.getElementById('tvc_popup_box');
46
+ tvc_popup_box.classList.add("tvc_popup_box_close");
47
+ //tvc_popup_box.style.display = "none";
48
+ }
49
+ };
admin/partials/enhanced-ecommerce-google-analytics-admin-display.php CHANGED
@@ -97,7 +97,7 @@ class TVC_Tabs {
97
  <li class="nav-item"><div class="border-left aga-tab nav-link <?php echo $this->is_active_tabs('about_plugin'); ?>"><a href="<?php echo $this->site_url.'about_plugin'; ?>">Premium <img class="new-img-blink" src='<?php echo plugins_url('../images/new-2.gif', __FILE__ ) ?>' /></a></div></li>
98
  <?php }*/ ?>
99
  <li class="tvc-menu-free-plan">
100
- <span>Free Plan: 500 Product's sync limit</span>
101
  </li>
102
  </ul>
103
  </div>
97
  <li class="nav-item"><div class="border-left aga-tab nav-link <?php echo $this->is_active_tabs('about_plugin'); ?>"><a href="<?php echo $this->site_url.'about_plugin'; ?>">Premium <img class="new-img-blink" src='<?php echo plugins_url('../images/new-2.gif', __FILE__ ) ?>' /></a></div></li>
98
  <?php }*/ ?>
99
  <li class="tvc-menu-free-plan">
100
+ <span>Free Plan: Products sync limit - 500 </span>
101
  </li>
102
  </ul>
103
  </div>
admin/partials/general-fields.php CHANGED
@@ -21,10 +21,12 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
21
  ];
22
 
23
  if ($googleDetail->is_site_verified == '0') {
 
24
  $siteVerificationToken = $customApiObj->siteVerificationToken($postData);
25
  if (isset($siteVerificationToken->error) && !empty($siteVerificationToken->errors)) {
 
26
  } else {
27
- $myFile = ABSPATH.$siteVerificationToken->data->token; // or .php
28
  if (!file_exists($myFile)) {
29
  $fh = fopen($myFile, 'w+');
30
  chmod($myFile,0777);
@@ -32,15 +34,27 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
32
  fwrite($fh, $stringData);
33
  fclose($fh);
34
  }
35
-
36
  $siteVerification = $customApiObj->siteVerification($postData);
37
  if (isset($siteVerification->error) && !empty($siteVerification->errors)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  } else {
39
  $googleDetail->is_site_verified = '1';
40
  }
41
  }
42
  }
43
-
44
  if ($googleDetail->is_domain_claim == '0') {
45
  $claimWebsite = $customApiObj->claimWebsite($postData);
46
  if (isset($claimWebsite->error) && !empty($claimWebsite->errors)) {
@@ -69,10 +83,10 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
69
  update_option('ads_ert', $googleDetail->remarketing_tags);
70
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
71
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
72
-
 
73
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
74
- if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
75
- $TVC_Admin_Helper->set_update_api_to_db($googleDetail);
76
  wp_redirect("admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=sync_product_page&welcome_msg=true");
77
  exit;
78
  }else{
21
  ];
22
 
23
  if ($googleDetail->is_site_verified == '0') {
24
+ $postData['method']="file";
25
  $siteVerificationToken = $customApiObj->siteVerificationToken($postData);
26
  if (isset($siteVerificationToken->error) && !empty($siteVerificationToken->errors)) {
27
+ goto call_method_tag;
28
  } else {
29
+ $myFile = ABSPATH.$siteVerificationToken->data->token;
30
  if (!file_exists($myFile)) {
31
  $fh = fopen($myFile, 'w+');
32
  chmod($myFile,0777);
34
  fwrite($fh, $stringData);
35
  fclose($fh);
36
  }
37
+ $postData['method']="file";
38
  $siteVerification = $customApiObj->siteVerification($postData);
39
  if (isset($siteVerification->error) && !empty($siteVerification->errors)) {
40
+ call_method_tag:
41
+ //methd using tag
42
+ $postData['method']="meta";
43
+ $siteVerificationToken_tag = $customApiObj->siteVerificationToken($postData);
44
+ if(isset($siteVerificationToken_tag->data->token) && $siteVerificationToken_tag->data->token){
45
+ $TVC_Admin_Helper->set_ee_additional_data(array("add_site_varification_tag"=>1,"site_varification_tag_val"=> base64_encode($siteVerificationToken_tag->data->token)));
46
+ sleep(1);
47
+ $siteVerification_tag = $customApiObj->siteVerification($postData);
48
+ if(isset($siteVerification_tag->error) && !empty($siteVerification_tag->errors)){
49
+ }else{
50
+ $googleDetail->is_site_verified = '1';
51
+ }
52
+ }
53
  } else {
54
  $googleDetail->is_site_verified = '1';
55
  }
56
  }
57
  }
 
58
  if ($googleDetail->is_domain_claim == '0') {
59
  $claimWebsite = $customApiObj->claimWebsite($postData);
60
  if (isset($claimWebsite->error) && !empty($claimWebsite->errors)) {
83
  update_option('ads_ert', $googleDetail->remarketing_tags);
84
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
85
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
86
+ //save data in DB
87
+ $TVC_Admin_Helper->set_update_api_to_db($googleDetail);
88
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
89
+ if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
 
90
  wp_redirect("admin.php?page=enhanced-ecommerce-google-analytics-admin-display&tab=sync_product_page&welcome_msg=true");
91
  exit;
92
  }else{
css/tvc_admin-page.css DELETED
@@ -1,548 +0,0 @@
1
- /*
2
- To change this license header, choose License Headers in Project Properties.
3
- To change this template file, choose Tools | Templates
4
- and open the template in the editor.
5
- */
6
-
7
- #feed-spinner {
8
- /*height: 200px;*/ /*height of the spinner gif +2px to fix IE8 issue */
9
- left: 50%;
10
- margin-left: -25px; /* half width of the spinner gif */
11
- margin-top: -25px; /* half height of the spinner gif */
12
- overflow: auto;
13
- position: fixed;
14
- text-align: center;
15
- top: 40%;
16
- /*width: 200px;*/ /* width of the spinner gif */
17
- z-index: 1234;
18
- }
19
- div.field-table-row-wrapper:nth-child(2n) {
20
- background-color: #f5f5f5;
21
- }
22
-
23
- #footer-left{
24
- display: none;
25
- }
26
-
27
- div.field-table-row-wrapper {
28
- display: block;
29
- padding-bottom: 5px;
30
- }
31
-
32
- div.filter-wrapper {
33
- margin-top: 5px;
34
- }
35
-
36
- aside.action-btn {
37
- margin-left: 8px;
38
- }
39
-
40
- .small-text {
41
- width: 15px;
42
- }
43
-
44
- .field-level {
45
- background: #e5e5e5;
46
- clear: both;
47
- font-size: 15px;
48
- line-height: 30px;
49
- padding-left: 5px;
50
- }
51
-
52
- .value-options-condition-selector {
53
- margin-left: 400px;
54
- }
55
-
56
- .value-options-query-selector {
57
- margin-bottom: 15px;
58
- margin-left: 37%;
59
- width: 65%
60
- }
61
-
62
- select.tvc-main-input-selector {
63
- height: 33px;
64
- max-width: 35rem;
65
- }
66
-
67
- select.select-value-options {
68
- height: 27px;
69
- vertical-align: initial;
70
- }
71
-
72
- select.align-left {
73
- float: left;
74
- }
75
-
76
- .condition-and-value-selector {
77
- margin-left: 5px;
78
- }
79
-
80
- div.condition-wrapper {
81
- float: left;
82
- line-height: 26px;
83
- margin-bottom: 15px;
84
- width: 100%;
85
- }
86
-
87
- div.source-data-column {
88
- }
89
-
90
- div.change-source-value-wrapper {
91
- background-color: #e2e2e2;
92
- float: left;
93
- margin-left: 16%;
94
- padding: 15px;
95
- width: 81%;
96
- }
97
-
98
- th#tvc-main-feed-input-label {
99
- text-align: left;
100
- width: 32%;
101
- }
102
-
103
- th#tvc-main-feed-input-label label {
104
- display: inline-block;
105
- }
106
-
107
- div.edit-value-control {
108
- float: right;
109
- margin: -50px 10px;
110
- }
111
-
112
- div.add-to-feed-column {
113
- margin-top: 4px;
114
- }
115
-
116
- div.tvc-header-wrapper {
117
- padding-bottom: 10px;
118
- }
119
-
120
- div.tvc-field-header-wrapper {
121
- background-color: white;
122
- height: 30px;
123
- margin-bottom: 10px;
124
- }
125
-
126
- div.field-header {
127
- float: left;
128
- margin-bottom: 8px;
129
- padding: 5px;
130
- }
131
-
132
- .col10w {
133
- width: 10%;
134
- }
135
-
136
- .col30w {
137
- width: 30%;
138
- }
139
-
140
- .col20w {
141
- width: 16%;
142
- }
143
-
144
- .col40w {
145
- width: 40%;
146
- }
147
-
148
- .col55w {
149
- width: 55%;
150
- }
151
-
152
- .col80w {
153
- width: 82%;
154
- }
155
-
156
- .condition-selector {
157
- width: 55%;
158
- }
159
-
160
- div#category-mapping-header {
161
- left: 15px;
162
- position: relative;
163
- }
164
-
165
- div.source-selector {
166
- margin-right: 6%;
167
- }
168
-
169
- div.tvc-feedback {
170
- background-color: #fff;
171
- border: 1px solid #e5e5e5;
172
- border-radius: 6px;
173
- float: right;
174
- padding: 6px 10px;
175
- }
176
-
177
- div.tvc-feedback a:link {
178
- color: #4D8C0F;
179
- text-decoration: none;
180
- }
181
-
182
- div.tvc-feedback a:visited {
183
- color: #555;
184
- text-decoration: none;
185
- }
186
-
187
- div.tvc-feedback a:hover {
188
- color: #3C3;
189
- text-decoration: none;
190
- }
191
-
192
- table.fm-category-mapping-table th {
193
- font-weight: 700;
194
- padding: 9px;
195
- }
196
-
197
- table.fm-category-mapping-table {
198
- clear: none;
199
- display: table;
200
- float: right;
201
- height: 280px;
202
- overflow-y: scroll;
203
- width: 59%;
204
- }
205
-
206
- table.tvc-feed-main-input-table {
207
- width: 100%;
208
- }
209
-
210
- table.fm-category-mapping-table td#shop-category {
211
- color: #0073aa;
212
- cursor: auto;
213
- font-size: 14px !important;
214
- font-weight: 600;
215
- padding-left: 2px;
216
- }
217
-
218
- table.fm-category-mapping-table th#shop-category-selector {
219
- vertical-align: top;
220
- width: 2.2em;
221
- }
222
-
223
- td.channel-tile {
224
- border: 1px solid #ccc;
225
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
226
- -moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
227
- -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.25);
228
- max-width: 340px;
229
- min-width: 250px;
230
- vertical-align: top;
231
- }
232
-
233
- img.channel-thumbnail {
234
- border: none;
235
- max-width: 300px;
236
- width: 100%;
237
- }
238
-
239
- div.channel-inner {
240
- margin: 20px;
241
- }
242
-
243
- div.channel-version {
244
- background-color: #eee;
245
- border: 1px solid #dadada;
246
- border-radius: 3px;
247
- -webkit-border-radius: 3px;
248
- -moz-border-radius: 3px;
249
- color: #424242;
250
- display: block;
251
- font-weight: bold;
252
- margin-bottom: 12px;
253
- padding: 6px;
254
- }
255
-
256
- div#outdated {
257
- color: red;
258
- }
259
-
260
- div.product-filter-condition-wrapper {
261
- float: right;
262
- font-size: 16px;
263
- margin-top: 20px;
264
- width: 59%;
265
- }
266
-
267
- section.tvc-main-input-wrapper {
268
- float: left;
269
- margin-top: 20px;
270
- width: 40%;
271
- }
272
-
273
- tr.tvc-main-feed-input-row {
274
- height: 47px;
275
- }
276
-
277
- table.fm-category-mapping-table thead, table.fm-category-mapping-table tbody {
278
- float: left;
279
- width: 100%;
280
- }
281
-
282
- table.fm-category-mapping-table tbody {
283
- height: 280px;
284
- overflow-y: scroll;
285
- }
286
-
287
- table.fm-category-mapping-table tr:nth-child(2n) td, table.fm-category-mapping-table tr:nth-child(2n) th {
288
- background-color: #fcfcfc;
289
- }
290
-
291
- thead.fm-category-mapping-titles th {
292
- font-weight: 400;
293
- }
294
-
295
- thead.fm-category-mapping-titles tr {
296
- width: 98% !important;
297
- }
298
-
299
- table.fm-category-mapping-table td:first-child {
300
- width: 16%;
301
- }
302
-
303
- table.fm-category-mapping-table tr {
304
- display: table;
305
- text-align: left;
306
- width: 100%;
307
- }
308
-
309
- table.tvc-feed-main-input-table th {
310
- padding-right: 0;
311
- width: 40%;
312
- }
313
-
314
- table.tvc-feed-main-input-table input {
315
- width: 90%;
316
- }
317
-
318
- table.tvc-feed-main-input-table input#aggregator, table.tvc-feed-main-input-table input#variations {
319
- width: 10px;
320
- }
321
-
322
- table.tvc-feed-main-input-table select {
323
- width: 90%;
324
- }
325
-
326
- .message-field {
327
- font-size: 16px;
328
- margin: 20px 0 3px 0;
329
- }
330
-
331
- #disposable-warning-message {
332
- margin: 20px 0 3px 0;
333
- }
334
-
335
- button#disposable-notice-button {
336
- position: relative;
337
- }
338
-
339
- .full-screen-message-field p {
340
- color: red;
341
- font-size: 17px;
342
- margin: 20px 0 3px 0;
343
- }
344
-
345
- span.output-field-label {
346
- background-color: #2ea2cc;
347
- border-radius: 3px;
348
- color: white;
349
- margin-top: 4px;
350
- padding: 4px 10px;
351
- }
352
-
353
- div.colw {
354
- float: left;
355
- padding: 5px;
356
- }
357
-
358
- div.edit-values-row {
359
- float: left;
360
- margin: 20px 10px 10px 30px;
361
- width: 80%;
362
- }
363
-
364
- div.end-row {
365
- clear: both;
366
- }
367
-
368
- div.field-table-row {
369
- height: 20px;
370
- }
371
-
372
- div.field-table-row-edit-source {
373
- clear: both;
374
- float: left;
375
- }
376
-
377
- div.field-table-row-combined-selection {
378
- left: -181px;
379
- line-height: 26px;
380
- margin: 5px;
381
- position: relative;
382
- width: 680px;
383
- }
384
-
385
- div.combined-wrapper {
386
- line-height: 26px;
387
- width: 100%;
388
- }
389
-
390
- div.or-selector {
391
- line-height: 26px;
392
- margin-top: 30px;
393
- width: 120%;
394
- }
395
-
396
- div.dotted-top-line {
397
- border-top-style: dashed;
398
- border-top-color: #ccc;
399
- border-top-width: 1px;
400
- margin-top: 20px;
401
- }
402
-
403
- span.combined-field-row {
404
- clear: left;
405
- float: left;
406
- }
407
-
408
- input.free-category-text-input {
409
- width: 90%;
410
- }
411
-
412
- div.button-wrapper {
413
- clear: both;
414
- }
415
-
416
- .button-primary {
417
- margin-top: 15px !important;
418
- margin-right: 5px !important;
419
- }
420
-
421
- a.channel-button {
422
- margin-right: 5px !important;
423
- }
424
-
425
- a.tvc-btn-small {
426
- font-size: 13px;
427
- }
428
-
429
- a.tvc-rating-request {
430
- color: #FFB900;
431
- }
432
-
433
- input.feed-list-lower-button {
434
- position: relative;
435
- margin-bottom: 10px!important;
436
- }
437
-
438
- div.select-control {
439
- float: left;
440
- margin: 0;
441
- vertical-align: top;
442
- }
443
-
444
- div.static-value-control {
445
- float: left;
446
- }
447
- #wpcontent{
448
- height: 100%;
449
- /*padding-left: 0 !important;*/
450
- }
451
-
452
- /*prgress info*/
453
- .tvc-progressbar-wapper{
454
- width: 97%;
455
- margin: 10px auto;
456
- text-align: center;
457
- position: relative;
458
- background-color: #fff;
459
- padding: 11px;
460
- }
461
- .tvc-progressbar {
462
-
463
- overflow: hidden;
464
- counter-reset: step;
465
- }
466
- .tvc-progressbar .tvc-steps {
467
- list-style-type: none;
468
- color: #D2D2D2;
469
- text-transform: capitalize;
470
- font-size: 16px;
471
- width: 33.33%;
472
- float: left;
473
- position: relative;
474
- display: block;
475
- }
476
- .tvc-progressbar .tvc-steps .tvc-steps-icon{
477
- display: inline-block;
478
- float: left;
479
- }
480
- .tvc-progressbar .tvc-steps .tvc-steps-text{
481
- display: inline-block;
482
-
483
- float: left;
484
- }
485
- .tvc-progressbar .tvc-steps:before {
486
- border: 2px solid #007bff;
487
- color: #007bff;
488
- content: '';
489
- position: absolute;
490
- counter-increment: step;
491
- width: 43px;
492
- line-height: 40px;
493
- display: block;
494
- font-size: 18px;
495
- float: left;
496
- background: transparent;
497
- border-radius: 100%;
498
- margin: 0 auto 5px auto;
499
- border: 2px solid #ECECEC;
500
- }
501
- .tvc-progressbar .tvc-steps:nth-child(1):before {
502
- content: "\f129";
503
- font-family: 'FontAwesome';
504
- }
505
- .tvc-progressbar .tvc-steps:nth-child(2):before {
506
- content: "\f013";
507
- font-family: 'FontAwesome';
508
- }
509
- .tvc-progressbar .tvc-steps:nth-child(3):before {
510
- content: "\f00c";
511
- font-family: 'FontAwesome';
512
- }
513
- /*.tvc-progressbar .tvc-steps:after {
514
- content: '';
515
- width: 73%;
516
- height: 2px;
517
- background: #ECECEC;
518
- position: absolute;
519
- left: -35%;
520
- top: 25px;
521
- z-index: 1;
522
- }
523
- .tvc-progressbar .tvc-steps:first-child:after {
524
- content: none;
525
- }*/
526
- .tvc-progressbar .tvc-steps lable{display: block; font-size: 22px;
527
- color: #007bff; height: 54px; text-align: left;
528
- margin: 6px 0 0 50px;}
529
- .tvc-progressbar .tvc-steps span{display: block; text-align: left; font-size: 16px;
530
- line-height: 24px;}
531
- .tvc-progressbar .tvc-steps span img{margin-left: 5px; margin-right: 8px;
532
- height: 10px;}
533
- @media only screen and (min-width: 1200px){
534
- .container{
535
- margin-left: 8% !important;
536
- width:auto;
537
- }
538
- .banner{
539
- width:100%;
540
- }
541
- }
542
- @media only screen and (min-width: 1920px){
543
- .container{
544
- margin-left: 6% !important;
545
- width:auto;
546
- }
547
-
548
- }