Enhanced Ecommerce Google Analytics Plugin for WooCommerce - Version 4.5.0

Version Description

  • 07/12/2021 =

  • In this release, we have focused on code optimization and performance improvement.

  • Custom atributes read from JSON file issue got fixed.

  • Improvements in product feed sync feature.

Download this release

Release Info

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

Code changes from version 4.4.1 to 4.5.0

Files changed (41) hide show
  1. admin/class-conversios-admin.php +18 -22
  2. admin/class-conversios-onboarding.php +137 -147
  3. admin/class-enhanced-ecommerce-google-analytics-admin.php +29 -166
  4. admin/class-enhanced-ecommerce-google-analytics-settings.php +9 -19
  5. admin/class-survey.php +6 -7
  6. admin/class-tvc-admin-auto-product-sync-helper.php +60 -44
  7. admin/class-tvc-admin-db-helper.php +13 -13
  8. admin/class-tvc-admin-helper.php +56 -60
  9. admin/css/enhanced-ecommerce-google-analytics-admin.css +0 -3
  10. admin/css/style.css +3 -2
  11. admin/helper/class-dashboard-helper.php +13 -9
  12. admin/helper/class-onboarding-helper.php +79 -79
  13. admin/js/bootstrap.min.js +7 -0
  14. admin/js/popper.min.js +5 -0
  15. admin/partials/class-conversios-header.php +15 -17
  16. admin/partials/enhanced-ecommerce-google-analytics-admin-display.php +0 -113
  17. admin/partials/general-fields.php +61 -61
  18. admin/partials/pricings.php +113 -113
  19. enhanced-ecommerce-google-analytics.php +2 -2
  20. includes/class-enhanced-ecommerce-google-analytics-activator.php +1 -1
  21. includes/class-enhanced-ecommerce-google-analytics.php +8 -6
  22. includes/class-tvc-register-scripts.php +20 -20
  23. includes/data/class-tvc-ajax-file.php +77 -396
  24. includes/data/class-tvc-taxonomies.php +1 -2
  25. includes/setup/CustomApi.php +20 -60
  26. includes/setup/ShoppingApi.php +40 -40
  27. includes/setup/account.php +28 -31
  28. includes/setup/add-campaign.php +63 -62
  29. includes/setup/class-conversios-dashboard.php +174 -177
  30. includes/setup/class-tatvic-category-selector-element.php +15 -23
  31. includes/setup/class-tvc-product-sync-helper.php +54 -93
  32. includes/setup/google-ads.php +35 -35
  33. includes/setup/google-shopping-feed-gaa-config.php +19 -21
  34. includes/setup/google-shopping-feed-shopping-campaigns.php +72 -70
  35. includes/setup/google-shopping-feed-sync-product.php +26 -26
  36. includes/setup/google-shopping-feed.php +27 -27
  37. includes/setup/help-html.php +56 -82
  38. includes/setup/tatvic-category-wrapper.php +3 -4
  39. public/class-enhanced-ecommerce-google-analytics-public-pro.php +98 -104
  40. public/class-enhanced-ecommerce-google-analytics-public.php +42 -57
  41. readme.txt +10 -2
admin/class-conversios-admin.php CHANGED
@@ -60,14 +60,14 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
60
  do_action('add_conversios_css_'.$_GET['page']);
61
  //conversios page css
62
  if($_GET['page'] == "conversios"){
63
- wp_register_style('conversios-slick-css', ENHANCAD_PLUGIN_URL.'/admin/css/slick.css');
64
  wp_enqueue_style('conversios-slick-css');
65
- wp_register_style('conversios-daterangepicker-css', ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css');
66
  wp_enqueue_style('conversios-daterangepicker-css');
67
  }
68
  //all conversios page css
69
- wp_enqueue_style('conversios-style-css',ENHANCAD_PLUGIN_URL . '/admin/css/style.css', array(), $this->version, 'all');
70
- wp_enqueue_style('conversios-responsive-css',ENHANCAD_PLUGIN_URL . '/admin/css/responsive.css', array(), $this->version, 'all');
71
  }
72
  }
73
 
@@ -80,17 +80,17 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
80
  $screen = get_current_screen();
81
  if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos($_GET['page'], 'conversios') !== false) ) {
82
  if($_GET['page'] == "conversios"){
83
- wp_enqueue_script( 'conversios-jquery-js', ENHANCAD_PLUGIN_URL . '/admin/js/jquery-3.5.1.min.js' );
84
 
85
- wp_enqueue_script( 'conversios-chart-js', ENHANCAD_PLUGIN_URL . '/admin/js/chart.js' );
86
- wp_enqueue_script( 'conversios-chart-datalabels-js', ENHANCAD_PLUGIN_URL . '/admin/js/chartjs-plugin-datalabels.js');
87
- wp_enqueue_script( 'conversios-basictable-js', ENHANCAD_PLUGIN_URL . '/admin/js/jquery.basictable.min.js');
88
- wp_enqueue_script( 'conversios-moment-js', ENHANCAD_PLUGIN_URL . '/admin/js/moment.min.js');
89
- wp_enqueue_script( 'conversios-daterangepicker-js', ENHANCAD_PLUGIN_URL . '/admin/js/daterangepicker.js');
90
 
91
- wp_enqueue_script( 'tvc-ee-custom-js', ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js', array( 'jquery' ), $this->version, false );
92
  }
93
- do_action('add_conversios_js_'.$_GET['page']);
94
  }
95
  }
96
 
@@ -173,10 +173,10 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
173
  if (!empty($_GET['page'])) {
174
  $get_action = str_replace("-", "_", $_GET['page']);
175
  } else {
176
- $get_action = "conversios";
177
  }
178
  if (method_exists($this, $get_action)) {
179
- $this->$get_action();
180
  }
181
  echo $this->get_tvc_popup_message();
182
  do_action('add_conversios_footer');
@@ -214,23 +214,19 @@ if ( ! class_exists( 'Conversios_Admin' ) ) {
214
  new GoogleShoppingFeed();
215
  }
216
  }
217
- public function gaa_config_page() {
218
- //include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
219
- include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-gaa-config.php');
220
  new GAAConfiguration();
221
  }
222
  public function sync_product_page() {
223
- //include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
224
- include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-sync-product.php');
225
- new SyncProductConfiguration();
226
  }
227
  public function shopping_campaigns_page() {
228
- //include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
229
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-shopping-campaigns.php');
230
  new CampaignsConfiguration();
231
  }
232
  public function add_campaign_page() {
233
- //include(ENHANCAD_PLUGIN_DIR . 'includes/setup/help-html.php');
234
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/add-campaign.php');
235
  new AddCampaign();
236
  }
60
  do_action('add_conversios_css_'.$_GET['page']);
61
  //conversios page css
62
  if($_GET['page'] == "conversios"){
63
+ wp_register_style('conversios-slick-css', esc_url(ENHANCAD_PLUGIN_URL.'/admin/css/slick.css') );
64
  wp_enqueue_style('conversios-slick-css');
65
+ wp_register_style('conversios-daterangepicker-css', esc_url(ENHANCAD_PLUGIN_URL.'/admin/css/daterangepicker.css') );
66
  wp_enqueue_style('conversios-daterangepicker-css');
67
  }
68
  //all conversios page css
69
+ wp_enqueue_style('conversios-style-css', esc_url(ENHANCAD_PLUGIN_URL . '/admin/css/style.css'), array(), $this->version, 'all' );
70
+ wp_enqueue_style('conversios-responsive-css', esc_url(ENHANCAD_PLUGIN_URL . '/admin/css/responsive.css'), array(), $this->version, 'all');
71
  }
72
  }
73
 
80
  $screen = get_current_screen();
81
  if ($screen->id == 'toplevel_page_conversios' || (isset($_GET['page']) && strpos($_GET['page'], 'conversios') !== false) ) {
82
  if($_GET['page'] == "conversios"){
83
+ wp_enqueue_script( 'conversios-jquery-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/jquery-3.5.1.min.js') );
84
 
85
+ wp_enqueue_script( 'conversios-chart-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/chart.js') );
86
+ wp_enqueue_script( 'conversios-chart-datalabels-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/chartjs-plugin-datalabels.js') );
87
+ wp_enqueue_script( 'conversios-basictable-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.basictable.min.js') );
88
+ wp_enqueue_script( 'conversios-moment-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/moment.min.js') );
89
+ wp_enqueue_script( 'conversios-daterangepicker-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/daterangepicker.js') );
90
 
91
+ wp_enqueue_script( 'tvc-ee-custom-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), $this->version, false );
92
  }
93
+ do_action('add_conversios_js_'.esc_attr($_GET['page']) );
94
  }
95
  }
96
 
173
  if (!empty($_GET['page'])) {
174
  $get_action = str_replace("-", "_", $_GET['page']);
175
  } else {
176
+ $get_action = "conversios";
177
  }
178
  if (method_exists($this, $get_action)) {
179
+ $this->$get_action();
180
  }
181
  echo $this->get_tvc_popup_message();
182
  do_action('add_conversios_footer');
214
  new GoogleShoppingFeed();
215
  }
216
  }
217
+ public function gaa_config_page() {
218
+ include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-gaa-config.php');
 
219
  new GAAConfiguration();
220
  }
221
  public function sync_product_page() {
222
+ include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-sync-product.php');
223
+ new SyncProductConfiguration();
 
224
  }
225
  public function shopping_campaigns_page() {
 
226
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/google-shopping-feed-shopping-campaigns.php');
227
  new CampaignsConfiguration();
228
  }
229
  public function add_campaign_page() {
 
230
  include(ENHANCAD_PLUGIN_DIR . 'includes/setup/add-campaign.php');
231
  new AddCampaign();
232
  }
admin/class-conversios-onboarding.php CHANGED
@@ -68,21 +68,21 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
68
  }
69
 
70
  public function get_countries($user_country) {
71
- $getCountris = file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/countries.json");
72
  $contData = json_decode($getCountris);
73
  if (!empty($user_country)) {
74
  $data = "<select id='selectCountry' name='country' class='form-control slect2bx' readonly='true'>";
75
- $data .= "<option value=''>Please select country</option>";
76
  foreach ($contData as $key => $value) {
77
  $selected = ($value->code == $user_country) ? "selected='selected'" : "";
78
- $data .= "<option value=" . $value->code . " " . $selected . " >" . $value->name . "</option>";
79
  }
80
  $data .= "</select>";
81
  } else {
82
  $data = "<select id='selectCountry' name='country' class='form-control slect2bx'>";
83
- $data .= "<option value=''>Please select country</option>";
84
  foreach ($contData as $key => $value) {
85
- $data .= "<option value=" . $value->code . ">" . $value->name . "</option>";
86
  }
87
  $data .= "</select>";
88
  }
@@ -157,8 +157,8 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
157
  $is_e_tracking = (property_exists($googleDetail,"exception_tracking") && $googleDetail->exception_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
158
  $is_e_l_a_tracking = (property_exists($googleDetail,"enhanced_link_attribution_tracking") && $googleDetail->enhanced_link_attribution_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
159
 
160
- $countries = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/countries.json"));
161
- $credit = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "/includes/setup/json/country_reward.json"));
162
 
163
  $off_country = "";
164
  $off_credit_amt = "";
@@ -185,33 +185,33 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
185
  #wpadminbar{display: none;}
186
  </style>
187
  <div class="bodyrightpart onbordingbody-wapper">
188
- <div class="loader-section" id="loader-section"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/ajax-loader.gif';?>" alt="loader"></div>
189
  <div class="alert-message" id="tvc_onboarding_popup_box"></div>
190
  <div class="onbordingbody">
191
  <div class="site-header">
192
  <div class="container">
193
- <div class="brand"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/logo.png';?>" alt="Conversios" /></div>
194
  </div>
195
  </div>
196
  <div class="onbording-wrapper">
197
  <div class="container">
198
  <div class="smallcontainer">
199
  <div class="onbordingtop">
200
- <h2>Let’s get you started.</h2>
201
- <p>Automate Google Analytics, Dynamic Remarketing & Google Shopping in just 5 minutes.</p>
202
  </div>
203
  <div class="row">
204
  <!-- onborading left start -->
205
  <div class="onboardingstepwrap">
206
  <!-- step-0 start -->
207
  <div class="onbordording-step onbrdstep-0 gglanystep <?php if($this->subscriptionId == "" || $this->tvc_data['g_mail']=="" || $this->is_refresh_token_expire == true ){ echo "activestep"; }else{echo "selectedactivestep";} ?>">
208
- <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-0']; ?>" id="google-signing" data-id="step_0">
209
  <div class="stepleftround">
210
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
211
  </div>
212
  <div class="stepdetwrap">
213
- <h4>Connect Conversios with your website <?php /*<span class="helpicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/help-icon.png'; ?>" alt="" /></span> */ ?></h4>
214
- <p><?php echo (isset($this->tvc_data['g_mail']) && $this->subscriptionId)?$this->tvc_data['g_mail']:""; ?></p>
215
  </div>
216
  </div>
217
  <div class="stepmoredtlwrp">
@@ -219,30 +219,30 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
219
  <?php if(!isset($this->tvc_data['g_mail']) || $this->tvc_data['g_mail'] == "" || $this->subscriptionId == ""){?>
220
  <div class="google_connect_url google-btn">
221
  <div class="google-icon-wrapper">
222
- <img class="google-icon" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'; ?>"/>
223
  </div>
224
- <p class="btn-text"><b>Sign in with google</b></p>
225
  </div>
226
  <?php } else{?>
227
 
228
  <?php if($this->is_refresh_token_expire == true){?>
229
- <p class="alert alert-primary">It seems the token to access your Google accounts is expired. Sign in again to continue.</p>
230
  <div class="google_connect_url google-btn">
231
  <div class="google-icon-wrapper">
232
- <img class="google-icon" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'; ?>"/>
233
  </div>
234
- <p class="btn-text"><b>Sign in with google</b></p>
235
  </div>
236
  <?php } else{ ?>
237
  <div class="google_connect_url google-btn">
238
  <div class="google-icon-wrapper">
239
- <img class="google-icon" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'; ?>"/>
240
  </div>
241
- <p class="btn-text mr-35"><b>Reauthorize</b></p>
242
  </div>
243
  <?php } ?>
244
  <?php } ?>
245
- <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
246
  </div>
247
  </div>
248
  </div>
@@ -251,35 +251,32 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
251
  <div class="onbordording-step onbrdstep-1 gglanystep <?php echo ($complete_step['step-1']==1 && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?> <?php if($this->subscriptionId != "" && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false){ echo "activestep"; } ?>">
252
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-1']; ?>" id="google-analytics" data-id="step_1">
253
  <div class="stepleftround">
254
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
255
  </div>
256
  <div class="stepdetwrap">
257
- <h4>Connect Google Analytics Account </h4>
258
- <p>Tag your website with all important e-commerce events in Google Analytics.</p>
259
  </div>
260
  </div>
261
  <div class="stepmoredtlwrp">
262
  <div class="stepmoredtl">
263
  <form action="#">
264
  <div class="form-row">
265
- <h5>How do you plan to tag your website?</h5>
266
  <div class="cstmrdobtn-item">
267
  <label for="univeral">
268
  <input type="radio" <?php echo $this->is_checked($tracking_option, "UA"); ?> name="analytic_tag_type" id="univeral" value="UA">
269
  <span class="checkmark"></span>
270
- Universal Analytics (Google Analytics 3)
271
  </label>
272
  <div id="UA" class="slctunivr-filed">
273
- <?php /*<select class="slect2bx google_analytics_sel" id="ua_web_property_id">
274
- <option value=''>Select Property Id</option>
275
- </select> */ ?>
276
  <div class="tvc-dropdown">
277
- <div class="tvc-dropdown-header" id="ua_web_property_id_option_val" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo $googleDetail->ua_analytic_account_id; } ?>" data-val="<?php if($googleDetail->property_id){ echo $googleDetail->property_id; } ?>"><?php if($googleDetail->property_id){
278
- echo $googleDetail->property_id;
279
- }else{?>Select Property Id<?php } ?></div>
280
  <div class="tvc-dropdown-content" id="ua_web_property_id_option">
281
- <div class="tvc-select-items"><option value="">Select Property Id</option></div>
282
- <div class="tvc-ua-option-more option">Load More</div>
283
  </div>
284
  </div>
285
 
@@ -289,21 +286,19 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
289
  <label for="gglanytc">
290
  <input type="radio" <?php echo $this->is_checked($tracking_option, "GA4"); ?> name="analytic_tag_type" id="gglanytc" value="GA4">
291
  <span class="checkmark"></span>
292
- Google Analytics 4
293
  </label>
294
  <div id="GA4" class="slctunivr-filed">
295
- <?php /*<select class="slect2bx google_analytics_sel" id="ga4_web_measurement_id">
296
- <option value=''>Select Measurement Id</option>
297
- </select> */ ?>
298
  <div class="tvc-dropdown">
299
  <div class="tvc-dropdown-header" id="ga4_web_measurement_id_option_val" data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo $googleDetail->ga4_analytic_account_id; } ?>" data-val="<?php if($googleDetail->measurement_id){ echo $googleDetail->measurement_id; } ?>">
300
  <?php if($googleDetail->measurement_id){
301
- echo $googleDetail->measurement_id;
302
- }else{?>Select Measurement Id
303
  <?php } ?></div>
304
  <div class="tvc-dropdown-content" id="ga4_web_measurement_id_option">
305
- <div class="tvc-select-items"><option value="">Select Measurement Id</option></div>
306
- <div class="tvc-ga4-option-more option">Load More</div>
307
  </div>
308
  </div>
309
 
@@ -317,33 +312,29 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
317
  </label>
318
  <div id="BOTH" class="slctunivr-filed">
319
  <div class="botslectbxitem">
320
- <?php /*<select class="slect2bx google_analytics_sel" id="both_web_property_id">
321
- <option value=''>Select Property Id</option>
322
- </select>*/ ?>
323
  <div class="tvc-dropdown">
324
  <div class="tvc-dropdown-header" id="both_ua_web_property_id_option_val" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo $googleDetail->ua_analytic_account_id; } ?>" data-val="<?php if($googleDetail->property_id){ echo $googleDetail->property_id; } ?>"><?php if($googleDetail->property_id){
325
- echo $googleDetail->property_id;
326
- }else{?>Select Property Id<?php } ?></div>
327
  <div class="tvc-dropdown-content" id="both_ua_web_property_id_option">
328
- <div class="tvc-select-items"><option value="">Select Property Id</option></div>
329
- <div class="tvc-ua-option-more option">Load More</div>
330
  </div>
331
  </div>
332
 
333
  </div>
334
  <div class="botslectbxitem">
335
- <?php /*<select class="slect2bx google_analytics_sel" id="both_web_measurement_id">
336
- <option value=''>Select Measurement Id</option>
337
- </select> */ ?>
338
  <div class="tvc-dropdown">
339
  <div class="tvc-dropdown-header" id="both_ga4_web_measurement_id_option_val" data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo $googleDetail->ga4_analytic_account_id; } ?>" data-val="<?php if($googleDetail->measurement_id){ echo $googleDetail->measurement_id; } ?>">
340
  <?php if($googleDetail->measurement_id){
341
- echo $googleDetail->measurement_id;
342
- }else{?>Select Measurement Id
343
  <?php } ?></div>
344
  <div class="tvc-dropdown-content" id="both_ga4_web_measurement_id_option">
345
- <div class="tvc-select-items"><option value="">Select Measurement Id</option></div>
346
- <div class="tvc-ga4-option-more option">Load More</div>
347
  </div>
348
  </div>
349
  </div>
@@ -358,14 +349,14 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
358
  <label for="enhanced_e_commerce_tracking">
359
  <input type="checkbox" class="custom-control-input" name="enhanced_e_commerce_tracking" id="enhanced_e_commerce_tracking" <?php echo $is_e_e_tracking; ?>>
360
  <span class="checkmark"></span>
361
- Enhaced e-commerce tracking
362
  </label>
363
  </div>
364
  <div class="cstmcheck-item">
365
  <label for="add_gtag_snippet">
366
  <input type="checkbox" class="custom-control-input" name="add_gtag_snippe" id="add_gtag_snippet" <?php echo $is_a_g_snippet; ?>>
367
  <span class="checkmark"></span>
368
- Add gtag.js snippet
369
  </label>
370
  </div>
371
  </div>
@@ -373,8 +364,7 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
373
  <div class="stepsbmtbtn">
374
  <input type="hidden" id="subscriptionPropertyId" name="subscriptionPropertyId" value="<?php echo (property_exists($googleDetail,"property_id"))?$googleDetail->property_id:""; ?>">
375
  <input type="hidden" id="subscriptionMeasurementId" name="subscriptionMeasurementId" value="<?php echo (property_exists($googleDetail,"measurement_id"))?$googleDetail->measurement_id:""; ?>">
376
- <button type="button" disabled id="step_1" class="stepnextbtn stpnxttrgr">Next</button>
377
- <!-- remove dslbbtn class for green button -->
378
  </div>
379
  </form>
380
  </div>
@@ -385,11 +375,11 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
385
  <div class="onbordording-step onbrdstep-2 ggladsstep <?php echo ($complete_step['step-2']==1 && $this->is_refresh_token_expire == false)?'selectedactivestep':''; ?>">
386
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-2']; ?>" id="google-ads" data-id="step_2">
387
  <div class="stepleftround">
388
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
389
  </div>
390
  <div class="stepdetwrap">
391
- <h4>Select Google Ads account</h4>
392
- <p>With dynamic reamarketing tags, you will be able to show ads to your past visitors with specific product information tailored to your customer’s previous site visit.</p>
393
  </div>
394
  </div>
395
  <div class="stepmoredtlwrp">
@@ -399,23 +389,23 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
399
  <div class="ggladsselectbx">
400
  <input type="hidden" id="subscriptionGoogleAdsId" name="subscriptionGoogleAdsId" value="<?php echo property_exists($googleDetail,"google_ads_id")?$googleDetail->google_ads_id:""; ?>">
401
  <select class="slect2bx google_ads_sel" id="ads-account" name="customer_id">
402
- <option value=''>Select Google Ads Account</option>
403
  </select>
404
  </div>
405
  <div class="orwrp">or</div>
406
  <div class="creatnewwrp">
407
- <button type="button" class="cretnewbtn newggladsbtn"><span class="plusicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'; ?>" alt="" /></span> Create New</button>
408
  </div>
409
  </div>
410
 
411
  <div class="selcttopwrap">
412
  <div class="onbrdpp-body alert alert-primary" style="display:none;" id="new_google_ads_section">
413
- <h4>Account Created</h4>
414
- <p>Your Google Ads Account has been created <strong>(<b><span id="new_google_ads_id"></span></b>).</strong></p>
415
- <h5>Steps to claim your Google Ads Account:</h5>
416
  <ol>
417
- <li>Accept invitation mail from Google Ads sent to your email address <em><?php echo (isset($this->tvc_data['g_mail']))?$this->tvc_data['g_mail']:""; ?></em></li>
418
- <li>Log into your Google Ads account and set up your <em>billing preferences</em></li>
419
  </ol>
420
  </div>
421
  </div>
@@ -427,20 +417,20 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
427
  $is_d_r_tags = (property_exists($googleDetail,"dynamic_remarketing_tags") && $googleDetail->dynamic_remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
428
  $is_g_ad_c_tracking = (property_exists($googleDetail,"google_ads_conversion_tracking") && $googleDetail->google_ads_conversion_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
429
  ?>
430
- <h5>Advance Settings (Optional)</h5>
431
  <div class="chckbxbgbx dsplcolmview">
432
  <div class="cstmcheck-item">
433
  <label for="remarketing_tag">
434
  <input type="checkbox" class="custom-control-input" name="remarketing_tag" id="remarketing_tag" value="1" <?php echo $is_r_tags; ?>>
435
  <span class="checkmark"></span>
436
- Enable Google Remarketing Tag
437
  </label>
438
  </div>
439
  <div class="cstmcheck-item">
440
  <label for="dynamic_remarketing_tags">
441
  <input type="checkbox" class="custom-control-input" name="dynamic_remarketing_tags" id="dynamic_remarketing_tags" value="1" <?php echo $is_d_r_tags; ?>>
442
  <span class="checkmark"></span>
443
- Enable Dynamic Remarketing Tag
444
  </label>
445
  </div>
446
  <div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
@@ -448,9 +438,9 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
448
  <?php if($this->plan_id != 1){?>
449
  <input type="checkbox" class="custom-control-input" name="google_ads_conversion_tracking" id="google_ads_conversion_tracking" value="1" <?php echo $is_g_ad_c_tracking; ?>>
450
  <span class="checkmark"></span>
451
- Google Ads conversion tracking
452
  <?php }else{?>
453
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'; ?>"><label>Google Ads conversion tracking (Pro Plan)</label>
454
  <?php } ?>
455
  </label>
456
  </div>
@@ -458,13 +448,13 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
458
  <label for="link_google_analytics_with_google_ads">
459
  <input type="checkbox" class="custom-control-input" name="link_google_analytics_with_google_ads" id="link_google_analytics_with_google_ads" value="1" <?php echo $is_l_g_an_w_g_ad; ?>>
460
  <span class="checkmark"></span>
461
- Link Google Analytics with Google Ads
462
  </label>
463
  </div>
464
  </div>
465
  </div>
466
  <div class="stepsbmtbtn">
467
- <button type="button" id="step_2" class="stepnextbtn stpnxttrgr">Next</button>
468
  <!-- add dslbbtn class for disable button -->
469
  </div>
470
  </form>
@@ -476,11 +466,11 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
476
  <div class="onbordording-step onbrdstep-3 gglmrchntstep <?php echo ($complete_step['step-3']==1 && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?>">
477
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-3']; ?>" id="gmc-account" data-id="step_3">
478
  <div class="stepleftround">
479
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'; ?>" alt="" />
480
  </div>
481
  <div class="stepdetwrap">
482
- <h4>Select Google Merchant Center Account</h4>
483
- <p>Make your WooCommerce shop and products available to millions of shoppers across google.</p>
484
  </div>
485
  </div>
486
  <div class="stepmoredtlwrp">
@@ -490,37 +480,37 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
490
  <div class="form-group" style="display:none;" id="new_merchant_section">
491
  <div class="text-center">
492
  <div class="alert alert-primary" style="padding: 10px;" role="alert">
493
- <label class="form-label-control font-weight-bold">We have created new merchant center account with ID: <span id="new_merchant_id"></span>. Click on finish button to save new account.</label>
494
  </div>
495
  </div>
496
  </div>
497
  <div id="tvc_merchant_section">
498
  <div class="ggladsselectbx">
499
  <select class="slect2bx" id="google_merchant_center_id" name="google_merchant_center_id">
500
- <option value=''>Select Measurement Id</option>
501
  </select>
502
  </div>
503
  <div class="orwrp">or</div>
504
  <div class="creatnewwrp">
505
- <button type="button" class="cretnewbtn newmrchntbtn"><span class="plusicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'; ?>" alt="" /></span> Create New</button>
506
  </div>
507
  </div>
508
  </div>
509
  <div class="stepsbmtbtn">
510
- <button type="button" id="step_3" data-enchanter="finish" class="stepnextbtn finishbtn">Finish</button>
511
  <!-- add dslbbtn class for disable button -->
512
  </div>
513
  <input type="hidden" id="subscriptionMerchantCenId" name="subscriptionMerchantCenId" value="<?php echo property_exists($googleDetail,"google_merchant_center_id")?$googleDetail->google_merchant_center_id:""; ?>">
514
- <input type="hidden" id="loginCustomerId" name="loginCustomerId" value="<?php echo $login_customer_id; ?>">
515
- <input type="hidden" id="subscriptionId" name="subscriptionId" value="<?php echo $this->subscriptionId; ?>">
516
  <input type="hidden" id="plan_id" name="plan_id" value="<?php echo $this->plan_id; ?>">
517
  <input type="hidden" id="conversios_onboarding_nonce" name="conversios_onboarding_nonce" value="<?php echo wp_create_nonce( 'conversios_onboarding_nonce' ); ?>">
518
 
519
- <input type="hidden" id="ga_view_id" name="ga_view_id" value="<?php echo get_option('ee_ga_view_id'); ?>">
520
  </form>
521
  </div>
522
  <div class="stepnotewrp">
523
- If you are in the European Economic Area or Switzerland your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at <a href="">Google Merchant Center Help</a> website. If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners <a href="">here</a>. Once you have set up your Merchant Center account you can use our onboarding tool regardless of which CSS you use.
524
  </div>
525
  </div>
526
  </div>
@@ -532,17 +522,17 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
532
  <div class="sidebrcontainer">
533
  <div class="onbrd-rdmbx">
534
  <div class="rdm-amnt">
535
- <small>Redeem upto</small>
536
  <?php echo $off_credit_amt; ?>
537
  </div>
538
- <p>Create your first Google Ads account with us and redeem upto <?php echo $off_credit_amt; ?> on the spend you make in the next 31 days.</p>
539
- <a target="_blank" href="https://conversios.io/help-center/Google-Spend-Match.pdf" class="lrnmorbtn">Learn more <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/arrow_right.png'; ?>" alt="" /></a>
540
  </div>
541
  <div class="onbrdrgt-nav">
542
  <ul>
543
- <li><a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf">Installation Manual</a></li>
544
- <li><a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" href="">Google Shopping Guide</a></li>
545
- <li><a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" href="">FAQ</a></li>
546
  </ul>
547
  </div>
548
  </div>
@@ -559,21 +549,21 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
559
  <div class="onbrdppmain" role="document">
560
  <div class="onbrdnpp-cntner acccretppcntnr">
561
  <div class="onbrdnpp-hdr">
562
- <h4>You have not selected Google Ads account.</h4>
563
- <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
564
  </div>
565
  <div class="onbrdpp-body">
566
- <p>If you do not select Google Ads account, you will not be able to use some of the major features like:</p>
567
  <ul>
568
- <li>Dynamic Remarketing Tags </li>
569
- <li>Google Smart Shopping Campaigns</li>
570
- <li>Google Analytics and Google Ads linking</li>
571
  </ul>
572
- <p>Are you sure you want to continue without selecting Google Ads account?</p>
573
  </div>
574
  <div class="ppfooterbtn">
575
- <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="ads-skip-cancel">Cancel</button>
576
- <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="ads-skip-continue">Continue</button>
577
  </div>
578
  </div>
579
  </div>
@@ -583,14 +573,14 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
583
  <div class="onbrdppmain">
584
  <div class="onbrdnpp-cntner ggladsppcntnr">
585
  <div class="onbrdnpp-hdr">
586
- <h4>Enable Google Ads Account</h4>
587
- <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
588
  </div>
589
  <div class="onbrdpp-body">
590
- <p>You’ll receive an invite from Google on your email. Accept the invitation to enable your Google Ads Account.</p>
591
  </div>
592
  <div class="ppfooterbtn">
593
- <button type="button" id="ads-continue" class="ppblubtn sndinvitebtn">Send Invite</button>
594
  </div>
595
  </div>
596
  </div>
@@ -600,16 +590,16 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
600
  <div class="onbrdppmain">
601
  <div class="onbrdnpp-cntner acccretppcntnr">
602
  <div class="onbrdnpp-hdr">
603
- <h4>You have not selected Google merchant center account.</h4>
604
- <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png';?>" alt="" /></div>
605
  </div>
606
  <div class="onbrdpp-body">
607
- <p>If you do not select a merchant center account, you will not be able to use complete google shopping features.</p>
608
- <p>Are you sure you want to continue without selecting a merchant center account?</p>
609
  </div>
610
  <div class="ppfooterbtn">
611
- <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="merchant-center-skip-cancel">Cancel</button>
612
- <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="merchant-center-skip-continue">Continue</button>
613
  </div>
614
  </div>
615
  </div>
@@ -618,34 +608,34 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
618
  <div id="createmerchantpopup" class="pp-modal onbrd-popupwrp crtemrchntpp">
619
  <div class="onbrdppmain">
620
  <div class="onbrdnpp-cntner crtemrchntppcntnr">
621
- <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'; ?>" alt="" /></div>
622
  <div class="onbrdpp-body">
623
  <div class="row">
624
  <div class="crtemrchnpp-lft">
625
  <div class="crtemrchpplft-top">
626
- <h4>Create Google Merchant Center Account</h4>
627
- <p>Before you can upload product data, you’ll need to verify and claim your store’s website URL. Claiming associates your website URL with your Google Merchant Center account.</p>
628
  </div>
629
  <div class="claimedbx">
630
- Your site will automatically be claimed and verified.
631
  </div>
632
  <div class="mrchntformwrp">
633
  <form action="#">
634
  <div class="form-row">
635
- <input type="hidden" id="get-mail" name="g_email" value="<?php echo isset($this->tvc_data['g_mail'])?$this->tvc_data['g_mail']:""; ?>">
636
- <input type="text" value="<?php echo $this->tvc_data['user_domain']; ?>" class="fromfiled" name="url" id="url" placeholder="Enter Website">
637
  <div class="cstmcheck-item mt15">
638
  <label for="adult_content">
639
  <input class="" type="checkbox" name="adult_content" id="adult_content">
640
  <span class="checkmark"></span>
641
- My site contains
642
  </label>
643
- <strong>Adult Content</strong>
644
  </div>
645
  </div>
646
  <div class="form-row">
647
- <input type="text" class="fromfiled" name="store_name" id="store_name" placeholder="Enter Store Name" required>
648
- <div class="inputinfotxt">This name will appear in your Shopping Ads.</div>
649
  </div>
650
  <div class="form-row">
651
  <?php echo $this->get_countries($this->tvc_data['user_country']); ?>
@@ -655,27 +645,27 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
655
  <label for="terms_conditions">
656
  <input class="" type="checkbox" name="concent" id="terms_conditions">
657
  <span class="checkmark"></span>
658
- I accept the
659
  </label>
660
- <a target="_blank" href="https://support.google.com/merchants/answer/160173?hl=en">terms & conditions</a>
661
  </div>
662
  </div>
663
  </form>
664
  </div>
665
  <div class="ppfooterbtn">
666
- <button type="button" id="create_merchant_account" class="cretemrchntbtn">Create Account
667
  </button>
668
  </div>
669
  </div>
670
  <div class="crtemrchnpp-right">
671
- <h6>To use Google Shopping, your website must meet these requirements:</h6>
672
  <ul>
673
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6149970?hl=en">Google Shopping ads policies</a></li>
674
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Accurate Contact Information</a></li>
675
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6150122">Secure collection of process and personal data</a></li>
676
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Return Policy</a></li>
677
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6150127">Billing terms & conditions</a></li>
678
- <li><a target="_blank" href="https://support.google.com/merchants/answer/6150118">Complete checkout process</a></li>
679
  </ul>
680
  </div>
681
  </div>
@@ -690,44 +680,44 @@ if ( ! class_exists( 'Conversios_Onboarding' ) ) {
690
  <div class="onbrdppmain">
691
  <div class="onbrdnpp-cntner congratppcntnr">
692
  <div class="onbrdnpp-hdr txtcnter">
693
- <h2>Congratulations!!</h2>
694
- <div class="ppclsbtn clsbtntrgr"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'; ?>" alt="" /></div>
695
  </div>
696
  <div class="onbrdpp-body congratppbody">
697
- <p>You have been successfully onboarded. Please check the account summary below and confirm.</p>
698
  <div class="congratppdtlwrp">
699
  <div class="cngrtppdtl-item" id="google_analytics_property_id_info">
700
  <div class="cngtrpplft">
701
- <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
702
- Google Analytics Property Id:
703
  </div>
704
  <div class="cngtrpprgt" id="selected_google_analytics_property"></div>
705
  </div>
706
  <div class="cngrtppdtl-item" id="google_analytics_measurement_id_info">
707
  <div class="cngtrpplft">
708
- <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
709
- Google Analytics Measurement Id:
710
  </div>
711
  <div class="cngtrpprgt" id="selected_google_analytics_measurement"></div>
712
  </div>
713
  <div class="cngrtppdtl-item" id="google_ads_info">
714
  <div class="cngtrpplft">
715
- <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
716
- Google Ads Account:
717
  </div>
718
  <div class="cngtrpprgt" id="selected_google_ads_account"></div>
719
  </div>
720
  <div class="cngrtppdtl-item" id="google_merchant_center_info">
721
  <div class="cngtrpplft">
722
- <span class="cngrtchckicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'; ?>" alt="" /></span>
723
- Google Merchant Center Account
724
  </div>
725
  <div class="cngtrpprgt" id="selected_google_merchant_center"></div>
726
  </div>
727
  </div>
728
  </div>
729
  <div class="ppfooterbtn">
730
- <button type="button" id="confirm_selection" class="ppblubtn">Confirm</button>
731
  </div>
732
  </div>
733
  </div>
68
  }
69
 
70
  public function get_countries($user_country) {
71
+ $getCountris = file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/countries.json");
72
  $contData = json_decode($getCountris);
73
  if (!empty($user_country)) {
74
  $data = "<select id='selectCountry' name='country' class='form-control slect2bx' readonly='true'>";
75
+ $data .= "<option value=''>".__("Please select country","conversios")."</option>";
76
  foreach ($contData as $key => $value) {
77
  $selected = ($value->code == $user_country) ? "selected='selected'" : "";
78
+ $data .= "<option value=" . esc_attr($value->code) . " " . $selected . " >" . esc_attr($value->name) . "</option>";
79
  }
80
  $data .= "</select>";
81
  } else {
82
  $data = "<select id='selectCountry' name='country' class='form-control slect2bx'>";
83
+ $data .= "<option value=''>".__("Please select country","conversios")."</option>";
84
  foreach ($contData as $key => $value) {
85
+ $data .= "<option value=" . esc_attr($value->code) . ">" . esc_attr($value->name) . "</option>";
86
  }
87
  $data .= "</select>";
88
  }
157
  $is_e_tracking = (property_exists($googleDetail,"exception_tracking") && $googleDetail->exception_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
158
  $is_e_l_a_tracking = (property_exists($googleDetail,"enhanced_link_attribution_tracking") && $googleDetail->enhanced_link_attribution_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
159
 
160
+ $countries = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/countries.json"));
161
+ $credit = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR . "includes/setup/json/country_reward.json"));
162
 
163
  $off_country = "";
164
  $off_credit_amt = "";
185
  #wpadminbar{display: none;}
186
  </style>
187
  <div class="bodyrightpart onbordingbody-wapper">
188
+ <div class="loader-section" id="loader-section"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/ajax-loader.gif');?>" alt="loader"></div>
189
  <div class="alert-message" id="tvc_onboarding_popup_box"></div>
190
  <div class="onbordingbody">
191
  <div class="site-header">
192
  <div class="container">
193
+ <div class="brand"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/logo.png');?>" alt="Conversios" /></div>
194
  </div>
195
  </div>
196
  <div class="onbording-wrapper">
197
  <div class="container">
198
  <div class="smallcontainer">
199
  <div class="onbordingtop">
200
+ <h2><?php _e("Let’s get you started.","conversios"); ?></h2>
201
+ <p><?php _e("Automate Google Analytics, Dynamic Remarketing & Google Shopping in just 5 minutes.","conversios"); ?></p>
202
  </div>
203
  <div class="row">
204
  <!-- onborading left start -->
205
  <div class="onboardingstepwrap">
206
  <!-- step-0 start -->
207
  <div class="onbordording-step onbrdstep-0 gglanystep <?php if($this->subscriptionId == "" || $this->tvc_data['g_mail']=="" || $this->is_refresh_token_expire == true ){ echo "activestep"; }else{echo "selectedactivestep";} ?>">
208
+ <div class="stepdtltop" data-is-done="<?php echo esc_attr($complete_step['step-0']); ?>" id="google-signing" data-id="step_0">
209
  <div class="stepleftround">
210
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
211
  </div>
212
  <div class="stepdetwrap">
213
+ <h4><?php _e("Connect Conversios with your website","conversios"); ?></h4>
214
+ <p><?php echo esc_attr((isset($this->tvc_data['g_mail']) && $this->subscriptionId)?$this->tvc_data['g_mail']:""); ?></p>
215
  </div>
216
  </div>
217
  <div class="stepmoredtlwrp">
219
  <?php if(!isset($this->tvc_data['g_mail']) || $this->tvc_data['g_mail'] == "" || $this->subscriptionId == ""){?>
220
  <div class="google_connect_url google-btn">
221
  <div class="google-icon-wrapper">
222
+ <img class="google-icon" src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
223
  </div>
224
+ <p class="btn-text"><b><?php _e("Sign in with google","conversios"); ?></b></p>
225
  </div>
226
  <?php } else{?>
227
 
228
  <?php if($this->is_refresh_token_expire == true){?>
229
+ <p class="alert alert-primary"><?php _e("It seems the token to access your Google accounts is expired. Sign in again to continue.","conversios"); ?></p>
230
  <div class="google_connect_url google-btn">
231
  <div class="google-icon-wrapper">
232
+ <img class="google-icon" src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
233
  </div>
234
+ <p class="btn-text"><b><?php _e("Sign in with google","conversios"); ?></b></p>
235
  </div>
236
  <?php } else{ ?>
237
  <div class="google_connect_url google-btn">
238
  <div class="google-icon-wrapper">
239
+ <img class="google-icon" src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/g-logo.png'); ?>"/>
240
  </div>
241
+ <p class="btn-text mr-35"><b><?php _e("Reauthorize","conversios"); ?></b></p>
242
  </div>
243
  <?php } ?>
244
  <?php } ?>
245
+ <p><?php _e("Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.","conversios"); ?></p>
246
  </div>
247
  </div>
248
  </div>
251
  <div class="onbordording-step onbrdstep-1 gglanystep <?php echo ($complete_step['step-1']==1 && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?> <?php if($this->subscriptionId != "" && $this->tvc_data['g_mail'] && $this->is_refresh_token_expire == false){ echo "activestep"; } ?>">
252
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-1']; ?>" id="google-analytics" data-id="step_1">
253
  <div class="stepleftround">
254
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
255
  </div>
256
  <div class="stepdetwrap">
257
+ <h4><?php _e("Connect Google Analytics Account","conversios"); ?></h4>
258
+ <p><?php _e("Tag your website with all important e-commerce events in Google Analytics.","conversios"); ?></p>
259
  </div>
260
  </div>
261
  <div class="stepmoredtlwrp">
262
  <div class="stepmoredtl">
263
  <form action="#">
264
  <div class="form-row">
265
+ <h5><?php _e("How do you plan to tag your website?","conversios"); ?></h5>
266
  <div class="cstmrdobtn-item">
267
  <label for="univeral">
268
  <input type="radio" <?php echo $this->is_checked($tracking_option, "UA"); ?> name="analytic_tag_type" id="univeral" value="UA">
269
  <span class="checkmark"></span>
270
+ <?php _e("Universal Analytics (Google Analytics 3)","conversios"); ?>
271
  </label>
272
  <div id="UA" class="slctunivr-filed">
 
 
 
273
  <div class="tvc-dropdown">
274
+ <div class="tvc-dropdown-header" id="ua_web_property_id_option_val" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo $googleDetail->ua_analytic_account_id; } ?>" data-val="<?php if($googleDetail->property_id){ echo esc_attr($googleDetail->property_id); } ?>"><?php if($googleDetail->property_id){
275
+ echo esc_attr($googleDetail->property_id);
276
+ }else{?><?php _e("Select Property Id","conversios"); ?><?php } ?></div>
277
  <div class="tvc-dropdown-content" id="ua_web_property_id_option">
278
+ <div class="tvc-select-items"><option value=""><?php _e("Select Property Id","conversios"); ?></option></div>
279
+ <div class="tvc-ua-option-more option"><?php _e("Load More","conversios"); ?></div>
280
  </div>
281
  </div>
282
 
286
  <label for="gglanytc">
287
  <input type="radio" <?php echo $this->is_checked($tracking_option, "GA4"); ?> name="analytic_tag_type" id="gglanytc" value="GA4">
288
  <span class="checkmark"></span>
289
+ <?php _e("Google Analytics 4","conversios"); ?>
290
  </label>
291
  <div id="GA4" class="slctunivr-filed">
292
+
 
 
293
  <div class="tvc-dropdown">
294
  <div class="tvc-dropdown-header" id="ga4_web_measurement_id_option_val" data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo $googleDetail->ga4_analytic_account_id; } ?>" data-val="<?php if($googleDetail->measurement_id){ echo $googleDetail->measurement_id; } ?>">
295
  <?php if($googleDetail->measurement_id){
296
+ echo esc_attr($googleDetail->measurement_id);
297
+ }else{?><?php _e("Select Measurement Id","conversios"); ?>
298
  <?php } ?></div>
299
  <div class="tvc-dropdown-content" id="ga4_web_measurement_id_option">
300
+ <div class="tvc-select-items"><option value=""><?php _e("Select Measurement Id","conversios"); ?></option></div>
301
+ <div class="tvc-ga4-option-more option"><?php _e("Load More","conversios"); ?></div>
302
  </div>
303
  </div>
304
 
312
  </label>
313
  <div id="BOTH" class="slctunivr-filed">
314
  <div class="botslectbxitem">
315
+
 
 
316
  <div class="tvc-dropdown">
317
  <div class="tvc-dropdown-header" id="both_ua_web_property_id_option_val" data-accountid="<?php if($googleDetail->ua_analytic_account_id){ echo $googleDetail->ua_analytic_account_id; } ?>" data-val="<?php if($googleDetail->property_id){ echo $googleDetail->property_id; } ?>"><?php if($googleDetail->property_id){
318
+ echo esc_attr($googleDetail->property_id);
319
+ }else{?><?php _e("Select Property Id","conversios"); ?><?php } ?></div>
320
  <div class="tvc-dropdown-content" id="both_ua_web_property_id_option">
321
+ <div class="tvc-select-items"><option value=""><?php _e("Select Property Id","conversios"); ?></option></div>
322
+ <div class="tvc-ua-option-more option"><?php _e("Load More","conversios"); ?></div>
323
  </div>
324
  </div>
325
 
326
  </div>
327
  <div class="botslectbxitem">
328
+
 
 
329
  <div class="tvc-dropdown">
330
  <div class="tvc-dropdown-header" id="both_ga4_web_measurement_id_option_val" data-accountid="<?php if($googleDetail->ga4_analytic_account_id){ echo $googleDetail->ga4_analytic_account_id; } ?>" data-val="<?php if($googleDetail->measurement_id){ echo $googleDetail->measurement_id; } ?>">
331
  <?php if($googleDetail->measurement_id){
332
+ echo esc_attr($googleDetail->measurement_id);
333
+ }else{?><?php _e("Select Measurement Id","conversios"); ?>
334
  <?php } ?></div>
335
  <div class="tvc-dropdown-content" id="both_ga4_web_measurement_id_option">
336
+ <div class="tvc-select-items"><option value=""><?php _e("Select Measurement Id","conversios"); ?></option></div>
337
+ <div class="tvc-ga4-option-more option"><?php _e("Load More","conversios"); ?></div>
338
  </div>
339
  </div>
340
  </div>
349
  <label for="enhanced_e_commerce_tracking">
350
  <input type="checkbox" class="custom-control-input" name="enhanced_e_commerce_tracking" id="enhanced_e_commerce_tracking" <?php echo $is_e_e_tracking; ?>>
351
  <span class="checkmark"></span>
352
+ <?php _e("Enhaced e-commerce tracking","conversios"); ?>
353
  </label>
354
  </div>
355
  <div class="cstmcheck-item">
356
  <label for="add_gtag_snippet">
357
  <input type="checkbox" class="custom-control-input" name="add_gtag_snippe" id="add_gtag_snippet" <?php echo $is_a_g_snippet; ?>>
358
  <span class="checkmark"></span>
359
+ <?php _e("Add gtag.js snippet","conversios"); ?>
360
  </label>
361
  </div>
362
  </div>
364
  <div class="stepsbmtbtn">
365
  <input type="hidden" id="subscriptionPropertyId" name="subscriptionPropertyId" value="<?php echo (property_exists($googleDetail,"property_id"))?$googleDetail->property_id:""; ?>">
366
  <input type="hidden" id="subscriptionMeasurementId" name="subscriptionMeasurementId" value="<?php echo (property_exists($googleDetail,"measurement_id"))?$googleDetail->measurement_id:""; ?>">
367
+ <button type="button" disabled id="step_1" class="stepnextbtn stpnxttrgr"><?php _e("Next","conversios"); ?></button>
 
368
  </div>
369
  </form>
370
  </div>
375
  <div class="onbordording-step onbrdstep-2 ggladsstep <?php echo ($complete_step['step-2']==1 && $this->is_refresh_token_expire == false)?'selectedactivestep':''; ?>">
376
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-2']; ?>" id="google-ads" data-id="step_2">
377
  <div class="stepleftround">
378
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
379
  </div>
380
  <div class="stepdetwrap">
381
+ <h4><?php _e("Select Google Ads account","conversios"); ?></h4>
382
+ <p><?php _e("With dynamic reamarketing tags, you will be able to show ads to your past visitors with specific product information tailored to your customer’s previous site visit.","conversios"); ?></p>
383
  </div>
384
  </div>
385
  <div class="stepmoredtlwrp">
389
  <div class="ggladsselectbx">
390
  <input type="hidden" id="subscriptionGoogleAdsId" name="subscriptionGoogleAdsId" value="<?php echo property_exists($googleDetail,"google_ads_id")?$googleDetail->google_ads_id:""; ?>">
391
  <select class="slect2bx google_ads_sel" id="ads-account" name="customer_id">
392
+ <option value=''><?php _e("Select Google Ads Account","conversios"); ?></option>
393
  </select>
394
  </div>
395
  <div class="orwrp">or</div>
396
  <div class="creatnewwrp">
397
+ <button type="button" class="cretnewbtn newggladsbtn"><span class="plusicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'); ?>" alt="" /></span> <?php _e("Create New","conversios"); ?></button>
398
  </div>
399
  </div>
400
 
401
  <div class="selcttopwrap">
402
  <div class="onbrdpp-body alert alert-primary" style="display:none;" id="new_google_ads_section">
403
+ <h4><?php _e("Account Created","conversios"); ?></h4>
404
+ <p><?php _e("Your Google Ads Account has been created","conversios"); ?> <strong>(<b><span id="new_google_ads_id"></span></b>).</strong></p>
405
+ <h5><?php _e("Steps to claim your Google Ads Account:","conversios"); ?></h5>
406
  <ol>
407
+ <li><?php _e("Accept invitation mail from Google Ads sent to your email address","conversios"); ?> <em><?php echo (isset($this->tvc_data['g_mail']))?$this->tvc_data['g_mail']:""; ?></em></li>
408
+ <li><?php _e("Log into your Google Ads account and set up your <em>billing preferences</em>","conversios"); ?></li>
409
  </ol>
410
  </div>
411
  </div>
417
  $is_d_r_tags = (property_exists($googleDetail,"dynamic_remarketing_tags") && $googleDetail->dynamic_remarketing_tags == 1)?"checked":(($defaulSelection == 1)?"checked":"");
418
  $is_g_ad_c_tracking = (property_exists($googleDetail,"google_ads_conversion_tracking") && $googleDetail->google_ads_conversion_tracking == 1)?"checked":(($defaulSelection == 1)?"checked":"");
419
  ?>
420
+ <h5><?php _e("Advance Settings (Optional)","conversios"); ?></h5>
421
  <div class="chckbxbgbx dsplcolmview">
422
  <div class="cstmcheck-item">
423
  <label for="remarketing_tag">
424
  <input type="checkbox" class="custom-control-input" name="remarketing_tag" id="remarketing_tag" value="1" <?php echo $is_r_tags; ?>>
425
  <span class="checkmark"></span>
426
+ <?php _e("Enable Google Remarketing Tag","conversios"); ?>
427
  </label>
428
  </div>
429
  <div class="cstmcheck-item">
430
  <label for="dynamic_remarketing_tags">
431
  <input type="checkbox" class="custom-control-input" name="dynamic_remarketing_tags" id="dynamic_remarketing_tags" value="1" <?php echo $is_d_r_tags; ?>>
432
  <span class="checkmark"></span>
433
+ <?php _e("Enable Dynamic Remarketing Tag","conversios"); ?>
434
  </label>
435
  </div>
436
  <div class="cstmcheck-item <?php if($this->plan_id == 1){?>cstmcheck-item-pro <?php } ?>">
438
  <?php if($this->plan_id != 1){?>
439
  <input type="checkbox" class="custom-control-input" name="google_ads_conversion_tracking" id="google_ads_conversion_tracking" value="1" <?php echo $is_g_ad_c_tracking; ?>>
440
  <span class="checkmark"></span>
441
+ <?php _e("Google Ads conversion tracking","conversios"); ?>
442
  <?php }else{?>
443
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lock.svg'); ?>"><label><?php _e("Google Ads conversion tracking (Pro Plan)","conversios"); ?></label>
444
  <?php } ?>
445
  </label>
446
  </div>
448
  <label for="link_google_analytics_with_google_ads">
449
  <input type="checkbox" class="custom-control-input" name="link_google_analytics_with_google_ads" id="link_google_analytics_with_google_ads" value="1" <?php echo $is_l_g_an_w_g_ad; ?>>
450
  <span class="checkmark"></span>
451
+ <?php _e("Link Google Analytics with Google Ads","conversios"); ?>
452
  </label>
453
  </div>
454
  </div>
455
  </div>
456
  <div class="stepsbmtbtn">
457
+ <button type="button" id="step_2" class="stepnextbtn stpnxttrgr"><?php _e("Next","conversios"); ?></button>
458
  <!-- add dslbbtn class for disable button -->
459
  </div>
460
  </form>
466
  <div class="onbordording-step onbrdstep-3 gglmrchntstep <?php echo ($complete_step['step-3']==1 && $this->is_refresh_token_expire == false )?'selectedactivestep':''; ?>">
467
  <div class="stepdtltop" data-is-done="<?php echo $complete_step['step-3']; ?>" id="gmc-account" data-id="step_3">
468
  <div class="stepleftround">
469
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/check-wbg.png'); ?>" alt="" />
470
  </div>
471
  <div class="stepdetwrap">
472
+ <h4><?php _e("Select Google Merchant Center Account","conversios"); ?></h4>
473
+ <p><?php _e("Make your WooCommerce shop and products available to millions of shoppers across google.","conversios"); ?></p>
474
  </div>
475
  </div>
476
  <div class="stepmoredtlwrp">
480
  <div class="form-group" style="display:none;" id="new_merchant_section">
481
  <div class="text-center">
482
  <div class="alert alert-primary" style="padding: 10px;" role="alert">
483
+ <label class="form-label-control font-weight-bold"><?php _e("We have created new merchant center account with ID: ","conversios"); ?><span id="new_merchant_id"></span>. <?php _e("Click on finish button to save new account.","conversios"); ?></label>
484
  </div>
485
  </div>
486
  </div>
487
  <div id="tvc_merchant_section">
488
  <div class="ggladsselectbx">
489
  <select class="slect2bx" id="google_merchant_center_id" name="google_merchant_center_id">
490
+ <option value=''><?php _e("Select Measurement Id","conversios"); ?></option>
491
  </select>
492
  </div>
493
  <div class="orwrp">or</div>
494
  <div class="creatnewwrp">
495
+ <button type="button" class="cretnewbtn newmrchntbtn"><span class="plusicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/blue-plus.png'); ?>" alt="" /></span> <?php _e("Create New","conversios"); ?></button>
496
  </div>
497
  </div>
498
  </div>
499
  <div class="stepsbmtbtn">
500
+ <button type="button" id="step_3" data-enchanter="finish" class="stepnextbtn finishbtn"><?php _e("Finish","conversios"); ?></button>
501
  <!-- add dslbbtn class for disable button -->
502
  </div>
503
  <input type="hidden" id="subscriptionMerchantCenId" name="subscriptionMerchantCenId" value="<?php echo property_exists($googleDetail,"google_merchant_center_id")?$googleDetail->google_merchant_center_id:""; ?>">
504
+ <input type="hidden" id="loginCustomerId" name="loginCustomerId" value="<?php echo esc_attr($login_customer_id); ?>">
505
+ <input type="hidden" id="subscriptionId" name="subscriptionId" value="<?php echo esc_attr($this->subscriptionId); ?>">
506
  <input type="hidden" id="plan_id" name="plan_id" value="<?php echo $this->plan_id; ?>">
507
  <input type="hidden" id="conversios_onboarding_nonce" name="conversios_onboarding_nonce" value="<?php echo wp_create_nonce( 'conversios_onboarding_nonce' ); ?>">
508
 
509
+ <input type="hidden" id="ga_view_id" name="ga_view_id" value="<?php echo esc_attr(get_option('ee_ga_view_id')); ?>">
510
  </form>
511
  </div>
512
  <div class="stepnotewrp">
513
+ <?php _e('If you are in the European Economic Area or Switzerland your Merchant Center account must be associated with a Comparison Shopping Service (CSS). Please find more information at <a href="">Google Merchant Center Help</a> website. If you create a new Merchant Center account through this application, it will be associated with Google Shopping, Google’s CSS, by default. You can change the CSS associated with your account at any time. Please find more information about our CSS Partners <a href="">here</a>. Once you have set up your Merchant Center account you can use our onboarding tool regardless of which CSS you use.','conversios'); ?>
514
  </div>
515
  </div>
516
  </div>
522
  <div class="sidebrcontainer">
523
  <div class="onbrd-rdmbx">
524
  <div class="rdm-amnt">
525
+ <small><?php _e("Redeem upto","conversios"); ?></small>
526
  <?php echo $off_credit_amt; ?>
527
  </div>
528
+ <p><?php _e("Create your first Google Ads account with us and redeem upto","conversios"); ?> <?php echo $off_credit_amt; ?> <?php _e("on the spend you make in the next 31 days.","conversios"); ?></p>
529
+ <a target="_blank" href="https://conversios.io/help-center/Google-Spend-Match.pdf" class="lrnmorbtn"><?php _e("Learn more","conversios"); ?> <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/arrow_right.png'); ?>" alt="" /></a>
530
  </div>
531
  <div class="onbrdrgt-nav">
532
  <ul>
533
+ <li><a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Installation-Manual.pdf"); ?>"><?php echo _e("Installation Manual","conversios"); ?></a></li>
534
+ <li><a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" href=""><?php _e("Google Shopping Guide","conversios"); ?></a></li>
535
+ <li><a target="_blank" href="<?php echo esc_url("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" href=""><?php _e("FAQ","conversios"); ?></a></li>
536
  </ul>
537
  </div>
538
  </div>
549
  <div class="onbrdppmain" role="document">
550
  <div class="onbrdnpp-cntner acccretppcntnr">
551
  <div class="onbrdnpp-hdr">
552
+ <h4><?php _e("You have not selected Google Ads account.","conversios"); ?></h4>
553
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png');?>" alt="" /></div>
554
  </div>
555
  <div class="onbrdpp-body">
556
+ <p><?php _e("If you do not select Google Ads account, you will not be able to use some of the major features like:","conversios"); ?></p>
557
  <ul>
558
+ <li><?php _e("Dynamic Remarketing Tags","conversios"); ?> </li>
559
+ <li><?php _e("Google Smart Shopping Campaigns","conversios"); ?></li>
560
+ <li><?php _e("Google Analytics and Google Ads linking","conversios"); ?></li>
561
  </ul>
562
+ <p><?php _e("Are you sure you want to continue without selecting Google Ads account?","conversios"); ?></p>
563
  </div>
564
  <div class="ppfooterbtn">
565
+ <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="ads-skip-cancel"><?php _e("Cancel","conversios"); ?></button>
566
+ <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="ads-skip-continue"><?php _e("Continue","conversios"); ?></button>
567
  </div>
568
  </div>
569
  </div>
573
  <div class="onbrdppmain">
574
  <div class="onbrdnpp-cntner ggladsppcntnr">
575
  <div class="onbrdnpp-hdr">
576
+ <h4><?php _e("Enable Google Ads Account","conversios"); ?></h4>
577
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png');?>" alt="" /></div>
578
  </div>
579
  <div class="onbrdpp-body">
580
+ <p><?php _e("You’ll receive an invite from Google on your email. Accept the invitation to enable your Google Ads Account.","conversios"); ?></p>
581
  </div>
582
  <div class="ppfooterbtn">
583
+ <button type="button" id="ads-continue" class="ppblubtn sndinvitebtn"><?php _e("Send Invite","conversios"); ?></button>
584
  </div>
585
  </div>
586
  </div>
590
  <div class="onbrdppmain">
591
  <div class="onbrdnpp-cntner acccretppcntnr">
592
  <div class="onbrdnpp-hdr">
593
+ <h4><?php _e("You have not selected Google merchant center account.","conversios"); ?></h4>
594
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png');?>" alt="" /></div>
595
  </div>
596
  <div class="onbrdpp-body">
597
+ <p><?php _e("If you do not select a merchant center account, you will not be able to use complete google shopping features.","conversios"); ?></p>
598
+ <p><?php _e("Are you sure you want to continue without selecting a merchant center account?","conversios"); ?></p>
599
  </div>
600
  <div class="ppfooterbtn">
601
+ <button type="button" class="ppblubtn btn-secondary" data-dismiss="modal" id="merchant-center-skip-cancel"><?php _e("Cancel","conversios"); ?></button>
602
+ <button type="button" class="ppblubtn btn-primary" data-dismiss="modal" id="merchant-center-skip-continue"><?php _e("Continue","conversios"); ?></button>
603
  </div>
604
  </div>
605
  </div>
608
  <div id="createmerchantpopup" class="pp-modal onbrd-popupwrp crtemrchntpp">
609
  <div class="onbrdppmain">
610
  <div class="onbrdnpp-cntner crtemrchntppcntnr">
611
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'); ?>" alt="" /></div>
612
  <div class="onbrdpp-body">
613
  <div class="row">
614
  <div class="crtemrchnpp-lft">
615
  <div class="crtemrchpplft-top">
616
+ <h4><?php _e("Create Google Merchant Center Account","conversios"); ?></h4>
617
+ <p><?php _e("Before you can upload product data, you’ll need to verify and claim your store’s website URL. Claiming associates your website URL with your Google Merchant Center account.","conversios"); ?></p>
618
  </div>
619
  <div class="claimedbx">
620
+ <?php _e("Your site will automatically be claimed and verified.","conversios"); ?>
621
  </div>
622
  <div class="mrchntformwrp">
623
  <form action="#">
624
  <div class="form-row">
625
+ <input type="hidden" id="get-mail" name="g_email" value="<?php echo esc_attr(isset($this->tvc_data['g_mail'])?$this->tvc_data['g_mail']:""); ?>">
626
+ <input type="text" value="<?php echo esc_attr($this->tvc_data['user_domain']); ?>" class="fromfiled" name="url" id="url" placeholder="Enter Website">
627
  <div class="cstmcheck-item mt15">
628
  <label for="adult_content">
629
  <input class="" type="checkbox" name="adult_content" id="adult_content">
630
  <span class="checkmark"></span>
631
+ <?php _e("My site contains","conversios"); ?>
632
  </label>
633
+ <strong><?php _e("Adult Content","conversios"); ?></strong>
634
  </div>
635
  </div>
636
  <div class="form-row">
637
+ <input type="text" class="fromfiled" name="store_name" id="store_name" placeholder="<?php _e("Enter Store Name","conversios"); ?>" required>
638
+ <div class="inputinfotxt"><?php _e("This name will appear in your Shopping Ads.","conversios"); ?></div>
639
  </div>
640
  <div class="form-row">
641
  <?php echo $this->get_countries($this->tvc_data['user_country']); ?>
645
  <label for="terms_conditions">
646
  <input class="" type="checkbox" name="concent" id="terms_conditions">
647
  <span class="checkmark"></span>
648
+ <?php _e("I accept the","conversios"); ?>
649
  </label>
650
+ <a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/160173?hl=en"); ?>"><?php _e("terms & conditions","conversios"); ?></a>
651
  </div>
652
  </div>
653
  </form>
654
  </div>
655
  <div class="ppfooterbtn">
656
+ <button type="button" id="create_merchant_account" class="cretemrchntbtn"><?php _e("Create Account","conversios"); ?>
657
  </button>
658
  </div>
659
  </div>
660
  <div class="crtemrchnpp-right">
661
+ <h6><?php _e("To use Google Shopping, your website must meet these requirements:","conversios"); ?></h6>
662
  <ul>
663
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6149970?hl=en"); ?>"><?php _e("Google Shopping ads policies","conversios"); ?></a></li>
664
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6150127"); ?>"><?php _e("Accurate Contact Information","conversios"); ?></a></li>
665
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6150122"); ?>"><?php _e("Secure collection of process and personal data","conversios"); ?></a></li>
666
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6150127"); ?>"><?php _e("Return Policy","conversios"); ?></a></li>
667
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6150127"); ?>"><?php _e("Billing terms & conditions","conversios"); ?></a></li>
668
+ <li><a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6150118"); ?>"><?php _e("Complete checkout process","conversios"); ?></a></li>
669
  </ul>
670
  </div>
671
  </div>
680
  <div class="onbrdppmain">
681
  <div class="onbrdnpp-cntner congratppcntnr">
682
  <div class="onbrdnpp-hdr txtcnter">
683
+ <h2><?php _e("Congratulations!!","conversios"); ?></h2>
684
+ <div class="ppclsbtn clsbtntrgr"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-icon.png'); ?>" alt="" /></div>
685
  </div>
686
  <div class="onbrdpp-body congratppbody">
687
+ <p><?php _e("You have been successfully onboarded. Please check the account summary below and confirm.","conversios"); ?></p>
688
  <div class="congratppdtlwrp">
689
  <div class="cngrtppdtl-item" id="google_analytics_property_id_info">
690
  <div class="cngtrpplft">
691
+ <span class="cngrtchckicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
692
+ <?php _e("Google Analytics Property Id:","conversios"); ?>
693
  </div>
694
  <div class="cngtrpprgt" id="selected_google_analytics_property"></div>
695
  </div>
696
  <div class="cngrtppdtl-item" id="google_analytics_measurement_id_info">
697
  <div class="cngtrpplft">
698
+ <span class="cngrtchckicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
699
+ <?php _e("Google Analytics Measurement Id:","conversios"); ?>
700
  </div>
701
  <div class="cngtrpprgt" id="selected_google_analytics_measurement"></div>
702
  </div>
703
  <div class="cngrtppdtl-item" id="google_ads_info">
704
  <div class="cngtrpplft">
705
+ <span class="cngrtchckicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
706
+ <?php _e("Google Ads Account:","conversios"); ?>
707
  </div>
708
  <div class="cngtrpprgt" id="selected_google_ads_account"></div>
709
  </div>
710
  <div class="cngrtppdtl-item" id="google_merchant_center_info">
711
  <div class="cngtrpplft">
712
+ <span class="cngrtchckicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/green-check.png'); ?>" alt="" /></span>
713
+ <?php _e("Google Merchant Center Account","conversios"); ?>
714
  </div>
715
  <div class="cngtrpprgt" id="selected_google_merchant_center"></div>
716
  </div>
717
  </div>
718
  </div>
719
  <div class="ppfooterbtn">
720
+ <button type="button" id="confirm_selection" class="ppblubtn"><?php _e("Confirm","conversios"); ?></button>
721
  </div>
722
  </div>
723
  </div>
admin/class-enhanced-ecommerce-google-analytics-admin.php CHANGED
@@ -62,7 +62,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
62
  $this->pro_plan_site = $this->get_pro_plan_site();
63
  $this->google_detail = $this->get_ee_options_data();
64
  //remove container_old_ui_head hook once new UI all implemented
65
- add_action('container_old_ui_head',array($this,'create_head'));
66
  }
67
  public function tvc_admin_notice(){
68
  // add fixed message notification
@@ -72,7 +72,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
72
  }else{
73
  if(!$this->get_subscriptionId()){
74
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_a">
75
- <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=conversios"><b><u>CONFIGURE NOW</u></b></a></p>
76
  </div>';
77
  }
78
  }
@@ -83,7 +83,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
83
  $googleDetail = $google_detail['setting'];
84
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
85
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_b">
86
- <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=conversios"><b><u>Automate now</u></b></a></p>
87
  </div>';
88
 
89
  }
@@ -92,7 +92,7 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
92
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
93
  }else{
94
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_c">
95
- <p>Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI. <a href="admin.php?page=conversios"><b><u>View it from here.</u></b></a></p>
96
  </div>';
97
 
98
  }
@@ -128,29 +128,26 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
128
  if($_GET['page'] == "conversios_onboarding"){
129
  return;
130
  }
131
- wp_register_style('font_awesome', '//use.fontawesome.com/releases/v5.0.13/css/all.css');
132
- wp_enqueue_style('font_awesome');
133
- wp_register_style('plugin-bootstrap',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css');
134
  wp_enqueue_style('plugin-bootstrap');
135
- wp_enqueue_style('custom-css', ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css', array(), $this->version, 'all' );
136
  //if(is_rtl()){ }
137
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
138
- wp_register_style('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.css');
139
  wp_enqueue_style('plugin-select2');
140
- wp_register_style('plugin-steps',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.css');
141
  wp_enqueue_style('plugin-steps');
142
- wp_register_style('tvc-dataTables-css', ENHANCAD_PLUGIN_URL.'/admin/css/dataTables.bootstrap4.min.css');
143
  wp_enqueue_style('tvc-dataTables-css');
144
  }
145
  if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
146
- wp_register_style('aga_confirm', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css');
147
- wp_enqueue_style('aga_confirm');
148
- wp_register_style('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.css');
149
  wp_enqueue_style('plugin-select2');
150
- wp_register_style('tvc-bootstrap-datepicker-css',ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css');
151
  wp_enqueue_style('tvc-bootstrap-datepicker-css');
152
  }
153
- wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/enhanced-ecommerce-google-analytics-admin.css', array(), $this->version, 'all');
154
  }
155
  }
156
 
@@ -165,170 +162,36 @@ class Enhanced_Ecommerce_Google_Analytics_Admin extends TVC_Admin_Helper {
165
  if($_GET['page'] == "conversios_onboarding"){
166
  return;
167
  }
168
- wp_enqueue_script( 'custom-jquery', ENHANCAD_PLUGIN_URL . '/admin/js/jquery-3.5.1.min.js', array( 'jquery' ), $this->version, false );
169
- wp_register_script('popper_bootstrap', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js');
170
  wp_enqueue_script('popper_bootstrap');
171
- wp_register_script('atvc_bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.5.1/js/bootstrap.min.js');
172
  wp_enqueue_script('atvc_bootstrap');
173
- wp_register_script('tvc_bootstrap_mod', 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js');
174
- wp_enqueue_script('tvc_bootstrap_mod');
175
 
176
- wp_enqueue_script( 'tvc-ee-custom-js', ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js', array( 'jquery' ), $this->version, false );
177
 
178
- wp_enqueue_script( 'tvc-ee-slick-js', ENHANCAD_PLUGIN_URL . '/admin/js/slick.min.js', array( 'jquery' ), $this->version, false );
179
 
180
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
181
- wp_register_script('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js');
182
- wp_enqueue_script('plugin-select2');
183
- wp_register_script('plugin-step-js',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.js');
184
- wp_enqueue_script('plugin-step-js');
185
  }
186
  if($this->is_current_tab_in(array('sync_product_page'))){
187
- wp_enqueue_script( 'tvc-ee-dataTables-js', ENHANCAD_PLUGIN_URL . '/admin/js/jquery.dataTables.min.js', array( 'jquery' ), $this->version, false );
188
- wp_enqueue_script( 'tvc-ee-dataTables-1-js', ENHANCAD_PLUGIN_URL . '/admin/js/dataTables.bootstrap4.min.js', array( 'jquery' ), $this->version, false );
189
  }
190
  if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
191
- wp_register_script('tvc_confirm_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js');
192
- wp_enqueue_script('tvc_confirm_js');
193
- wp_register_script('plugin-select2',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js');
194
  wp_enqueue_script('plugin-select2');
195
- wp_register_script('plugin-chart',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/chart/chart.js');
196
  wp_enqueue_script('plugin-chart');
197
- wp_register_script('tvc-bootstrap-datepicker-js',ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js');
198
  wp_enqueue_script('tvc-bootstrap-datepicker-js');
199
  }
200
  }
201
  }
202
-
203
- public function create_head(){
204
- $google_detail = $this->google_detail;
205
- if(isset($google_detail['setting'])){
206
- $googleDetail = $google_detail['setting'];
207
- }
208
- $plan_name = "Free Plan";
209
- $plan_price = "";
210
- $product_sync_max_limit ="Products sync limit ( 100 )";
211
- $plan_id = 1;
212
- if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
213
- $plan_id = $googleDetail->plan_id;
214
- }
215
- if(isset($googleDetail->plan_name) && !in_array($googleDetail->plan_id, array("1"))){
216
- $plan_name = $googleDetail->plan_name;
217
- }
218
- if(isset($googleDetail->price) && !in_array($googleDetail->plan_id, array("1"))){
219
- $plan_price = " (".$googleDetail->price." USD)";
220
- }
221
- if(isset($googleDetail->max_limit)){
222
- $max_limit = $googleDetail->max_limit;
223
- if(in_array($plan_id, array("7","8"))){
224
- $max_limit = "Unlimited";
225
- }
226
- $product_sync_max_limit = "Product sync limit ( ".$max_limit." )";
227
- }
228
- ?>
229
- <div class="container">
230
- <div class="header-section">
231
- <?php if($plan_id == 1){?>
232
- <div class="top-section">
233
- <p>You are using free plugin. <a href="<?php echo $this->pro_plan_site.'?utm_source=EE+Plugin+User+Interface&utm_medium=Top+Bar+upgrading+to+pro&utm_campaign=Upsell+at+Conversios'; ?>" target="_blank" class="text-underline">Try premium features at no cost for 1 Month..!!</a></p>
234
- </div>
235
- <?php } ?>
236
- <nav class="navbar navbar-section">
237
- <a class="navbar-brand">
238
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/logo.png'; ?>"/>
239
- </a>
240
- <div class="form-inline">
241
- <span class="nav-btn">
242
- <span class="badge badge-primary free-plan"><?php echo $plan_name; //echo $plan_price;?> - <?php echo $product_sync_max_limit; ?></span>
243
- </span>
244
- <?php $ee_msg_list = $this->get_ee_msg_nofification_list();
245
- $active_count = 0;
246
- if(!empty($ee_msg_list)){
247
- $html = "";
248
- foreach ($ee_msg_list as $key => $value) {
249
- if( isset($value["active"]) && $value["active"] == 1 ){
250
- $active_count++;
251
- $m_date = isset($value["date"])?"<span class=\"tvc-msg_date\">".$value["date"]."</span>":"";
252
- $m_title = isset($value["title"])?"<h4 class=\"tvc-msg_title\">".$value["title"]."</h4>":"";
253
- $m_html = isset($value["html"])?"<span class=\"tvc-msg_text\">".base64_decode($value["html"])."</span>":"";
254
- $target = (isset($value["link_type"]) && $value["link_type"] == "external")?"target=\"_blank\"":"";
255
- $m_link = isset($value["link"])?"<a ".$target." href=".$value["link"]." class=\"tvc-notification-button is-secondary\">".$value["link_title"]."</a>":"";
256
-
257
- $html.="<li>
258
- <section class=\"tvc-msg plain\">
259
- <div class=\"tvc-msg_wrapper\">
260
- <div class=\"tvc-msg_content\">".$m_title.$m_html."</div>
261
- <div class=\"tvc-msg_actions\">
262
- ".$m_link."
263
- <div class=\"tvc-dropdown\">
264
- <button type=\"button\" data-id=".$key." class=\"tvc-notification-button is-tertiary is-dismissible-notification\">Dismiss</button>
265
- </div>
266
- ".$m_date."
267
- </div>
268
- </div>
269
- </section>
270
- </li>";
271
- }
272
- }
273
- }
274
- ?>
275
- <div class="tvc-notification">
276
- <a href="javascript:void(0)" class="nav-btn" aria-haspopup="true" aria-expanded="false">
277
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/notification.svg'; ?>" alt="notification" class="nav-icon"/>
278
- <span class="badge badge-primary not-count"><?php echo $active_count; ?></span>
279
- </a>
280
- <?php if($html!=""){?>
281
- <div class="dropdown-menu tvc-notification-dropdown-menu">
282
- <ul>
283
- <?php echo $html; ?>
284
- </ul>
285
- <script>
286
- (function( $ ) {
287
- $('.tvc-notification a.nav-btn').on('click', function (event) {
288
- event.preventDefault();
289
- $(this).parent().toggleClass('show');
290
- $(".tvc-notification-dropdown-menu").toggleClass('show');
291
- });
292
- $('body').on('click', function (e) {
293
- if(!$('.tvc-notification').is(e.target) && $('.tvc-notification').has(e.target).length === 0 && $('.show').has(e.target).length === 0 ){
294
- $('.tvc-notification-dropdown-menu').removeClass('show');
295
- $('.tvc-notification').removeClass('show');
296
- }
297
- });
298
- $(function(){
299
- $( '.tvc-notification' ).on( 'click', '.is-dismissible-notification', function( event, el ) {
300
- var this_id = $(this);
301
- var ee_dismiss_id = $(this).attr("data-id");
302
- jQuery.post(tvc_ajax_url,{
303
- action: "tvc_call_notification_dismiss",
304
- data:{ee_dismiss_id:ee_dismiss_id},
305
- dataType: "json"
306
- },function( response ){
307
- var rsp = JSON.parse(response);
308
- if(rsp.status == "success"){
309
- this_id.parent().parent().parent().parent().parent().slideUp();
310
- }
311
- });
312
- });
313
- });
314
- })( jQuery );
315
- </script>
316
- </div>
317
- <?php } ?>
318
- </div>
319
-
320
- </div>
321
- </nav>
322
- </div>
323
- </div>
324
- <?php
325
- }
326
-
327
- public function check_nall_and_message($val, $msg, $msg_false){
328
- if((isset($val) && $val != "" && $val != 0) ){
329
- return $msg;
330
- }else{
331
- return $msg_false;
332
- }
333
- }
334
  }
62
  $this->pro_plan_site = $this->get_pro_plan_site();
63
  $this->google_detail = $this->get_ee_options_data();
64
  //remove container_old_ui_head hook once new UI all implemented
65
+ //add_action('container_old_ui_head',array($this,'create_head'));
66
  }
67
  public function tvc_admin_notice(){
68
  // add fixed message notification
72
  }else{
73
  if(!$this->get_subscriptionId()){
74
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_a">
75
+ <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.","conversios").' <a href="admin.php?page=conversios"><b><u>'. __("CONFIGURE NOW","conversios").'</u></b></a></p>
76
  </div>';
77
  }
78
  }
83
  $googleDetail = $google_detail['setting'];
84
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id =="" && $this->subscriptionId != "" ){
85
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_b">
86
+ <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.","conversios").' <a href="admin.php?page=conversios"><b><u>'. __("Automate now","conversios").'</u></b></a></p>
87
  </div>';
88
 
89
  }
92
  if(isset($ee_additional_data['dismissed_ee_adimin_notic_c']) && $ee_additional_data['dismissed_ee_adimin_notic_c'] == 1){
93
  }else{
94
  echo '<div class="notice notice-info is-dismissible" data-id="ee_adimin_notic_c">
95
+ <p>'. __("Now access important eCommerce KPIs and Google Ads campaign performance data directly in your wordpress backend to improve your marketing ROI.","conversios").' <a href="admin.php?page=conversios"><b><u>'. __("View it from here.","conversios").'</u></b></a></p>
96
  </div>';
97
 
98
  }
128
  if($_GET['page'] == "conversios_onboarding"){
129
  return;
130
  }
131
+ wp_register_style('plugin-bootstrap', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/bootstrap/css/bootstrap.min.css') );
 
 
132
  wp_enqueue_style('plugin-bootstrap');
133
+ wp_enqueue_style('custom-css', esc_url(ENHANCAD_PLUGIN_URL . '/admin/css/custom-style.css'), array(), $this->version, 'all' );
134
  //if(is_rtl()){ }
135
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
136
+ wp_register_style('plugin-select2', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.css') );
137
  wp_enqueue_style('plugin-select2');
138
+ wp_register_style('plugin-steps', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.css'));
139
  wp_enqueue_style('plugin-steps');
140
+ wp_register_style('tvc-dataTables-css', esc_url(ENHANCAD_PLUGIN_URL.'/admin/css/dataTables.bootstrap4.min.css'));
141
  wp_enqueue_style('tvc-dataTables-css');
142
  }
143
  if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
144
+
145
+ wp_register_style('plugin-select2', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.css') );
 
146
  wp_enqueue_style('plugin-select2');
147
+ wp_register_style('tvc-bootstrap-datepicker-css', esc_url(ENHANCAD_PLUGIN_URL. '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.css'));
148
  wp_enqueue_style('tvc-bootstrap-datepicker-css');
149
  }
150
+ wp_enqueue_style($this->plugin_name, esc_url(plugin_dir_url(__FILE__) . 'css/enhanced-ecommerce-google-analytics-admin.css'), array(), $this->version, 'all');
151
  }
152
  }
153
 
162
  if($_GET['page'] == "conversios_onboarding"){
163
  return;
164
  }
165
+ wp_enqueue_script( 'custom-jquery', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/jquery-3.5.1.min.js'), array( 'jquery' ), $this->version, false );
166
+ wp_register_script('popper_bootstrap', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/popper.min.js') );
167
  wp_enqueue_script('popper_bootstrap');
168
+ wp_register_script('atvc_bootstrap', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/bootstrap.min.js') );
169
  wp_enqueue_script('atvc_bootstrap');
170
+ //wp_register_script('tvc_bootstrap_mod', 'https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/js/bootstrap.bundle.min.js');
171
+ //wp_enqueue_script('tvc_bootstrap_mod');
172
 
173
+ wp_enqueue_script( 'tvc-ee-custom-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/tvc-ee-custom.js'), array( 'jquery' ), $this->version, false );
174
 
175
+ wp_enqueue_script( 'tvc-ee-slick-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/slick.min.js'), array( 'jquery' ), $this->version, false );
176
 
177
  if($this->is_current_tab_in(array('sync_product_page','gaa_config_page'))){
178
+ wp_register_script('plugin-select2', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js') );
179
+ wp_enqueue_script('plugin-select2');
180
+ wp_register_script('plugin-step-js', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/jquery-steps/jquery.steps.js') );
181
+ wp_enqueue_script('plugin-step-js');
182
  }
183
  if($this->is_current_tab_in(array('sync_product_page'))){
184
+ wp_enqueue_script( 'tvc-ee-dataTables-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/jquery.dataTables.min.js'), array( 'jquery' ), $this->version, false );
185
+ wp_enqueue_script( 'tvc-ee-dataTables-1-js', esc_url(ENHANCAD_PLUGIN_URL . '/admin/js/dataTables.bootstrap4.min.js'), array( 'jquery' ), $this->version, false );
186
  }
187
  if($this->is_current_tab_in(array("shopping_campaigns_page","add_campaign_page"))){
188
+ wp_register_script('plugin-select2', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/select2/select2.min.js') );
 
 
189
  wp_enqueue_script('plugin-select2');
190
+ wp_register_script('plugin-chart', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/chart/chart.js'));
191
  wp_enqueue_script('plugin-chart');
192
+ wp_register_script('tvc-bootstrap-datepicker-js', esc_url(ENHANCAD_PLUGIN_URL . '/includes/setup/plugins/datepicker/bootstrap-datepicker.min.js'));
193
  wp_enqueue_script('tvc-bootstrap-datepicker-js');
194
  }
195
  }
196
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
admin/class-enhanced-ecommerce-google-analytics-settings.php CHANGED
@@ -1,14 +1,4 @@
1
  <?php
2
- /**
3
- * The admin-setting functionality of the plugin.
4
- *
5
- * @link tatvic.com
6
- * @since 1.0.0
7
- *
8
- * @package Enhanced_Ecommerce_Google_Analytics
9
- * @subpackage Enhanced_Ecommerce_Google_Analytics/admin
10
- */
11
-
12
  /**
13
  * The admin-setting functionality of the plugin.
14
  *
@@ -39,7 +29,7 @@ class Enhanced_Ecommerce_Google_Settings {
39
  $_POST[$key] = '';
40
  }
41
  if(isset($_POST[$key])) {
42
- $ee_options[$key] = $_POST[$key];
43
  }
44
  }
45
  }
@@ -59,7 +49,7 @@ class Enhanced_Ecommerce_Google_Settings {
59
  $_POST[$key] = '';
60
  }
61
  if( $_POST[$key] != $value ) {
62
- $get_ee_settings[$key] = $_POST[$key];
63
  }
64
  }
65
  }
@@ -70,7 +60,7 @@ class Enhanced_Ecommerce_Google_Settings {
70
  continue;
71
  }
72
  if(!array_key_exists($key,$get_ee_settings)){
73
- $get_ee_settings[$key] = $value;
74
  }
75
  }
76
  }
@@ -89,10 +79,10 @@ class Enhanced_Ecommerce_Google_Settings {
89
  continue;
90
  }
91
  if(!isset($_POST[$key])){
92
- $_POST[$key] = $value;
93
  }
94
  if(isset($_POST[$key])) {
95
- $ee_options[$key] = $_POST[$key];
96
  }
97
  }
98
  }
@@ -106,10 +96,10 @@ class Enhanced_Ecommerce_Google_Settings {
106
  continue;
107
  }
108
  if(!isset($_POST[$key])){
109
- $_POST[$key] = $value;
110
  }
111
  if( $_POST[$key] != $value && $_POST[$key] != '') {
112
- $get_ee_settings[$key] = $_POST[$key];
113
  }
114
  }
115
  }
@@ -121,11 +111,11 @@ class Enhanced_Ecommerce_Google_Settings {
121
  continue;
122
  }
123
  if(!array_key_exists($key,$get_ee_settings)){
124
- $get_ee_settings[$key] = $value;
125
  }
126
  }
127
  }
128
  update_option($settings, serialize( $get_ee_settings ));
129
  }
130
  }
131
- }
1
  <?php
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * The admin-setting functionality of the plugin.
4
  *
29
  $_POST[$key] = '';
30
  }
31
  if(isset($_POST[$key])) {
32
+ $ee_options[$key] = sanitize_text_field($_POST[$key]);
33
  }
34
  }
35
  }
49
  $_POST[$key] = '';
50
  }
51
  if( $_POST[$key] != $value ) {
52
+ $get_ee_settings[$key] = sanitize_text_field($_POST[$key]);
53
  }
54
  }
55
  }
60
  continue;
61
  }
62
  if(!array_key_exists($key,$get_ee_settings)){
63
+ $get_ee_settings[$key] = sanitize_text_field($value);
64
  }
65
  }
66
  }
79
  continue;
80
  }
81
  if(!isset($_POST[$key])){
82
+ $_POST[$key] = sanitize_text_field($value);
83
  }
84
  if(isset($_POST[$key])) {
85
+ $ee_options[$key] = sanitize_text_field($_POST[$key]);
86
  }
87
  }
88
  }
96
  continue;
97
  }
98
  if(!isset($_POST[$key])){
99
+ $_POST[$key] = sanitize_text_field($value);
100
  }
101
  if( $_POST[$key] != $value && $_POST[$key] != '') {
102
+ $get_ee_settings[$key] = sanitize_text_field($_POST[$key]);
103
  }
104
  }
105
  }
111
  continue;
112
  }
113
  if(!array_key_exists($key,$get_ee_settings)){
114
+ $get_ee_settings[$key] = sanitize_text_field($value);
115
  }
116
  }
117
  }
118
  update_option($settings, serialize( $get_ee_settings ));
119
  }
120
  }
121
+ }
admin/class-survey.php CHANGED
@@ -1,6 +1,5 @@
1
  <?php
2
- if ( ! class_exists( 'TVC_Survey' ) ) {
3
-
4
  class TVC_Survey {
5
  public $api_url = TVC_API_CALL_URL.'/customersurvey';
6
  public $name;
@@ -79,7 +78,7 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
79
  <script type="text/javascript">
80
  jQuery(function($){
81
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
82
- $overlay = $('#ee-survey-<?php echo $this->plugin; ?>'),
83
  $form = $overlay.find('form'),
84
  formOpen = false;
85
  // Plugin listing table deactivate link.
@@ -101,8 +100,8 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
101
  event.preventDefault();
102
  var data = {
103
  action:'tvc_call_add_survey',
104
- customer_id:'<?php echo $this->apiCustomerId; ?>',
105
- subscription_id:'<?php echo $this->subscriptionId; ?>',
106
  radio_option_val: "skip",
107
  other_reason: "",
108
  site_url: '<?php echo esc_url( home_url() ); ?>',
@@ -119,8 +118,8 @@ if ( ! class_exists( 'TVC_Survey' ) ) {
119
  }
120
  var data = {
121
  action:'tvc_call_add_survey',
122
- customer_id:'<?php echo $this->apiCustomerId; ?>',
123
- subscription_id:'<?php echo $this->subscriptionId; ?>',
124
  radio_option_val: $form.find('.selected input[type=radio]').val(),
125
  other_reason: $form.find('.selected input[type=text]').val(),
126
  site_url: '<?php echo esc_url( home_url() ); ?>',
1
  <?php
2
+ if ( ! class_exists( 'TVC_Survey' ) ) {
 
3
  class TVC_Survey {
4
  public $api_url = TVC_API_CALL_URL.'/customersurvey';
5
  public $name;
78
  <script type="text/javascript">
79
  jQuery(function($){
80
  var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
81
+ $overlay = $('#ee-survey-<?php echo esc_attr($this->plugin); ?>'),
82
  $form = $overlay.find('form'),
83
  formOpen = false;
84
  // Plugin listing table deactivate link.
100
  event.preventDefault();
101
  var data = {
102
  action:'tvc_call_add_survey',
103
+ customer_id:'<?php echo esc_attr($this->apiCustomerId); ?>',
104
+ subscription_id:'<?php echo esc_attr($this->subscriptionId); ?>',
105
  radio_option_val: "skip",
106
  other_reason: "",
107
  site_url: '<?php echo esc_url( home_url() ); ?>',
118
  }
119
  var data = {
120
  action:'tvc_call_add_survey',
121
+ customer_id:'<?php echo esc_attr($this->apiCustomerId); ?>',
122
+ subscription_id:'<?php echo esc_attr($this->subscriptionId); ?>',
123
  radio_option_val: $form.find('.selected input[type=radio]').val(),
124
  other_reason: $form.find('.selected input[type=text]').val(),
125
  site_url: '<?php echo esc_url( home_url() ); ?>',
admin/class-tvc-admin-auto-product-sync-helper.php CHANGED
@@ -46,9 +46,9 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
46
  if ( $wpdb->get_var( $query ) === $tablename ) {
47
 
48
  }else{
49
- $sql_create = "CREATE TABLE ".$tablename." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `w_product_id` BIGINT(20) NOT NULL , `w_cat_id` INT(10) NOT NULL , `g_cat_id` INT(10) NOT NULL , `g_attribute_mapping` LONGTEXT NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) );";
50
  if(maybe_create_table( $tablename, $sql_create )){
51
- $this->import_last_sync_in_db();
52
  }
53
  }
54
  /* cteate table for save auto sync product call */
@@ -56,7 +56,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
56
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
57
  if ( $wpdb->get_var( $query ) === $tablename ) {
58
  }else{
59
- $sql_create = "CREATE TABLE ".$tablename." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `sync_product_ids` LONGTEXT NULL, `w_total_product` INT(10) NOT NULL , `total_sync_product` INT(10) NOT NULL ,last_sync DATETIME NOT NULL, create_sync DATETIME NOT NULL, next_sync DATETIME NOT NULL, `last_sync_product_id` BIGINT(20) NOT NULL, `action_scheduler_id` INT(10) NOT NULL, `status` INT(1) NOT NULL COMMENT '0 failed, 1 completed', PRIMARY KEY (`id`) );";
60
  if(!maybe_create_table( $tablename, $sql_create )){ }
61
  }
62
 
@@ -65,15 +65,17 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
65
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
66
  if ( $wpdb->get_var( $query ) === $tablename ) {
67
  }else{
68
- $sql_create = "CREATE TABLE ".$tablename." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `gmc_id` VARCHAR(200) NOT NULL , `name` VARCHAR(200) NOT NULL , `product_id` VARCHAR(100) NOT NULL , `google_status` VARCHAR(50) NOT NULL , `image_link` VARCHAR(200) NOT NULL, `issues` LONGTEXT NOT NULL, PRIMARY KEY (`id`) );";
69
  if(maybe_create_table( $tablename, $sql_create )){
70
  $this->TVC_Admin_Helper->import_gmc_products_sync_in_db();
71
 
72
  $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
73
  $syncProductStat = array("approved" => 0, "disapproved" => 0, "pending" => 0 );
74
- foreach ($product_status as $key => $value) {
75
- if(isset($value['google_status']) ){
76
- $syncProductStat[$value['google_status']] = (isset($value['count']) && $value['count'] >0)?$value['count']:0;
 
 
77
  }
78
  }
79
  $syncProductStat["total"] = $this->TVC_Admin_DB_Helper->tvc_row_count('ee_products_sync_list');
@@ -88,7 +90,8 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
88
  $output = [];
89
  $terms_ids = wp_get_post_terms( $product_id, 'product_cat', array('fields' => 'ids') );
90
  // Loop though terms ids (product categories)
91
- foreach( $terms_ids as $term_id ) {
 
92
  $term_names = [];
93
  // Loop through product category ancestors
94
  foreach( get_ancestors( $term_id, 'product_cat') as $ancestor_id ){
@@ -100,11 +103,12 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
100
  $term_names[] = get_term( $term_id, 'product_cat' )->name;
101
  // Add the formatted ancestors with the product category to main array
102
  $output[$term_id] = implode(' > ', $term_names);
 
103
  }
104
  $output = array_values($output);
105
  return $output;
106
  }
107
- public function import_last_sync_in_db(){
108
  $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
109
  $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
110
  if($ee_prod_mapped_cats != "" && $ee_prod_mapped_attrs != ""){
@@ -145,24 +149,31 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
145
  }
146
  }
147
  }
148
- }
149
-
 
 
150
  public function update_last_sync_in_db(){
151
  $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
152
  $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
153
  if($ee_prod_mapped_cats != "" && $ee_prod_mapped_attrs != "" &&!empty($ee_prod_mapped_cats)){
154
- global $wpdb;
 
155
  foreach($ee_prod_mapped_cats as $mc_key => $mappedCat){
 
 
 
156
  $args= array(
157
  'post_type' => 'product',
158
  'numberposts' => -1,
159
  'post_status' => 'publish',
160
- 'tax_query' => array( array(
161
  'taxonomy' => 'product_cat',
162
  'field' => 'term_id',
163
  'terms' =>$mc_key,
164
- 'operator' => 'IN'
165
- )
 
166
  )
167
  );
168
  $all_products = get_posts($args);
@@ -171,9 +182,9 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
171
  if(!empty($all_products)){
172
  foreach($all_products as $postkey => $postvalue){
173
  $t_data = array(
174
- 'w_product_id'=>$postvalue->ID,
175
- 'w_cat_id'=>$mc_key,
176
- 'g_cat_id'=>$mappedCat['id'],
177
  'g_attribute_mapping'=> json_encode($ee_prod_mapped_attrs),
178
  'update_date'=>date('Y-m-d')
179
  );
@@ -205,10 +216,10 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
205
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
206
 
207
  $product = array(
208
- 'offer_id'=>$postvalue->w_product_id,
209
  'channel'=>'online',
210
  'link'=>get_permalink($postvalue->w_product_id),
211
- 'google_product_category'=>$postvalue->g_cat_id
212
  );
213
 
214
  $temp_product=array();
@@ -231,19 +242,20 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
231
  }
232
 
233
  $product = array_merge($temp_product,$product);
234
- if( !empty($prd) && $prd->get_type() == "variable" ){
 
235
  //$variation_attributes = $prd->get_variation_attributes();
236
  $p_variations = $prd->get_available_variations();
237
- if(!empty($p_variations)){
238
  foreach ($p_variations as $v_key => $v_value) {
239
  $postmeta_var = (object)$this->TVC_Admin_Helper->tvc_get_post_meta($v_value['variation_id']);
240
  $formArray_val = $formArray['title'];
241
  $product['title'] = (isset($postObj->$formArray_val))?$postObj->$formArray_val:get_the_title($postvalue->w_product_id);
242
  $tvc_temp_desc_key = $formArray['description'];
243
  $product['description'] = (isset($v_value['variation_description']) && $v_value['variation_description'] != "")?$v_value['variation_description']:$postObj->$tvc_temp_desc_key;
244
- $product['offer_id'] = $v_value['variation_id'];
245
- $product['id'] = $v_value['variation_id'];
246
- $product['item_group_id'] = $postvalue->w_product_id;
247
  $productTypes = $this->get_product_category($postvalue->w_product_id);
248
  if(!empty($productTypes)){
249
  $product['productTypes'] = $productTypes;
@@ -274,6 +286,8 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
274
  $product[$key]['value'] = $postmeta_var->_price;
275
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
276
  $product[$key]['value'] = $postmeta_var->_sale_price;
 
 
277
  }
278
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
279
  $product[$key]['currency'] = $tvc_currency;
@@ -285,6 +299,8 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
285
  $product[$key]['value'] = $postmeta_var->$value;
286
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
287
  $product[$key]['value'] = $postmeta_var->_sale_price;
 
 
288
  }
289
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
290
  $product[$key]['currency'] = $tvc_currency;
@@ -305,7 +321,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
305
  }
306
  }
307
  $item = [
308
- 'merchant_id' => $merchantId,
309
  'batch_id' => ++$batchId,
310
  'method' => 'insert',
311
  'product' => $product
@@ -314,7 +330,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
314
  }
315
  }
316
 
317
- }else if( !empty($prd) ){
318
  $image_id = $prd->get_image_id();
319
  $product['image_link'] = wp_get_attachment_image_url($image_id, 'full');
320
  $productTypes = $this->get_product_category($postvalue->w_product_id);
@@ -364,7 +380,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
364
  }
365
  }
366
  $item = [
367
- 'merchant_id' => $merchantId,
368
  'batch_id' => ++$batchId,
369
  'method' => 'insert',
370
  'product' => $product
@@ -380,15 +396,15 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
380
  //$count = 0;
381
  $pre_last_sync_product_id = $last_sync_product_id;
382
  if( $product_count > 0 ){
383
- $tvc_currency = $this->TVC_Admin_Helper->get_woo_currency();
384
- $merchantId = $this->TVC_Admin_Helper->get_merchantId();
385
- $customerId = $this->TVC_Admin_Helper->get_currentCustomerId();
386
- $accountId = $this->TVC_Admin_Helper->get_main_merchantId();
387
- $subscriptionId = $this->TVC_Admin_Helper->get_subscriptionId();
388
- $last_sync_product_id =( $last_sync_product_id > 0)?$last_sync_product_id:0;
389
  global $wpdb;
390
  $tablename = $wpdb->prefix .'ee_product_sync_data';
391
- $sql = "select * from ".$tablename." where id > ".$last_sync_product_id." LIMIT ".$this->batch_size;
392
  $products = $wpdb->get_results($sql, OBJECT);
393
  $entries = [];
394
  if(!empty($products)){
@@ -396,9 +412,9 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
396
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
397
  // call product sync API
398
  $data = [
399
- 'merchant_id' => $accountId,
400
- 'account_id' => $merchantId,
401
- 'subscription_id' => $subscriptionId,
402
  'entries' => $p_map_attribute['items']
403
  ];
404
  $url = $this->apiDomain.'/products/batch';
@@ -449,8 +465,8 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
449
  }
450
  $t_data = array(
451
  'sync_product_ids'=>json_encode($sync_product_ids),
452
- 'w_total_product'=>$product_count,
453
- 'total_sync_product'=>$total_sync_product,
454
  'last_sync'=>$last_sync,
455
  'create_sync'=>date( 'Y-m-d H:i:s', current_time( 'timestamp') ),
456
  'next_sync'=>$next_sync,
@@ -469,7 +485,7 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
469
  if($row_count >0){
470
  if ( function_exists( 'as_next_scheduled_action' ) && false === as_next_scheduled_action( 'ee_auto_product_sync_check' ) ) {
471
  //strtotime( 'midnight tonight' )
472
- as_schedule_recurring_action( strtotime( "+2 minutes" ), $this->time_space, 'ee_auto_product_sync_check',array("last_sync_product_id"=>0),"product_sync");
473
  }
474
  }
475
  }
@@ -505,9 +521,9 @@ if ( ! class_exists( 'TVC_Admin_Auto_Product_sync_Helper' ) ) {
505
  $refreshToken = $refresh_token;
506
  $data = [
507
  "grant_type" => 'refresh_token',
508
- "client_id" => $clientId,
509
- 'client_secret' => $clientSecret,
510
- 'refresh_token' => $refreshToken,
511
  ];
512
 
513
  $postData = json_encode($data);
46
  if ( $wpdb->get_var( $query ) === $tablename ) {
47
 
48
  }else{
49
+ $sql_create = "CREATE TABLE ".esc_sql($tablename)." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `w_product_id` BIGINT(20) NOT NULL , `w_cat_id` INT(10) NOT NULL , `g_cat_id` INT(10) NOT NULL , `g_attribute_mapping` LONGTEXT NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) );";
50
  if(maybe_create_table( $tablename, $sql_create )){
51
+ //$this->import_last_sync_in_db();
52
  }
53
  }
54
  /* cteate table for save auto sync product call */
56
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
57
  if ( $wpdb->get_var( $query ) === $tablename ) {
58
  }else{
59
+ $sql_create = "CREATE TABLE ".esc_sql($tablename)." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `sync_product_ids` LONGTEXT NULL, `w_total_product` INT(10) NOT NULL , `total_sync_product` INT(10) NOT NULL ,last_sync DATETIME NOT NULL, create_sync DATETIME NOT NULL, next_sync DATETIME NOT NULL, `last_sync_product_id` BIGINT(20) NOT NULL, `action_scheduler_id` INT(10) NOT NULL, `status` INT(1) NOT NULL COMMENT '0 failed, 1 completed', PRIMARY KEY (`id`) );";
60
  if(!maybe_create_table( $tablename, $sql_create )){ }
61
  }
62
 
65
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
66
  if ( $wpdb->get_var( $query ) === $tablename ) {
67
  }else{
68
+ $sql_create = "CREATE TABLE ".esc_sql($tablename)." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `gmc_id` VARCHAR(200) NOT NULL , `name` VARCHAR(200) NOT NULL , `product_id` VARCHAR(100) NOT NULL , `google_status` VARCHAR(50) NOT NULL , `image_link` VARCHAR(200) NOT NULL, `issues` LONGTEXT NOT NULL, PRIMARY KEY (`id`) );";
69
  if(maybe_create_table( $tablename, $sql_create )){
70
  $this->TVC_Admin_Helper->import_gmc_products_sync_in_db();
71
 
72
  $product_status = $this->TVC_Admin_DB_Helper->tvc_get_counts_groupby('ee_products_sync_list','google_status');
73
  $syncProductStat = array("approved" => 0, "disapproved" => 0, "pending" => 0 );
74
+ if(!empty( $product_status)){
75
+ foreach ($product_status as $key => $value) {
76
+ if(isset($value['google_status']) ){
77
+ $syncProductStat[$value['google_status']] = esc_attr((isset($value['count']) && $value['count'] >0)?$value['count']:0);
78
+ }
79
  }
80
  }
81
  $syncProductStat["total"] = $this->TVC_Admin_DB_Helper->tvc_row_count('ee_products_sync_list');
90
  $output = [];
91
  $terms_ids = wp_get_post_terms( $product_id, 'product_cat', array('fields' => 'ids') );
92
  // Loop though terms ids (product categories)
93
+ if(!empty($terms_ids)){
94
+ foreach( $terms_ids as $term_id ) {
95
  $term_names = [];
96
  // Loop through product category ancestors
97
  foreach( get_ancestors( $term_id, 'product_cat') as $ancestor_id ){
103
  $term_names[] = get_term( $term_id, 'product_cat' )->name;
104
  // Add the formatted ancestors with the product category to main array
105
  $output[$term_id] = implode(' > ', $term_names);
106
+ }
107
  }
108
  $output = array_values($output);
109
  return $output;
110
  }
111
+ /*public function import_last_sync_in_db(){
112
  $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
113
  $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
114
  if($ee_prod_mapped_cats != "" && $ee_prod_mapped_attrs != ""){
149
  }
150
  }
151
  }
152
+ }*/
153
+ /*
154
+ * update last product sync data in DB table "ee_product_sync_data"
155
+ */
156
  public function update_last_sync_in_db(){
157
  $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
158
  $ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
159
  if($ee_prod_mapped_cats != "" && $ee_prod_mapped_attrs != "" &&!empty($ee_prod_mapped_cats)){
160
+ global $wpdb;
161
+ $ee_product_sync_data =$wpdb->prefix ."ee_product_sync_data";
162
  foreach($ee_prod_mapped_cats as $mc_key => $mappedCat){
163
+ //delete old product data of the category
164
+ $query = "DELETE FROM $ee_product_sync_data where w_cat_id = %s";
165
+ $wpdb->query($wpdb->prepare( "$query", $mc_key ));
166
  $args= array(
167
  'post_type' => 'product',
168
  'numberposts' => -1,
169
  'post_status' => 'publish',
170
+ 'tax_query' => array( array(
171
  'taxonomy' => 'product_cat',
172
  'field' => 'term_id',
173
  'terms' =>$mc_key,
174
+ 'operator' => 'IN',
175
+ 'include_children' => false
176
+ )
177
  )
178
  );
179
  $all_products = get_posts($args);
182
  if(!empty($all_products)){
183
  foreach($all_products as $postkey => $postvalue){
184
  $t_data = array(
185
+ 'w_product_id'=>esc_sql($postvalue->ID),
186
+ 'w_cat_id'=>esc_sql($mc_key),
187
+ 'g_cat_id'=>esc_sql($mappedCat['id']),
188
  'g_attribute_mapping'=> json_encode($ee_prod_mapped_attrs),
189
  'update_date'=>date('Y-m-d')
190
  );
216
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
217
 
218
  $product = array(
219
+ 'offer_id'=>esc_attr($postvalue->w_product_id),
220
  'channel'=>'online',
221
  'link'=>get_permalink($postvalue->w_product_id),
222
+ 'google_product_category'=>esc_attr($postvalue->g_cat_id)
223
  );
224
 
225
  $temp_product=array();
242
  }
243
 
244
  $product = array_merge($temp_product,$product);
245
+ // for variable
246
+ if( !empty($prd) && $prd->get_type() == "variable" ){
247
  //$variation_attributes = $prd->get_variation_attributes();
248
  $p_variations = $prd->get_available_variations();
249
+ if(!empty($p_variations)){
250
  foreach ($p_variations as $v_key => $v_value) {
251
  $postmeta_var = (object)$this->TVC_Admin_Helper->tvc_get_post_meta($v_value['variation_id']);
252
  $formArray_val = $formArray['title'];
253
  $product['title'] = (isset($postObj->$formArray_val))?$postObj->$formArray_val:get_the_title($postvalue->w_product_id);
254
  $tvc_temp_desc_key = $formArray['description'];
255
  $product['description'] = (isset($v_value['variation_description']) && $v_value['variation_description'] != "")?$v_value['variation_description']:$postObj->$tvc_temp_desc_key;
256
+ $product['offer_id'] = esc_attr($v_value['variation_id']);
257
+ $product['id'] = esc_attr($v_value['variation_id']);
258
+ $product['item_group_id'] = esc_attr($postvalue->w_product_id);
259
  $productTypes = $this->get_product_category($postvalue->w_product_id);
260
  if(!empty($productTypes)){
261
  $product['productTypes'] = $productTypes;
286
  $product[$key]['value'] = $postmeta_var->_price;
287
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
288
  $product[$key]['value'] = $postmeta_var->_sale_price;
289
+ }else{
290
+ unset($product[$key]);
291
  }
292
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
293
  $product[$key]['currency'] = $tvc_currency;
299
  $product[$key]['value'] = $postmeta_var->$value;
300
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
301
  $product[$key]['value'] = $postmeta_var->_sale_price;
302
+ }else{
303
+ unset($product[$key]);
304
  }
305
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
306
  $product[$key]['currency'] = $tvc_currency;
321
  }
322
  }
323
  $item = [
324
+ 'merchant_id' => esc_attr($merchantId),
325
  'batch_id' => ++$batchId,
326
  'method' => 'insert',
327
  'product' => $product
330
  }
331
  }
332
 
333
+ }else if( !empty($prd) ){ // for somple product
334
  $image_id = $prd->get_image_id();
335
  $product['image_link'] = wp_get_attachment_image_url($image_id, 'full');
336
  $productTypes = $this->get_product_category($postvalue->w_product_id);
380
  }
381
  }
382
  $item = [
383
+ 'merchant_id' => esc_attr($merchantId),
384
  'batch_id' => ++$batchId,
385
  'method' => 'insert',
386
  'product' => $product
396
  //$count = 0;
397
  $pre_last_sync_product_id = $last_sync_product_id;
398
  if( $product_count > 0 ){
399
+ $tvc_currency = esc_attr($this->TVC_Admin_Helper->get_woo_currency());
400
+ $merchantId = esc_attr($this->TVC_Admin_Helper->get_merchantId());
401
+ $customerId = esc_attr($this->TVC_Admin_Helper->get_currentCustomerId());
402
+ $accountId = esc_attr($this->TVC_Admin_Helper->get_main_merchantId());
403
+ $subscriptionId = esc_attr($this->TVC_Admin_Helper->get_subscriptionId());
404
+ $last_sync_product_id =esc_attr(( $last_sync_product_id > 0)?$last_sync_product_id:0);
405
  global $wpdb;
406
  $tablename = $wpdb->prefix .'ee_product_sync_data';
407
+ $sql = "select * from ".esc_sql($tablename)." where id > ".esc_sql($last_sync_product_id)." LIMIT ".$this->batch_size;
408
  $products = $wpdb->get_results($sql, OBJECT);
409
  $entries = [];
410
  if(!empty($products)){
412
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
413
  // call product sync API
414
  $data = [
415
+ 'merchant_id' => esc_attr($accountId),
416
+ 'account_id' => esc_attr($merchantId),
417
+ 'subscription_id' => esc_attr($subscriptionId),
418
  'entries' => $p_map_attribute['items']
419
  ];
420
  $url = $this->apiDomain.'/products/batch';
465
  }
466
  $t_data = array(
467
  'sync_product_ids'=>json_encode($sync_product_ids),
468
+ 'w_total_product'=>esc_attr($product_count),
469
+ 'total_sync_product'=>esc_attr($total_sync_product),
470
  'last_sync'=>$last_sync,
471
  'create_sync'=>date( 'Y-m-d H:i:s', current_time( 'timestamp') ),
472
  'next_sync'=>$next_sync,
485
  if($row_count >0){
486
  if ( function_exists( 'as_next_scheduled_action' ) && false === as_next_scheduled_action( 'ee_auto_product_sync_check' ) ) {
487
  //strtotime( 'midnight tonight' )
488
+ as_schedule_recurring_action( strtotime( "+2 minutes" ), esc_attr($this->time_space), 'ee_auto_product_sync_check',array("last_sync_product_id"=>0),"product_sync");
489
  }
490
  }
491
  }
521
  $refreshToken = $refresh_token;
522
  $data = [
523
  "grant_type" => 'refresh_token',
524
+ "client_id" => esc_attr($clientId),
525
+ 'client_secret' => esc_attr($clientSecret),
526
+ 'refresh_token' => esc_attr($refreshToken),
527
  ];
528
 
529
  $postData = json_encode($data);
admin/class-tvc-admin-db-helper.php CHANGED
@@ -17,7 +17,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
17
  }else{
18
  global $wpdb;
19
  $tablename = $wpdb->prefix .$table;
20
- $sql = "select count(".$field_name.") from ".$tablename;
21
  return $wpdb->get_var($sql);
22
  }
23
  }
@@ -28,7 +28,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
28
  }else{
29
  global $wpdb;
30
  $tablename = $wpdb->prefix .$table;
31
- return $wpdb->insert($tablename, $t_data);
32
  }
33
  }
34
 
@@ -38,7 +38,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
38
  }else{
39
  global $wpdb;
40
  $tablename = $wpdb->prefix .$table;
41
- return $wpdb->update($tablename, $t_data, $where);
42
  }
43
  }
44
 
@@ -52,7 +52,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
52
  foreach ($where as $key => $value) {
53
  $key=($key!="")?$key."=%d":", ".$key."=%d";
54
  }
55
- $sql = $wpdb->prepare("select count(".$field_name.") from ".$tablename. "where ".$key,$where);
56
  return $wpdb->get_var($sql);
57
  }
58
  return ;
@@ -64,7 +64,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
64
  if($table =="" || $where == ""){
65
  return;
66
  }else{
67
- $sql = "select count(*) from ".$tablename." where ".$where;
68
  return $wpdb->get_var($sql);
69
  }
70
  }
@@ -77,11 +77,11 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
77
  }else{
78
  if($concat == true){
79
  $fields = implode(',\'_\',', $fields);
80
- $sql = "select CONCAT(".$fields.") as p_c_id from ".$tablename." where ".$where;
81
  return $wpdb->get_col($sql);
82
  }else{
83
  $fields = implode(',', $fields);
84
- $sql = "select ".$fields." from ".$tablename." where ".$where;
85
  return $wpdb->get_results($sql, ARRAY_A);
86
  }
87
  }
@@ -99,10 +99,10 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
99
  }
100
  if( !empty($fields) ) {
101
  $fields = implode(',', $fields);
102
- $sql = "select ".$fields." from ".$tablename." ".$p_where." ".$where;
103
  return $wpdb->get_results($sql);
104
  }else{
105
- $sql = "select * from ".$tablename." ".$p_where." ".$where;
106
  return $wpdb->get_results($sql);
107
  }
108
  }
@@ -114,10 +114,10 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
114
  }else{
115
  global $wpdb;
116
  $tablename = $wpdb->prefix .$table;
117
- $sql = "select * from ".$tablename." ORDER BY id DESC LIMIT 1";
118
  if($fields){
119
  $fields = implode(',', $fields);
120
- $sql = "select ".$fields." from ".$tablename." ORDER BY id DESC LIMIT 1";
121
  }
122
 
123
  return $wpdb->get_row($sql,ARRAY_A);
@@ -130,7 +130,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
130
  if($table =="" || $fields_by == ""){
131
  return;
132
  }else{
133
- $sql = "select ".$fields_by.", count(*) as count from ".$tablename." GROUP BY ".$fields_by." ORDER BY count DESC ";
134
  return $wpdb->get_results($sql, ARRAY_A);
135
  }
136
  }
@@ -139,7 +139,7 @@ if ( ! class_exists( 'TVC_Admin_DB_Helper' ) ) {
139
  global $wpdb;
140
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) );
141
  if ( $wpdb->get_var( $query ) === $table ) {
142
- $wpdb->query("TRUNCATE TABLE ".$table);
143
  }
144
  }
145
  }
17
  }else{
18
  global $wpdb;
19
  $tablename = $wpdb->prefix .$table;
20
+ $sql = "select count(".esc_sql($field_name).") from ".esc_sql($tablename);
21
  return $wpdb->get_var($sql);
22
  }
23
  }
28
  }else{
29
  global $wpdb;
30
  $tablename = $wpdb->prefix .$table;
31
+ return $wpdb->insert(esc_sql($tablename), $t_data);
32
  }
33
  }
34
 
38
  }else{
39
  global $wpdb;
40
  $tablename = $wpdb->prefix .$table;
41
+ return $wpdb->update(esc_sql($tablename), $t_data, $where);
42
  }
43
  }
44
 
52
  foreach ($where as $key => $value) {
53
  $key=($key!="")?$key."=%d":", ".$key."=%d";
54
  }
55
+ $sql = $wpdb->prepare("select count(".$field_name.") from ".esc_sql($tablename). "where ".$key, $where);
56
  return $wpdb->get_var($sql);
57
  }
58
  return ;
64
  if($table =="" || $where == ""){
65
  return;
66
  }else{
67
+ $sql = "select count(*) from ".esc_sql($tablename)." where ".$where;
68
  return $wpdb->get_var($sql);
69
  }
70
  }
77
  }else{
78
  if($concat == true){
79
  $fields = implode(',\'_\',', $fields);
80
+ $sql = "select CONCAT(".$fields.") as p_c_id from ".esc_sql($tablename)." where ".$where;
81
  return $wpdb->get_col($sql);
82
  }else{
83
  $fields = implode(',', $fields);
84
+ $sql = "select ".esc_sql($fields)." from ".esc_sql($tablename)." where ".$where;
85
  return $wpdb->get_results($sql, ARRAY_A);
86
  }
87
  }
99
  }
100
  if( !empty($fields) ) {
101
  $fields = implode(',', $fields);
102
+ $sql = "select ".$fields." from ".esc_sql($tablename)." ".$p_where." ".$where;
103
  return $wpdb->get_results($sql);
104
  }else{
105
+ $sql = "select * from ".esc_sql($tablename)." ".$p_where." ".$where;
106
  return $wpdb->get_results($sql);
107
  }
108
  }
114
  }else{
115
  global $wpdb;
116
  $tablename = $wpdb->prefix .$table;
117
+ $sql = "select * from ".esc_sql($tablename)." ORDER BY id DESC LIMIT 1";
118
  if($fields){
119
  $fields = implode(',', $fields);
120
+ $sql = "select ".$fields." from ".esc_sql($tablename)." ORDER BY id DESC LIMIT 1";
121
  }
122
 
123
  return $wpdb->get_row($sql,ARRAY_A);
130
  if($table =="" || $fields_by == ""){
131
  return;
132
  }else{
133
+ $sql = "select ".$fields_by.", count(*) as count from ".esc_sql($tablename)." GROUP BY ".$fields_by." ORDER BY count DESC ";
134
  return $wpdb->get_results($sql, ARRAY_A);
135
  }
136
  }
139
  global $wpdb;
140
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table ) );
141
  if ( $wpdb->get_var( $query ) === $table ) {
142
+ $wpdb->query("TRUNCATE TABLE ".esc_sql($table));
143
  }
144
  }
145
  }
admin/class-tvc-admin-helper.php CHANGED
@@ -115,7 +115,7 @@ Class TVC_Admin_Helper{
115
  $googleDetail = $google_detail->data;
116
  }
117
  }else{
118
- return array("error"=>true, "message"=>"Please try after some time.");
119
  }
120
  }
121
  $syncProductStat = [];
@@ -157,7 +157,7 @@ Class TVC_Admin_Helper{
157
  }
158
 
159
  $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $syncProductStat, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
160
- return array("error"=>false, "message"=>"Details updated successfully.");
161
  }
162
  /*
163
  * update remarketing snippets
@@ -501,19 +501,19 @@ Class TVC_Admin_Helper{
501
  }
502
 
503
  public function get_gmcAttributes() {
504
- $path = ENHANCAD_PLUGIN_URL . '/includes/setup/json/gmc_attrbutes.json';
505
  $str = file_get_contents($path);
506
  $attributes = $str ? json_decode($str, true) : [];
507
  return $attributes;
508
  }
509
  public function get_gmc_countries_list() {
510
- $path = ENHANCAD_PLUGIN_URL . '/includes/setup/json/countries.json';
511
  $str = file_get_contents($path);
512
  $attributes = $str ? json_decode($str, true) : [];
513
  return $attributes;
514
  }
515
  public function get_gmc_language_list() {
516
- $path = ENHANCAD_PLUGIN_URL . '/includes/setup/json/iso_lang.json';
517
  $str = file_get_contents($path);
518
  $attributes = $str ? json_decode($str, true) : [];
519
  return $attributes;
@@ -523,10 +523,10 @@ Class TVC_Admin_Helper{
523
  if($name){
524
  $countries_list = $this->get_gmc_language_list();
525
  ?>
526
- <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
527
- <option value=""><?php echo $label; ?></option>
528
  <?php foreach ($countries_list as $Key => $val) {?>
529
- <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"]." (".$val["native_name"].")";?></option>
530
  <?php
531
  }?>
532
  </select>
@@ -538,10 +538,10 @@ Class TVC_Admin_Helper{
538
  $countries_list = $this->get_gmc_countries_list();
539
  $sel_val = $this->get_woo_country();
540
  ?>
541
- <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
542
- <option value=""><?php echo $label; ?></option>
543
  <?php foreach ($countries_list as $Key => $val) {?>
544
- <option value="<?php echo $val["code"];?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo $val["name"];?></option>
545
  <?php
546
  }?>
547
  </select>
@@ -551,10 +551,10 @@ Class TVC_Admin_Helper{
551
  public function tvc_select($name, $class_id="", string $label="Please Select", string $sel_val = null, bool $require = false, $option_list = array()){
552
  if(!empty($option_list) && $name){
553
  ?>
554
- <select class="form-control select2 <?php echo $class_id; ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo $name; ?>" id="<?php echo $class_id; ?>" >
555
- <option value=""><?php echo $label; ?></option>
556
  <?php foreach ($option_list as $Key => $val) {?>
557
- <option value="<?php echo $val["field"];?>" <?php echo($val["field"] == $sel_val)?"selected":""; ?>><?php echo $val["field"];?></option>
558
  <?php
559
  }?>
560
  </select>
@@ -563,7 +563,7 @@ Class TVC_Admin_Helper{
563
  }
564
  public function tvc_text($name, string $type="text", string $class_id="", string $label=null, $sel_val = null, bool $require = false){
565
  ?>
566
- <input type="<?php echo $type; ?>" name="<?php echo $name; ?>" class="tvc-text <?php echo $class_id; ?>" id="<?php echo $class_id; ?>" placeholder="<?php echo $label; ?>" value="<?php echo $sel_val; ?>">
567
  <?php
568
  }
569
 
@@ -578,16 +578,16 @@ Class TVC_Admin_Helper{
578
  $googleDetail = $google_detail['setting'];
579
  //for google analytic
580
  if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "BOTH" ){
581
- if($googleDetail->property_id != "" && $googleDetail->measurement_id != ""){
582
- $setting_status['google_analytic']= true;
583
- $setting_status['google_analytic_msg']= "";
584
- }else if($googleDetail->property_id == "" ){
585
- $setting_status['google_analytic']= false;
586
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
587
- }else if($googleDetail->measurement_id == "" ){
588
- $setting_status['google_analytic']= false;
589
- $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
590
- }
591
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
592
  if( $googleDetail->measurement_id != ""){
593
  $setting_status['google_analytic']= true;
@@ -656,20 +656,17 @@ Class TVC_Admin_Helper{
656
  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")){
657
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != "" && $googleDetail->is_site_verified == 1 && $googleDetail->is_domain_claim == 1 ){
658
  $setting_status['google_shopping_conf']= true;
659
- $setting_status['google_shopping_conf_msg']= "Google Shopping Configuration Success.";
660
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
661
  $setting_status['google_shopping_conf']= false;
662
  $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
663
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
664
  $setting_status['google_shopping_conf']= false;
665
- $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
666
  }else if($googleDetail->is_site_verified ==0 ){
667
  $setting_status['google_shopping_conf']= false;
668
- $setting_status['google_shopping_conf_msg']= "Site verification and domain claim for your merchant center account failed.";
669
- }/*else if($googleDetail->is_domain_claim ==0 ){
670
- $setting_status['google_shopping_conf']= false;
671
- $setting_status['google_shopping_conf_msg']= "Domain claim is pending. Your store url may be linked to other merchant center account.";
672
- } */
673
  }else{
674
  $setting_status['google_shopping_conf']= false;
675
  $missing="";
@@ -687,13 +684,13 @@ Class TVC_Admin_Helper{
687
 
688
  if($sync_product_total > 1 && $sync_product_approved > 1 && $sync_product_disapproved < 1){
689
  $setting_status['google_shopping_p_sync']= true;
690
- $setting_status['google_shopping_p_sync_msg']= "Google Shopping product sync is a success.";
691
  }else if($sync_product_total < 1){
692
  $setting_status['google_shopping_p_sync']= false;
693
- $setting_status['google_shopping_p_sync_msg']= "Sync your product data into Merchant center and get eligible for free listing across Google.";
694
  }else if($sync_product_disapproved > 0){
695
  $setting_status['google_shopping_p_sync']= false;
696
- $setting_status['google_shopping_p_sync_msg']= "There seems to be some problem with your product data. Rectify the issues by selecting right attributes.";
697
  }
698
  }
699
  }else{
@@ -708,13 +705,13 @@ Class TVC_Admin_Helper{
708
  $totalCampaigns = count($campaigns_list);
709
  if($totalCampaigns < 1){
710
  $setting_status['google_shopping_p_campaigns']= false;
711
- $setting_status['google_shopping_p_campaigns_msg']= "Reach out to customers based on their past site behavior by running start shopping campaign.";
712
  }else{
713
  $setting_status['google_shopping_p_campaigns']= true;
714
  }
715
  }else{
716
  $setting_status['google_shopping_p_campaigns']= false;
717
- $setting_status['google_shopping_p_campaigns_msg']= "Reach out to customers based on their past site behavior by running start shopping campaign.";
718
  }
719
  }else{
720
  $setting_status['google_shopping_p_campaigns']= false;
@@ -748,7 +745,7 @@ Class TVC_Admin_Helper{
748
  }
749
  public function get_tvc_product_cat_list_with_name(){
750
  $args = array(
751
- 'hide_empty' => 1,
752
  'taxonomy' => 'product_cat',
753
  'orderby' => 'term_id'
754
  );
@@ -770,16 +767,16 @@ Class TVC_Admin_Helper{
770
  $notice_text ="";
771
  $call_js_function_args="";
772
  if (isset($googleDetail->is_site_verified) && isset($googleDetail->is_domain_claim) && $googleDetail->is_site_verified == '0' && $googleDetail->is_domain_claim == '0') {
773
- $title = "Site verification and Domain claim for merchant center account failed.";
774
- $message = "Without a verified and claimed website, your product will get disapproved.";
775
  $call_js_function_args = "both";
776
  }else if(isset($googleDetail->is_site_verified) && $googleDetail->is_site_verified == '0'){
777
- $title = "Site verification for merchant center account failed.";
778
- $message = "Without a verified and claimed website, your product will get disapproved.";
779
  $call_js_function_args = "site_verified";
780
  }else if(isset($googleDetail->is_domain_claim) && $googleDetail->is_domain_claim == '0'){
781
- $title = "Site verification for merchant center account failed.";
782
- $message = "Without a verified and claimed website, your product will get disapproved.";
783
  $call_js_function_args = "domain_claim";
784
  }
785
  if($message!= "" && $title != ""){
@@ -787,11 +784,11 @@ Class TVC_Admin_Helper{
787
  <div class="errormsgtopbx claimalert">
788
  <div class="errmscntbx">
789
  <div class="errmsglft">
790
- <span class="errmsgicon"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/error-white-icon.png'; ?>" alt="error" /></span>
791
  </div>
792
  <div class="erralertrigt">
793
  <h6><?php echo $title; ?></h6>
794
- <p><?php echo $message; ?> <a href="javascript:void(0)" id="call_both_verification" onclick="call_tvc_site_verified_and_domain_claim('<?php echo $call_js_function_args; ?>');">Click here</a> to verify and claim the domain.</p>
795
  </div>
796
  </div>
797
  </div>
@@ -858,7 +855,7 @@ Class TVC_Admin_Helper{
858
  if(isset($google_detail['setting']) && $google_detail['setting']){
859
  $googleDetail = $google_detail['setting'];
860
  if($googleDetail->is_site_verified == '0'){
861
- return array('error'=>true, 'msg'=>"First need to verified your site. Click on site verification refresh icon to verified your site.");
862
  }else if(property_exists($googleDetail,"is_domain_claim") && $googleDetail->is_domain_claim == '0'){
863
  //'website_url' => $googleDetail->site_url,
864
  $postData = [
@@ -872,10 +869,10 @@ Class TVC_Admin_Helper{
872
  return array('error'=>true, 'msg'=>$claimWebsite->errors[0]);
873
  }else{
874
  $this->update_subscription_details_api_to_db();
875
- return array('error'=>false, 'msg'=>"Domain claimed successfully.");
876
  }
877
  }else{
878
- return array('error'=>false, 'msg'=>"Already domain claimed successfully.");
879
  }
880
  }
881
  }
@@ -927,7 +924,7 @@ Class TVC_Admin_Helper{
927
  return array('error'=>true, 'msg'=>$siteVerification_tag->errors[0]);
928
  }else{
929
  $this->update_subscription_details_api_to_db();
930
- return array('error'=>false, 'msg'=>"Site verification successfully.");
931
  }
932
  }else{
933
  return array('error'=>true, 'msg'=>$siteVerificationToken_tag->errors[0]);
@@ -935,11 +932,11 @@ Class TVC_Admin_Helper{
935
  // one more try
936
  }else{
937
  $this->update_subscription_details_api_to_db();
938
- return array('error'=>false, 'msg'=>"Site verification successfully.");
939
  }
940
  }
941
  }else{
942
- return array('error'=>false, 'msg'=>"Already site verification successfully.");
943
  }
944
  }
945
  }
@@ -1029,14 +1026,14 @@ Class TVC_Admin_Helper{
1029
  * add fixed notification
1030
  */
1031
  $nofifications["tvc_f_notif_1"] = array(
1032
- "tittle"=>"Congratulations..!! You are one step closer.",
1033
- "html"=>"Thanks for installing the new avatar of Enhanced Ecommerce for WooCommerce plugin. Explore the full potential of Google Analytics, Google Ads and Google shopping by setting up all your Google accounts and take data driven decisions to scale your eCommerce business faster."
1034
  );
1035
  $nofifications["tvc_f_notif_2"] = array(
1036
- "tittle"=>"Share your feedback.",
1037
- "html"=>"Your feedback is very important to us. Please write about your experience and the new feature requests here.",
1038
  "link"=>"https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/",
1039
- "link_title"=>"Share Feedback",
1040
  "link_type"=>"external"
1041
  );
1042
  /*
@@ -1069,7 +1066,7 @@ Class TVC_Admin_Helper{
1069
  if($diffrent_day == 6 ){
1070
  $nofifications["tvc_expired_plan_not_".date("YYYY_m_d",$current)] = array(
1071
  "tittle"=>"Plan Expired..!!",
1072
- "html"=>"Your plan is expired now. Contact “analytics2@tatvic.com” or call us at “(415) 968-6313” to renew your plan."
1073
  );
1074
  }
1075
  }
@@ -1184,6 +1181,5 @@ Class TVC_Admin_Helper{
1184
  }else{
1185
  return $code;
1186
  }
1187
- }
1188
-
1189
  }
115
  $googleDetail = $google_detail->data;
116
  }
117
  }else{
118
+ return array("error"=>true, "message"=>__("Please try after some time.","conversios"));
119
  }
120
  }
121
  $syncProductStat = [];
157
  }
158
 
159
  $this->set_ee_options_data(array("setting" => $googleDetail, "prod_sync_status" => (object) $syncProductStat, "campaigns_list"=>$campaigns_list, "sync_time"=>current_time( 'timestamp' )));
160
+ return array("error"=>false, "message"=>__("Details updated successfully.","conversios"));
161
  }
162
  /*
163
  * update remarketing snippets
501
  }
502
 
503
  public function get_gmcAttributes() {
504
+ $path = ENHANCAD_PLUGIN_DIR . 'includes/setup/json/gmc_attrbutes.json';
505
  $str = file_get_contents($path);
506
  $attributes = $str ? json_decode($str, true) : [];
507
  return $attributes;
508
  }
509
  public function get_gmc_countries_list() {
510
+ $path = ENHANCAD_PLUGIN_DIR . 'includes/setup/json/countries.json';
511
  $str = file_get_contents($path);
512
  $attributes = $str ? json_decode($str, true) : [];
513
  return $attributes;
514
  }
515
  public function get_gmc_language_list() {
516
+ $path = ENHANCAD_PLUGIN_DIR . 'includes/setup/json/iso_lang.json';
517
  $str = file_get_contents($path);
518
  $attributes = $str ? json_decode($str, true) : [];
519
  return $attributes;
523
  if($name){
524
  $countries_list = $this->get_gmc_language_list();
525
  ?>
526
+ <select class="form-control select2 <?php echo esc_attr($class_id); ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($class_id); ?>" >
527
+ <option value=""><?php echo esc_attr($label); ?></option>
528
  <?php foreach ($countries_list as $Key => $val) {?>
529
+ <option value="<?php echo esc_attr($val["code"]);?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo esc_attr($val["name"])." (".esc_attr($val["native_name"]).")";?></option>
530
  <?php
531
  }?>
532
  </select>
538
  $countries_list = $this->get_gmc_countries_list();
539
  $sel_val = $this->get_woo_country();
540
  ?>
541
+ <select class="form-control select2 <?php echo esc_attr($class_id); ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($class_id); ?>" >
542
+ <option value=""><?php echo esc_attr($label); ?></option>
543
  <?php foreach ($countries_list as $Key => $val) {?>
544
+ <option value="<?php echo esc_attr($val["code"]);?>" <?php echo($val["code"] == $sel_val)?"selected":""; ?>><?php echo esc_attr($val["name"]);?></option>
545
  <?php
546
  }?>
547
  </select>
551
  public function tvc_select($name, $class_id="", string $label="Please Select", string $sel_val = null, bool $require = false, $option_list = array()){
552
  if(!empty($option_list) && $name){
553
  ?>
554
+ <select class="form-control select2 <?php echo esc_attr($class_id); ?> <?php echo ($require == true)?"field-required":""; ?>" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($class_id); ?>" >
555
+ <option value=""><?php echo esc_attr($label); ?></option>
556
  <?php foreach ($option_list as $Key => $val) {?>
557
+ <option value="<?php echo esc_attr($val["field"]);?>" <?php echo($val["field"] == $sel_val)?"selected":""; ?>><?php echo esc_attr($val["field"]);?></option>
558
  <?php
559
  }?>
560
  </select>
563
  }
564
  public function tvc_text($name, string $type="text", string $class_id="", string $label=null, $sel_val = null, bool $require = false){
565
  ?>
566
+ <input type="<?php echo esc_attr($type); ?>" name="<?php echo esc_attr($name); ?>" class="tvc-text <?php echo esc_attr($class_id); ?>" id="<?php echo esc_attr($class_id); ?>" placeholder="<?php echo esc_attr($label); ?>" value="<?php echo esc_attr($sel_val); ?>">
567
  <?php
568
  }
569
 
578
  $googleDetail = $google_detail['setting'];
579
  //for google analytic
580
  if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && isset($googleDetail->property_id) && $googleDetail->tracking_option == "BOTH" ){
581
+ if($googleDetail->property_id != "" && $googleDetail->measurement_id != ""){
582
+ $setting_status['google_analytic']= true;
583
+ $setting_status['google_analytic_msg']= "";
584
+ }else if($googleDetail->property_id == "" ){
585
+ $setting_status['google_analytic']= false;
586
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
587
+ }else if($googleDetail->measurement_id == "" ){
588
+ $setting_status['google_analytic']= false;
589
+ $setting_status['google_analytic_msg']= "There is a configuration issue in your Google Analytics account set up <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
590
+ }
591
  }else if(isset($googleDetail->tracking_option) && isset($googleDetail->measurement_id) && $googleDetail->tracking_option == "GA4"){
592
  if( $googleDetail->measurement_id != ""){
593
  $setting_status['google_analytic']= true;
656
  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")){
657
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != "" && $googleDetail->is_site_verified == 1 && $googleDetail->is_domain_claim == 1 ){
658
  $setting_status['google_shopping_conf']= true;
659
+ $setting_status['google_shopping_conf_msg']= __("Google Shopping Configuration Success.","conversios");
660
  }else if($googleDetail->google_merchant_center_id == "" || $googleDetail->google_ads_id == "" ){
661
  $setting_status['google_shopping_conf']= false;
662
  $setting_status['google_shopping_conf_msg']= "Connect your merchant center account and make your products available to shoppers across Google <a href='".esc_url($this->get_onboarding_page_url())."'>click here</a>.";
663
  }else if($googleDetail->is_site_verified ==0 && $googleDetail->is_domain_claim ==0 ){
664
  $setting_status['google_shopping_conf']= false;
665
+ $setting_status['google_shopping_conf_msg']= __("Site verification and domain claim for your merchant center account failed.","conversios");
666
  }else if($googleDetail->is_site_verified ==0 ){
667
  $setting_status['google_shopping_conf']= false;
668
+ $setting_status['google_shopping_conf_msg']= __("Site verification and domain claim for your merchant center account failed.","conversios");
669
+ }
 
 
 
670
  }else{
671
  $setting_status['google_shopping_conf']= false;
672
  $missing="";
684
 
685
  if($sync_product_total > 1 && $sync_product_approved > 1 && $sync_product_disapproved < 1){
686
  $setting_status['google_shopping_p_sync']= true;
687
+ $setting_status['google_shopping_p_sync_msg']= __("Google Shopping product sync is a success.","conversios");
688
  }else if($sync_product_total < 1){
689
  $setting_status['google_shopping_p_sync']= false;
690
+ $setting_status['google_shopping_p_sync_msg']= __("Sync your product data into Merchant center and get eligible for free listing across Google.","conversios");
691
  }else if($sync_product_disapproved > 0){
692
  $setting_status['google_shopping_p_sync']= false;
693
+ $setting_status['google_shopping_p_sync_msg']= __("There seems to be some problem with your product data. Rectify the issues by selecting right attributes.","conversios");
694
  }
695
  }
696
  }else{
705
  $totalCampaigns = count($campaigns_list);
706
  if($totalCampaigns < 1){
707
  $setting_status['google_shopping_p_campaigns']= false;
708
+ $setting_status['google_shopping_p_campaigns_msg']= __("Reach out to customers based on their past site behavior by running start shopping campaign.","conversios");
709
  }else{
710
  $setting_status['google_shopping_p_campaigns']= true;
711
  }
712
  }else{
713
  $setting_status['google_shopping_p_campaigns']= false;
714
+ $setting_status['google_shopping_p_campaigns_msg']= __("Reach out to customers based on their past site behavior by running start shopping campaign.","conversios");
715
  }
716
  }else{
717
  $setting_status['google_shopping_p_campaigns']= false;
745
  }
746
  public function get_tvc_product_cat_list_with_name(){
747
  $args = array(
748
+ 'hide_empty' => 1,
749
  'taxonomy' => 'product_cat',
750
  'orderby' => 'term_id'
751
  );
767
  $notice_text ="";
768
  $call_js_function_args="";
769
  if (isset($googleDetail->is_site_verified) && isset($googleDetail->is_domain_claim) && $googleDetail->is_site_verified == '0' && $googleDetail->is_domain_claim == '0') {
770
+ $title = __("Site verification and Domain claim for merchant center account failed.","conversios");
771
+ $message = __("Without a verified and claimed website, your product will get disapproved.","conversios");
772
  $call_js_function_args = "both";
773
  }else if(isset($googleDetail->is_site_verified) && $googleDetail->is_site_verified == '0'){
774
+ $title = __("Site verification for merchant center account failed.","conversios");
775
+ $message = __("Without a verified and claimed website, your product will get disapproved.","conversios");
776
  $call_js_function_args = "site_verified";
777
  }else if(isset($googleDetail->is_domain_claim) && $googleDetail->is_domain_claim == '0'){
778
+ $title = __("Site verification for merchant center account failed.","conversios");
779
+ $message = __("Without a verified and claimed website, your product will get disapproved.","conversios");
780
  $call_js_function_args = "domain_claim";
781
  }
782
  if($message!= "" && $title != ""){
784
  <div class="errormsgtopbx claimalert">
785
  <div class="errmscntbx">
786
  <div class="errmsglft">
787
+ <span class="errmsgicon"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/error-white-icon.png'); ?>" alt="error" /></span>
788
  </div>
789
  <div class="erralertrigt">
790
  <h6><?php echo $title; ?></h6>
791
+ <p><?php echo $message; ?> <a href="javascript:void(0)" id="call_both_verification" onclick="call_tvc_site_verified_and_domain_claim('<?php echo $call_js_function_args; ?>');">Click here</a> <?php _e("to verify and claim the domain.","conversios"); ?></p>
792
  </div>
793
  </div>
794
  </div>
855
  if(isset($google_detail['setting']) && $google_detail['setting']){
856
  $googleDetail = $google_detail['setting'];
857
  if($googleDetail->is_site_verified == '0'){
858
+ return array('error'=>true, 'msg'=>__("First need to verified your site. Click on site verification refresh icon to verified your site.","conversios"));
859
  }else if(property_exists($googleDetail,"is_domain_claim") && $googleDetail->is_domain_claim == '0'){
860
  //'website_url' => $googleDetail->site_url,
861
  $postData = [
869
  return array('error'=>true, 'msg'=>$claimWebsite->errors[0]);
870
  }else{
871
  $this->update_subscription_details_api_to_db();
872
+ return array('error'=>false, 'msg'=>__("Domain claimed successfully.", "conversios"));
873
  }
874
  }else{
875
+ return array('error'=>false, 'msg'=>__("Already domain claimed successfully.", "conversios"));
876
  }
877
  }
878
  }
924
  return array('error'=>true, 'msg'=>$siteVerification_tag->errors[0]);
925
  }else{
926
  $this->update_subscription_details_api_to_db();
927
+ return array('error'=>false, 'msg'=>__("Site verification successfully.","conversios"));
928
  }
929
  }else{
930
  return array('error'=>true, 'msg'=>$siteVerificationToken_tag->errors[0]);
932
  // one more try
933
  }else{
934
  $this->update_subscription_details_api_to_db();
935
+ return array('error'=>false, 'msg'=>__("Site verification successfully.","conversios"));
936
  }
937
  }
938
  }else{
939
+ return array('error'=>false, 'msg'=>__("Already site verification successfully.","conversios"));
940
  }
941
  }
942
  }
1026
  * add fixed notification
1027
  */
1028
  $nofifications["tvc_f_notif_1"] = array(
1029
+ "tittle"=>__("Congratulations..!! You are one step closer.","conversios"),
1030
+ "html"=>__("Thanks for installing the new avatar of Enhanced Ecommerce for WooCommerce plugin. Explore the full potential of Google Analytics, Google Ads and Google shopping by setting up all your Google accounts and take data driven decisions to scale your eCommerce business faster.", "conversios")
1031
  );
1032
  $nofifications["tvc_f_notif_2"] = array(
1033
+ "tittle"=>__("Share your feedback.","conversios"),
1034
+ "html"=>__("Your feedback is very important to us. Please write about your experience and the new feature requests here.","conversios"),
1035
  "link"=>"https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/",
1036
+ "link_title"=>__("Share Feedback", "conversios"),
1037
  "link_type"=>"external"
1038
  );
1039
  /*
1066
  if($diffrent_day == 6 ){
1067
  $nofifications["tvc_expired_plan_not_".date("YYYY_m_d",$current)] = array(
1068
  "tittle"=>"Plan Expired..!!",
1069
+ "html"=>__("Your plan is expired now. Contact “analytics2@tatvic.com” or call us at “(415) 968-6313” to renew your plan.", "conversios")
1070
  );
1071
  }
1072
  }
1181
  }else{
1182
  return $code;
1183
  }
1184
+ }
 
1185
  }
admin/css/enhanced-ecommerce-google-analytics-admin.css CHANGED
@@ -2,7 +2,6 @@
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
5
- @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap');
6
  *{
7
  box-sizing: border-box;
8
  margin:0px;
@@ -526,8 +525,6 @@ button.tvc_animate_btn:hover::after, button.tvc_animate_btn:focus::after {
526
  text-decoration: none;
527
  cursor: pointer;
528
  }
529
- #tvc_popup_box .fa-exclamation-circle, #tvc_popup_box .tvc-error{color: #FF0000;}
530
- #tvc_popup_box .fa-check-circle.tvc-success, #tvc_popup_box .tvc-success{color: #218938;}
531
 
532
  /* Popup box BEGIN */
533
  .tvc-notice-error{position: relative;}
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
 
5
  *{
6
  box-sizing: border-box;
7
  margin:0px;
525
  text-decoration: none;
526
  cursor: pointer;
527
  }
 
 
528
 
529
  /* Popup box BEGIN */
530
  .tvc-notice-error{position: relative;}
admin/css/style.css CHANGED
@@ -346,9 +346,10 @@ button:disabled,button[disabled], button:disabled:hover,button[disabled]:hover{b
346
  transform: translateY(-50%);
347
  }
348
  /*end onboarding page*/
 
 
 
349
  /*rc */
350
- @charset "utf-8";
351
- @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,500&display=swap');
352
 
353
  /* comman style----------------------*/
354
  body{margin:0;padding:0;font-family:'Roboto', sans-serif;font-size:14px;color:#515151;scroll-behavior:smooth;overflow-x:hidden;font-weight:normal;}
346
  transform: translateY(-50%);
347
  }
348
  /*end onboarding page*/
349
+ .fa-check-circle:before{content:"";background-image:url(../images/icon/tick-round.svg);width:24px;height:24px;background-repeat:no-repeat;background-size:100%; display: block; margin: 0 auto;}
350
+ .fa-exclamation-circle:before{content:"";background-image:url(../images/exclaimation.png);width:24px;height:24px;background-repeat:no-repeat;background-size:100%;display: block; margin: 0 auto;}
351
+ .fa-question-circle:before{content:"";background-image:url(../images/help-icon.png);width:16px;height:16px;background-repeat:no-repeat;background-size:100%;position:absolute;}
352
  /*rc */
 
 
353
 
354
  /* comman style----------------------*/
355
  body{margin:0;padding:0;font-family:'Roboto', sans-serif;font-size:14px;color:#515151;scroll-behavior:smooth;overflow-x:hidden;font-weight:normal;}
admin/helper/class-dashboard-helper.php CHANGED
@@ -61,6 +61,8 @@ if(!class_exists('Conversios_Dashboard_Helper')){
61
  }
62
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
63
 
 
 
64
  $api_rs = $this->ShoppingApi->campaign_performance(2, 7, $start_date, $end_date);
65
  if (isset($api_rs->error) && $api_rs->error == '') {
66
  if(isset($api_rs->data) && $api_rs->data != ""){
@@ -73,7 +75,7 @@ if(!class_exists('Conversios_Dashboard_Helper')){
73
  //print_r($account_performance_res);
74
 
75
  }else{
76
- $return = array('error'=>true,'errors'=>'Admin security nonce is not verified.');
77
  }
78
  echo json_encode($return);
79
  wp_die();
@@ -97,7 +99,8 @@ if(!class_exists('Conversios_Dashboard_Helper')){
97
  $end_date = $date->format('Y-m-d');
98
  }
99
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
100
-
 
101
  $api_rs = $this->ShoppingApi->accountPerformance_for_dashboard(2, 7, $start_date, $end_date);
102
  if (isset($api_rs->error) && $api_rs->error == '') {
103
  if(isset($api_rs->data) && $api_rs->data != ""){
@@ -109,7 +112,7 @@ if(!class_exists('Conversios_Dashboard_Helper')){
109
  //print_r($account_performance_res);
110
 
111
  }else{
112
- $return = array('error'=>true,'errors'=>'Admin security nonce is not verified.');
113
  }
114
  echo json_encode($return);
115
  wp_die();
@@ -118,9 +121,9 @@ if(!class_exists('Conversios_Dashboard_Helper')){
118
  $nonce = (isset($_POST['conversios_nonce']))?$_POST['conversios_nonce']:"";
119
  if($this->admin_safe_ajax_call($nonce, 'conversios_nonce')){
120
  $post_data = (object)$_POST;
121
- $ga_traking_type = isset($post_data->ga_traking_type)?$post_data->ga_traking_type:"";
122
- $subscription_id = isset($post_data->subscription_id)?$post_data->subscription_id:"";
123
- $view_id = isset($post_data->view_id)?$post_data->view_id:"";
124
 
125
  $start_date = str_replace(' ', '',(isset($_POST['start_date']))?$_POST['start_date']:"");
126
  if($start_date != ""){
@@ -135,7 +138,8 @@ if(!class_exists('Conversios_Dashboard_Helper')){
135
  $end_date = $date->format('Y-m-d');
136
  }
137
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
138
-
 
139
  $return = array();
140
  if($subscription_id != "" && $view_id !="" &&( $ga_traking_type == "UA" || $ga_traking_type == "BOTH" )){
141
  $data = array(
@@ -154,10 +158,10 @@ if(!class_exists('Conversios_Dashboard_Helper')){
154
  $return = array('error'=>true,'errors'=>$api_rs->message);
155
  }
156
  }else if($subscription_id != "" && ( $ga_traking_type == "GA4" || $ga_traking_type == "BOTH" )){
157
- $return = array('error'=>true,'errors'=>'GA4 Coming soon...');
158
  }
159
  }else{
160
- $return = array('error'=>true,'errors'=>'Admin security nonce is not verified.');
161
  }
162
  echo json_encode($return);
163
  wp_die();
61
  }
62
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
63
 
64
+ $start_date = sanitize_text_field($start_date);
65
+ $end_date = sanitize_text_field($end_date);
66
  $api_rs = $this->ShoppingApi->campaign_performance(2, 7, $start_date, $end_date);
67
  if (isset($api_rs->error) && $api_rs->error == '') {
68
  if(isset($api_rs->data) && $api_rs->data != ""){
75
  //print_r($account_performance_res);
76
 
77
  }else{
78
+ $return = array('error'=>true,'errors'=>__("Admin security nonce is not verified.","conversios"));
79
  }
80
  echo json_encode($return);
81
  wp_die();
99
  $end_date = $date->format('Y-m-d');
100
  }
101
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
102
+ $start_date = sanitize_text_field($start_date);
103
+ $end_date = sanitize_text_field($end_date);
104
  $api_rs = $this->ShoppingApi->accountPerformance_for_dashboard(2, 7, $start_date, $end_date);
105
  if (isset($api_rs->error) && $api_rs->error == '') {
106
  if(isset($api_rs->data) && $api_rs->data != ""){
112
  //print_r($account_performance_res);
113
 
114
  }else{
115
+ $return = array('error'=>true,'errors'=>__("Admin security nonce is not verified.","conversios"));
116
  }
117
  echo json_encode($return);
118
  wp_die();
121
  $nonce = (isset($_POST['conversios_nonce']))?$_POST['conversios_nonce']:"";
122
  if($this->admin_safe_ajax_call($nonce, 'conversios_nonce')){
123
  $post_data = (object)$_POST;
124
+ $ga_traking_type = sanitize_text_field(isset($post_data->ga_traking_type)?$post_data->ga_traking_type:"");
125
+ $subscription_id = sanitize_text_field(isset($post_data->subscription_id)?$post_data->subscription_id:"");
126
+ $view_id = sanitize_text_field(isset($post_data->view_id)?$post_data->view_id:"");
127
 
128
  $start_date = str_replace(' ', '',(isset($_POST['start_date']))?$_POST['start_date']:"");
129
  if($start_date != ""){
138
  $end_date = $date->format('Y-m-d');
139
  }
140
  $end_date == (false !==strtotime( $end_date ))?date('Y-m-d', strtotime($end_date)):date( 'Y-m-d', strtotime( 'now' ));
141
+ $start_date = sanitize_text_field($start_date);
142
+ $end_date = sanitize_text_field($end_date);
143
  $return = array();
144
  if($subscription_id != "" && $view_id !="" &&( $ga_traking_type == "UA" || $ga_traking_type == "BOTH" )){
145
  $data = array(
158
  $return = array('error'=>true,'errors'=>$api_rs->message);
159
  }
160
  }else if($subscription_id != "" && ( $ga_traking_type == "GA4" || $ga_traking_type == "BOTH" )){
161
+ $return = array('error'=>true,'errors'=>__("GA4 Coming soon...","conversios"));
162
  }
163
  }else{
164
+ $return = array('error'=>true,'errors'=>__("Admin security nonce is not verified.","conversios"));
165
  }
166
  echo json_encode($return);
167
  wp_die();
admin/helper/class-onboarding-helper.php CHANGED
@@ -63,7 +63,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
63
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
64
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
65
  $tvc_data = (object)$_POST['tvc_data'];
66
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
67
  echo json_encode($api_obj->getAnalyticsWebProperties($_POST));
68
  wp_die();
69
  }else{
@@ -79,7 +79,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
79
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
80
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
81
  $tvc_data = (object)$_POST['tvc_data'];
82
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
83
  /*sendingblue*/
84
  $data = array();
85
  $data["email"] = $tvc_data->g_mail;
@@ -104,7 +104,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
104
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
105
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
106
  $tvc_data = (object)$_POST['tvc_data'];
107
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
108
  echo json_encode($api_obj->getGoogleAdsAccountList($_POST));
109
  wp_die();
110
  }else{
@@ -119,7 +119,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
119
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
120
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
121
  $tvc_data = (object)$_POST['tvc_data'];
122
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
123
  echo json_encode($api_obj->createGoogleAdsAccount($_POST));
124
  wp_die();
125
  }else{
@@ -135,7 +135,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
135
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
136
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
137
  $tvc_data = (object)$_POST['tvc_data'];
138
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
139
  /*sendingblue*/
140
  $data = array();
141
  $data["email"] = $tvc_data->g_mail;
@@ -160,7 +160,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
160
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
161
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
162
  $tvc_data = (object)$_POST['tvc_data'];
163
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
164
  echo json_encode($api_obj->linkAnalyticToAdsAccount($_POST));
165
  wp_die();
166
  }else{
@@ -176,7 +176,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
176
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
177
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
178
  $tvc_data = (object)$_POST['tvc_data'];
179
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
180
  echo json_encode($api_obj->listMerchantCenterAccount($_POST));
181
  wp_die();
182
  }else{
@@ -191,7 +191,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
191
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
192
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
193
  $tvc_data = (object)$_POST['tvc_data'];
194
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
195
  echo json_encode($api_obj->createMerchantAccount($_POST));
196
  wp_die();
197
  }else{
@@ -207,7 +207,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
207
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
208
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
209
  $tvc_data = (object)$_POST['tvc_data'];
210
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
211
  /*sendingblue*/
212
  $data = array();
213
  $data["email"] = $tvc_data->g_mail;
@@ -231,7 +231,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
231
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
232
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
233
  $tvc_data = (object)$_POST['tvc_data'];
234
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
235
  unset($_POST['tvc_data']);
236
  unset($_POST['conversios_onboarding_nonce']);
237
  echo json_encode($api_obj->getConversionList($_POST));
@@ -249,7 +249,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
249
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
250
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
251
  $tvc_data = (object)$_POST['tvc_data'];
252
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
253
  echo json_encode($api_obj->linkGoogleAdsToMerchantCenter($_POST));
254
  wp_die();
255
  }else{
@@ -264,7 +264,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
264
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
265
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
266
  $tvc_data = (object)$_POST['tvc_data'];
267
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
268
  echo json_encode($api_obj->getSubscriptionDetails($_POST['tvc_data'], $_POST['subscription_id']));
269
  wp_die();
270
  }else{
@@ -280,7 +280,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
280
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
281
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
282
  $tvc_data = (object)$_POST['tvc_data'];
283
- $api_obj = new Conversios_Onboarding_ApiCall($tvc_data->access_token,$tvc_data->refresh_token);
284
  $return_url = $this->save_wp_setting_from_subscription_api($api_obj, $tvc_data, $_POST['subscription_id']);
285
  $return_rs = $api_obj->updateSetupTimeToSubscription($_POST);
286
  $return_rs->return_url = $return_url;
@@ -325,15 +325,15 @@ if(!class_exists('Conversios_Onboarding_Helper')):
325
  $this->site_verification_and_domain_claim($googleDetail);
326
  }
327
 
328
- $_POST['subscription_id'] = $googleDetail->id;
329
  $_POST['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && $googleDetail->enhanced_e_commerce_tracking == "1") ? "on" : "";
330
 
331
  $_POST['ga_ST'] = (isset($googleDetail->add_gtag_snippet) && $googleDetail->add_gtag_snippet == "1") ? "on" : "";
332
- $_POST['gm_id'] = $googleDetail->measurement_id;
333
- $_POST['ga_id'] = $googleDetail->property_id;
334
- $_POST['google_ads_id'] = $googleDetail->google_ads_id;
335
- $_POST['google_merchant_id'] = $googleDetail->google_merchant_center_id;
336
- $_POST['tracking_option'] = $googleDetail->tracking_option;
337
  $_POST['ga_gUser'] = 'on';
338
  //$_POST['ga_gCkout'] = 'on';
339
  $_POST['ga_Impr'] = 6;
@@ -343,7 +343,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
343
  $_POST['google-analytic'] = '';
344
  //update option in wordpress local database
345
  update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
346
- update_option('ads_tracking_id', $googleDetail->google_ads_id);
347
  update_option('ads_ert', $googleDetail->remarketing_tags);
348
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
349
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
@@ -363,7 +363,7 @@ if(!class_exists('Conversios_Onboarding_Helper')):
363
  update_option('ee_customer_gmail', $tvc_data->g_mail);
364
  }
365
  if(isset($_POST['ga_view_id']) && $_POST['ga_view_id']){
366
- update_option('ee_ga_view_id', $_POST['ga_view_id']);
367
  }
368
  $return_url = "admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page";
369
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
@@ -385,10 +385,10 @@ if(!class_exists('Conversios_Onboarding_Helper')):
385
  $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
386
  $customApiObj = new CustomApi();
387
  $postData = [
388
- 'merchant_id' => $googleDetail->merchant_id,
389
  'website_url' => get_site_url(),
390
- 'subscription_id' => $googleDetail->id,
391
- 'account_id' => $googleDetail->google_merchant_center_id
392
  ];
393
  //is site verified
394
  if ($googleDetail->is_site_verified == '0') {
@@ -462,7 +462,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
462
  protected $access_token;
463
  protected $refresh_token;
464
  public function __construct($access_token, $refresh_token) {
465
- $merchantInfo = json_decode(file_get_contents(ENHANCAD_PLUGIN_URL.'/includes/setup/json/merchant-info.json'), true);
466
  $this->refresh_token = $refresh_token;
467
  $this->access_token = $this->generateAccessToken($access_token, $this->refresh_token);
468
  $this->apiDomain = TVC_API_CALL_URL;
@@ -516,7 +516,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
516
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
517
  $data = [
518
  'subscription_id' => "",//$this->subscription_id,
519
- 'gmail' => $tvc_data->g_mail,
520
  'access_token' => $this->access_token,
521
  'refresh_token' => $this->refresh_token,
522
  'domain' => $tvc_data->user_domain
@@ -580,8 +580,8 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
580
  $page = (($page-1) * $max_results)+1;
581
  }
582
  $data = [
583
- 'type' => $postData['type'],
584
- 'page'=>$page,
585
  'max_results'=>$max_results
586
  ];
587
  //print_r($data);
@@ -658,10 +658,10 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
658
  $url = $this->apiDomain . '/adwords/create-ads-account';
659
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
660
  $data = [
661
- 'email' => $tvc_data->g_mail,
662
- 'currency' => $tvc_data->currency_code,
663
  'time_zone' => $tvc_data->timezone_string, //'Asia/Kolkata',
664
- 'domain' => $tvc_data->user_domain
665
  ];
666
  $curl_url = $url;
667
  $postData = json_encode($data);
@@ -686,14 +686,14 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
686
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
687
  $data = [
688
  'merchant_id' => $this->merchantId, //'256922349',
689
- 'name' => $postData['store_name'],
690
- 'website_url' => $postData['website_url'],
691
- 'customer_id' => $postData['customer_id'],
692
  'adult_content' => isset($postData['adult_content']) && $postData['adult_content'] == 'true' ? true : false,
693
  'country' => $postData['country'],
694
  'users' => [
695
  [
696
- "email_address" => $postData['email_address'], //"sarjit@pivotdrive.ca"
697
  "admin" => true
698
  ]
699
  ],
@@ -725,10 +725,10 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
725
  $url = $this->apiDomain . '/customers/login';
726
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
727
  $data = [
728
- 'email' => $tvc_data->g_mail,
729
  'access_token' => $this->access_token,
730
  'refresh_token' => $this->refresh_token,
731
- 'sign_in_type' => $tvc_data->sign_in_type
732
  ];
733
  $curl_url = $url;
734
  $data = json_encode($data);
@@ -754,18 +754,18 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
754
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
755
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
756
  $data = array(
757
- 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
758
- 'tracking_option' => (isset($postData['tracking_option']))?$postData['tracking_option'] : '',
759
- 'measurement_id' => (isset($postData['web_measurement_id']))?$postData['web_measurement_id'] : '',
760
- 'ga4_analytic_account_id' => (isset($postData['ga4_account_id']))?$postData['ga4_account_id'] : '',
761
- 'property_id' => (isset($postData['web_property_id'])) ? $postData['web_property_id'] : '',
762
- 'ua_analytic_account_id' => (isset($postData['ua_account_id'])) ? $postData['ua_account_id'] : '',
763
- 'enhanced_e_commerce_tracking' => (isset($postData['enhanced_e_commerce_tracking']) && $postData['enhanced_e_commerce_tracking'] == 'true') ? 1 : 0,
764
- 'user_time_tracking' => (isset($postData['user_time_tracking']) && $postData['user_time_tracking']=='true')?1:0,
765
- 'add_gtag_snippet' => (isset($postData['add_gtag_snippet']) && $postData['add_gtag_snippet'] == 'true')? 1:0,
766
- 'client_id_tracking' => (isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0,
767
- 'exception_tracking' => (isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0,
768
- 'enhanced_link_attribution_tracking' => (isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0
769
  );
770
  $curl_url = $url;
771
  $data = json_encode($data);
@@ -789,12 +789,12 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
789
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
790
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
791
  $data = [
792
- 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
793
- 'google_ads_id' => (isset($postData['google_ads_id']))? $postData['google_ads_id'] : '',
794
- 'remarketing_tags' => (isset($postData['remarketing_tags']) && $postData['remarketing_tags'] == 'true') ? 1 : 0,
795
- 'dynamic_remarketing_tags' => (isset($postData['dynamic_remarketing_tags']) && $postData['dynamic_remarketing_tags'] == 'true') ? 1 : 0,
796
- 'google_ads_conversion_tracking' => (isset($postData['google_ads_conversion_tracking']) && $postData['google_ads_conversion_tracking'] == 'true') ? 1 : 0,
797
- 'link_google_analytics_with_google_ads' => (isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0
798
  ];
799
  $curl_url = $url;
800
  $data = json_encode($data);
@@ -818,11 +818,11 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
818
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
819
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
820
  $data = [
821
- 'merchant_id' => ($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id'],
822
- 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
823
- 'google_merchant_center_id' => (isset($postData['google_merchant_center']))? $postData['google_merchant_center'] : '',
824
- 'website_url' => $postData['website_url'],
825
- 'customer_id' => $postData['customer_id']
826
  ];
827
  $curl_url = $url;
828
  $postData = json_encode($data);
@@ -847,20 +847,20 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
847
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token", "RefreshToken:$this->refresh_token");
848
  if ($postData['type'] == "UA") {
849
  $data = [
850
- 'type' => $postData['type'],
851
- 'ads_customer_id' => $postData['ads_customer_id'], //'7894072776', //$postData['ads_customer_id']
852
- 'analytics_id' => $postData['analytics_id'], //'184918792', //$postData['analytics_id']
853
- 'web_property_id' => $postData['web_property_id'], //'UA-184918792-2', //$postData['web_property_id']
854
- 'profile_id' => $postData['profile_id'], //'234239637', //$postData['profile_id']
855
  ];
856
  } else {
857
  $data = [
858
- 'type' => $postData['type'],
859
- 'ads_customer_id' => $postData['ads_customer_id'], //'7894072776', //$postData['ads_customer_id']
860
- 'analytics_id' => '', //$postData['analytics_id']
861
- 'web_property_id' => $postData['web_property_id'], //'properties/257833054', //$postData['web_property_id']
862
- 'profile_id' => '', //$postData['profile_id']
863
- 'web_property' => $postData['web_property'], //'234239637', //$postData['profile_id']
864
  ];
865
  }
866
  $curl_url = $url;
@@ -884,9 +884,9 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
884
  $url = $this->apiDomain . '/adwords/link-ads-to-merchant-center';
885
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token");
886
  $data = [
887
- 'merchant_id' => ($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id'],
888
- 'account_id' => $postData['account_id'],
889
- 'adwords_id' => $postData['adwords_id']
890
  ];
891
  $curl_url = $url;
892
  $data = json_encode($data);
@@ -909,7 +909,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
909
  $url = $this->apiDomain . '/customer-subscriptions/update-setup-time';
910
  $this->header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
911
  $data = [
912
- 'subscription_id' => (isset($postData['subscription_id']))?$postData['subscription_id'] : '',
913
  'setup_end_time' => date('Y-m-d H:i:s')
914
  ];
915
  $this->curl_url = $url;
@@ -978,7 +978,7 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
978
  $url = $this->apiDomain . '/google-ads/create-conversion';
979
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
980
  $data = [
981
- 'customer_id' => (isset($postData['customer_id']))?$postData['customer_id'] : '',
982
  'name' => "Order Conversion"
983
  ];
984
  $curl_url = $url;
@@ -1018,9 +1018,9 @@ if(!class_exists('Conversios_Onboarding_ApiCall') ){
1018
 
1019
  $data = [
1020
  "grant_type" => 'refresh_token',
1021
- "client_id" => $clientId,
1022
- 'client_secret' => $clientSecret,
1023
- 'refresh_token' => $refresh_token,
1024
  ];
1025
 
1026
  $postData = json_encode($data);
63
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
64
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
65
  $tvc_data = (object)$_POST['tvc_data'];
66
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
67
  echo json_encode($api_obj->getAnalyticsWebProperties($_POST));
68
  wp_die();
69
  }else{
79
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
80
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
81
  $tvc_data = (object)$_POST['tvc_data'];
82
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
83
  /*sendingblue*/
84
  $data = array();
85
  $data["email"] = $tvc_data->g_mail;
104
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
105
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
106
  $tvc_data = (object)$_POST['tvc_data'];
107
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
108
  echo json_encode($api_obj->getGoogleAdsAccountList($_POST));
109
  wp_die();
110
  }else{
119
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
120
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
121
  $tvc_data = (object)$_POST['tvc_data'];
122
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
123
  echo json_encode($api_obj->createGoogleAdsAccount($_POST));
124
  wp_die();
125
  }else{
135
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
136
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
137
  $tvc_data = (object)$_POST['tvc_data'];
138
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
139
  /*sendingblue*/
140
  $data = array();
141
  $data["email"] = $tvc_data->g_mail;
160
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
161
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
162
  $tvc_data = (object)$_POST['tvc_data'];
163
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
164
  echo json_encode($api_obj->linkAnalyticToAdsAccount($_POST));
165
  wp_die();
166
  }else{
176
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
177
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
178
  $tvc_data = (object)$_POST['tvc_data'];
179
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
180
  echo json_encode($api_obj->listMerchantCenterAccount($_POST));
181
  wp_die();
182
  }else{
191
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
192
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
193
  $tvc_data = (object)$_POST['tvc_data'];
194
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
195
  echo json_encode($api_obj->createMerchantAccount($_POST));
196
  wp_die();
197
  }else{
207
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
208
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
209
  $tvc_data = (object)$_POST['tvc_data'];
210
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
211
  /*sendingblue*/
212
  $data = array();
213
  $data["email"] = $tvc_data->g_mail;
231
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
232
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
233
  $tvc_data = (object)$_POST['tvc_data'];
234
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
235
  unset($_POST['tvc_data']);
236
  unset($_POST['conversios_onboarding_nonce']);
237
  echo json_encode($api_obj->getConversionList($_POST));
249
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
250
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
251
  $tvc_data = (object)$_POST['tvc_data'];
252
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
253
  echo json_encode($api_obj->linkGoogleAdsToMerchantCenter($_POST));
254
  wp_die();
255
  }else{
264
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
265
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
266
  $tvc_data = (object)$_POST['tvc_data'];
267
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
268
  echo json_encode($api_obj->getSubscriptionDetails($_POST['tvc_data'], $_POST['subscription_id']));
269
  wp_die();
270
  }else{
280
  $nonce = (isset($_POST['conversios_onboarding_nonce']))?$_POST['conversios_onboarding_nonce']:"";
281
  if($this->admin_safe_ajax_call($nonce, 'conversios_onboarding_nonce')){
282
  $tvc_data = (object)$_POST['tvc_data'];
283
+ $api_obj = new Conversios_Onboarding_ApiCall(esc_attr($tvc_data->access_token), esc_attr($tvc_data->refresh_token));
284
  $return_url = $this->save_wp_setting_from_subscription_api($api_obj, $tvc_data, $_POST['subscription_id']);
285
  $return_rs = $api_obj->updateSetupTimeToSubscription($_POST);
286
  $return_rs->return_url = $return_url;
325
  $this->site_verification_and_domain_claim($googleDetail);
326
  }
327
 
328
+ $_POST['subscription_id'] = esc_attr($googleDetail->id);
329
  $_POST['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && $googleDetail->enhanced_e_commerce_tracking == "1") ? "on" : "";
330
 
331
  $_POST['ga_ST'] = (isset($googleDetail->add_gtag_snippet) && $googleDetail->add_gtag_snippet == "1") ? "on" : "";
332
+ $_POST['gm_id'] = esc_attr($googleDetail->measurement_id);
333
+ $_POST['ga_id'] = esc_attr($googleDetail->property_id);
334
+ $_POST['google_ads_id'] = esc_attr($googleDetail->google_ads_id);
335
+ $_POST['google_merchant_id'] = esc_attr($googleDetail->google_merchant_center_id);
336
+ $_POST['tracking_option'] = esc_attr($googleDetail->tracking_option);
337
  $_POST['ga_gUser'] = 'on';
338
  //$_POST['ga_gCkout'] = 'on';
339
  $_POST['ga_Impr'] = 6;
343
  $_POST['google-analytic'] = '';
344
  //update option in wordpress local database
345
  update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
346
+ update_option('ads_tracking_id', esc_attr($googleDetail->google_ads_id));
347
  update_option('ads_ert', $googleDetail->remarketing_tags);
348
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
349
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
363
  update_option('ee_customer_gmail', $tvc_data->g_mail);
364
  }
365
  if(isset($_POST['ga_view_id']) && $_POST['ga_view_id']){
366
+ update_option('ee_ga_view_id', esc_attr($_POST['ga_view_id']));
367
  }
368
  $return_url = "admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page";
369
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
385
  $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
386
  $customApiObj = new CustomApi();
387
  $postData = [
388
+ 'merchant_id' => esc_attr($googleDetail->merchant_id),
389
  'website_url' => get_site_url(),
390
+ 'subscription_id' => esc_attr($googleDetail->id),
391
+ 'account_id' => esc_attr($googleDetail->google_merchant_center_id)
392
  ];
393
  //is site verified
394
  if ($googleDetail->is_site_verified == '0') {
462
  protected $access_token;
463
  protected $refresh_token;
464
  public function __construct($access_token, $refresh_token) {
465
+ $merchantInfo = json_decode(file_get_contents(ENHANCAD_PLUGIN_DIR.'includes/setup/json/merchant-info.json'), true);
466
  $this->refresh_token = $refresh_token;
467
  $this->access_token = $this->generateAccessToken($access_token, $this->refresh_token);
468
  $this->apiDomain = TVC_API_CALL_URL;
516
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
517
  $data = [
518
  'subscription_id' => "",//$this->subscription_id,
519
+ 'gmail' => sanitize_text_field($tvc_data->g_mail),
520
  'access_token' => $this->access_token,
521
  'refresh_token' => $this->refresh_token,
522
  'domain' => $tvc_data->user_domain
580
  $page = (($page-1) * $max_results)+1;
581
  }
582
  $data = [
583
+ 'type' => sanitize_text_field($postData['type']),
584
+ 'page'=>sanitize_text_field($page),
585
  'max_results'=>$max_results
586
  ];
587
  //print_r($data);
658
  $url = $this->apiDomain . '/adwords/create-ads-account';
659
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
660
  $data = [
661
+ 'email' => sanitize_text_field($tvc_data->g_mail),
662
+ 'currency' => sanitize_text_field($tvc_data->currency_code),
663
  'time_zone' => $tvc_data->timezone_string, //'Asia/Kolkata',
664
+ 'domain' => sanitize_text_field($tvc_data->user_domain)
665
  ];
666
  $curl_url = $url;
667
  $postData = json_encode($data);
686
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
687
  $data = [
688
  'merchant_id' => $this->merchantId, //'256922349',
689
+ 'name' => sanitize_text_field($postData['store_name']),
690
+ 'website_url' => sanitize_text_field($postData['website_url']),
691
+ 'customer_id' => sanitize_text_field($postData['customer_id']),
692
  'adult_content' => isset($postData['adult_content']) && $postData['adult_content'] == 'true' ? true : false,
693
  'country' => $postData['country'],
694
  'users' => [
695
  [
696
+ "email_address" => sanitize_text_field($postData['email_address']), //"sarjit@pivotdrive.ca"
697
  "admin" => true
698
  ]
699
  ],
725
  $url = $this->apiDomain . '/customers/login';
726
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
727
  $data = [
728
+ 'email' => sanitize_text_field($tvc_data->g_mail),
729
  'access_token' => $this->access_token,
730
  'refresh_token' => $this->refresh_token,
731
+ 'sign_in_type' => sanitize_text_field($tvc_data->sign_in_type)
732
  ];
733
  $curl_url = $url;
734
  $data = json_encode($data);
754
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
755
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
756
  $data = array(
757
+ 'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
758
+ 'tracking_option' => sanitize_text_field((isset($postData['tracking_option']))?$postData['tracking_option'] : ''),
759
+ 'measurement_id' => sanitize_text_field((isset($postData['web_measurement_id']))?$postData['web_measurement_id'] : ''),
760
+ 'ga4_analytic_account_id' => sanitize_text_field((isset($postData['ga4_account_id']))?$postData['ga4_account_id'] : ''),
761
+ 'property_id' => sanitize_text_field((isset($postData['web_property_id'])) ? $postData['web_property_id'] : ''),
762
+ 'ua_analytic_account_id' => sanitize_text_field((isset($postData['ua_account_id'])) ? $postData['ua_account_id'] : ''),
763
+ 'enhanced_e_commerce_tracking' => sanitize_text_field((isset($postData['enhanced_e_commerce_tracking']) && $postData['enhanced_e_commerce_tracking'] == 'true') ? 1 : 0),
764
+ 'user_time_tracking' => sanitize_text_field((isset($postData['user_time_tracking']) && $postData['user_time_tracking']=='true')?1:0),
765
+ 'add_gtag_snippet' => sanitize_text_field((isset($postData['add_gtag_snippet']) && $postData['add_gtag_snippet'] == 'true')? 1:0),
766
+ 'client_id_tracking' => sanitize_text_field((isset($postData['client_id_tracking']) && $postData['client_id_tracking']=='true')?1:0),
767
+ 'exception_tracking' => sanitize_text_field((isset($postData['exception_tracking']) && $postData['exception_tracking']=='true')?1:0),
768
+ 'enhanced_link_attribution_tracking' => sanitize_text_field((isset($postData['enhanced_link_attribution_tracking']) && $postData['enhanced_link_attribution_tracking'] == 'true')? 1 : 0)
769
  );
770
  $curl_url = $url;
771
  $data = json_encode($data);
789
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
790
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
791
  $data = [
792
+ 'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
793
+ 'google_ads_id' => sanitize_text_field((isset($postData['google_ads_id']))? $postData['google_ads_id'] : ''),
794
+ 'remarketing_tags' => sanitize_text_field((isset($postData['remarketing_tags']) && $postData['remarketing_tags'] == 'true') ? 1 : 0),
795
+ 'dynamic_remarketing_tags' => sanitize_text_field((isset($postData['dynamic_remarketing_tags']) && $postData['dynamic_remarketing_tags'] == 'true') ? 1 : 0),
796
+ 'google_ads_conversion_tracking' => sanitize_text_field((isset($postData['google_ads_conversion_tracking']) && $postData['google_ads_conversion_tracking'] == 'true') ? 1 : 0),
797
+ 'link_google_analytics_with_google_ads' => sanitize_text_field((isset($postData['link_google_analytics_with_google_ads']) && $postData['link_google_analytics_with_google_ads'] == 'true') ? 1 : 0)
798
  ];
799
  $curl_url = $url;
800
  $data = json_encode($data);
818
  $url = $this->apiDomain . '/customer-subscriptions/update-detail';
819
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
820
  $data = [
821
+ 'merchant_id' => sanitize_text_field(($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id']),
822
+ 'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
823
+ 'google_merchant_center_id' => sanitize_text_field((isset($postData['google_merchant_center']))? $postData['google_merchant_center'] : ''),
824
+ 'website_url' => sanitize_text_field($postData['website_url']),
825
+ 'customer_id' => sanitize_text_field($postData['customer_id'])
826
  ];
827
  $curl_url = $url;
828
  $postData = json_encode($data);
847
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token", "RefreshToken:$this->refresh_token");
848
  if ($postData['type'] == "UA") {
849
  $data = [
850
+ 'type' => sanitize_text_field($postData['type']),
851
+ 'ads_customer_id' => sanitize_text_field($postData['ads_customer_id']),
852
+ 'analytics_id' => sanitize_text_field($postData['analytics_id']),
853
+ 'web_property_id' => sanitize_text_field($postData['web_property_id']),
854
+ 'profile_id' => sanitize_text_field($postData['profile_id']),
855
  ];
856
  } else {
857
  $data = [
858
+ 'type' => sanitize_text_field($postData['type']),
859
+ 'ads_customer_id' => sanitize_text_field($postData['ads_customer_id']),
860
+ 'analytics_id' => '',
861
+ 'web_property_id' => sanitize_text_field($postData['web_property_id']),
862
+ 'profile_id' => '',
863
+ 'web_property' => sanitize_text_field($postData['web_property']),
864
  ];
865
  }
866
  $curl_url = $url;
884
  $url = $this->apiDomain . '/adwords/link-ads-to-merchant-center';
885
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json", "AccessToken:$this->access_token");
886
  $data = [
887
+ 'merchant_id' => sanitize_text_field(($postData['merchant_id'] == 'NewMerchant') ? $this->merchantId: $postData['merchant_id']),
888
+ 'account_id' => sanitize_text_field($postData['account_id']),
889
+ 'adwords_id' => sanitize_text_field($postData['adwords_id'])
890
  ];
891
  $curl_url = $url;
892
  $data = json_encode($data);
909
  $url = $this->apiDomain . '/customer-subscriptions/update-setup-time';
910
  $this->header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
911
  $data = [
912
+ 'subscription_id' => sanitize_text_field((isset($postData['subscription_id']))?$postData['subscription_id'] : ''),
913
  'setup_end_time' => date('Y-m-d H:i:s')
914
  ];
915
  $this->curl_url = $url;
978
  $url = $this->apiDomain . '/google-ads/create-conversion';
979
  $header = array("Authorization: Bearer MTIzNA==", "content-type: application/json");
980
  $data = [
981
+ 'customer_id' => sanitize_text_field((isset($postData['customer_id']))?$postData['customer_id'] : ''),
982
  'name' => "Order Conversion"
983
  ];
984
  $curl_url = $url;
1018
 
1019
  $data = [
1020
  "grant_type" => 'refresh_token',
1021
+ "client_id" => esc_attr($clientId),
1022
+ 'client_secret' => esc_attr($clientSecret),
1023
+ 'refresh_token' => esc_attr($refresh_token),
1024
  ];
1025
 
1026
  $postData = json_encode($data);
admin/js/bootstrap.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v4.5.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function o(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function r(t){var n=this,i=!1;return e(this).one(a.TRANSITION_END,(function(){i=!0})),setTimeout((function(){i||a.triggerTransitionEnd(n)}),t),this}var a={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),o=parseFloat(n),s=parseFloat(i);return o||s?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],s=e[i],r=s&&a.isElement(s)?"element":null===(l=s)||"undefined"==typeof l?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(r))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+r+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?a.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof e)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};a.jQueryDetection(),e.fn.emulateTransitionEnd=r,e.event.special[a.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var l="alert",c=e.fn[l],h=function(){function t(t){this._element=t}var n=t.prototype;return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},n._getRootElement=function(t){var n=a.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event("close.bs.alert");return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=a.getTransitionDurationFromElement(t);e(t).one(a.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.alert");o||(o=new t(this),i.data("bs.alert",o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}}]),t}();e(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),e.fn[l]=h._jQueryInterface,e.fn[l].Constructor=h,e.fn[l].noConflict=function(){return e.fn[l]=c,h._jQueryInterface};var u=e.fn.button,d=function(){function t(t){this._element=t}var n=t.prototype;return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector('input:not([type="hidden"])');if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains("active"))t=!1;else{var s=i.querySelector(".active");s&&e(s).removeClass("active")}t&&("checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains("active")),e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&e(this._element).toggleClass("active"))},n.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.button");i||(i=new t(this),e(this).data("bs.button",i)),"toggle"===n&&i[n]()}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}}]),t}();e(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(".btn")[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();else{var o=n.querySelector('input:not([type="hidden"])');if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))return void t.preventDefault();("LABEL"!==i.tagName||o&&"checkbox"!==o.type)&&d._jQueryInterface.call(e(n),"toggle")}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var n=e(t.target).closest(".btn")[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var s=0,r=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;s<r;s++){var a=t[s];"true"===a.getAttribute("aria-pressed")?a.classList.add("active"):a.classList.remove("active")}})),e.fn.button=d._jQueryInterface,e.fn.button.Constructor=d,e.fn.button.noConflict=function(){return e.fn.button=u,d._jQueryInterface};var f="carousel",g=".bs.carousel",m=e.fn[f],p={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},_={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},v={TOUCH:"touch",PEN:"pen"},b=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var n=t.prototype;return n.next=function(){this._isSliding||this._slide("next")},n.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide("prev")},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(a.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector(".active.carousel-item");var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one("slid.bs.carousel",(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?"next":"prev";this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(g),e.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},n._getConfig=function(t){return t=s({},p,t),a.typeCheckConfig(f,t,_),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&v[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on("pointerdown.bs.carousel",(function(t){return n(t)})),e(this._element).on("pointerup.bs.carousel",(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on("touchstart.bs.carousel",(function(t){return n(t)})),e(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on("touchend.bs.carousel",(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),s=this._items.length-1;if((i&&0===o||n&&o===s)&&!this._config.wrap)return e;var r=(o+("prev"===t?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector(".active.carousel-item")),s=e.Event("slide.bs.carousel",{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(s),s},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass("active");var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass("active")}},n._slide=function(t,n){var i,o,s,r=this,l=this._element.querySelector(".active.carousel-item"),c=this._getItemIndex(l),h=n||l&&this._getItemByDirection(t,l),u=this._getItemIndex(h),d=Boolean(this._interval);if("next"===t?(i="carousel-item-left",o="carousel-item-next",s="left"):(i="carousel-item-right",o="carousel-item-prev",s="right"),h&&e(h).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(h,s).isDefaultPrevented()&&l&&h){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(h);var f=e.Event("slid.bs.carousel",{relatedTarget:h,direction:s,from:c,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),a.reflow(h),e(l).addClass(i),e(h).addClass(i);var g=parseInt(h.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=a.getTransitionDurationFromElement(l);e(l).one(a.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass("active"),e(l).removeClass("active "+o+" "+i),r._isSliding=!1,setTimeout((function(){return e(r._element).trigger(f)}),0)})).emulateTransitionEnd(m)}else e(l).removeClass("active"),e(h).addClass("active"),this._isSliding=!1,e(this._element).trigger(f);d&&this.cycle()}},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.carousel"),o=s({},p,e(this).data());"object"==typeof n&&(o=s({},o,n));var r="string"==typeof n?n:o.slide;if(i||(i=new t(this,o),e(this).data("bs.carousel",i)),"number"==typeof n)i.to(n);else if("string"==typeof r){if("undefined"==typeof i[r])throw new TypeError('No method named "'+r+'"');i[r]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=a.getSelectorFromElement(this);if(i){var o=e(i)[0];if(o&&e(o).hasClass("carousel")){var r=s({},e(o).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(r.interval=!1),t._jQueryInterface.call(e(o),r),l&&e(o).data("bs.carousel").to(l),n.preventDefault()}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return p}}]),t}();e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",b._dataApiClickHandler),e(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n<i;n++){var o=e(t[n]);b._jQueryInterface.call(o,o.data())}})),e.fn[f]=b._jQueryInterface,e.fn[f].Constructor=b,e.fn[f].noConflict=function(){return e.fn[f]=m,b._jQueryInterface};var y="collapse",E=e.fn[y],w={toggle:!0,parent:""},T={toggle:"boolean",parent:"(string|element)"},C=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var s=n[i],r=a.getSelectorFromElement(s),l=[].slice.call(document.querySelectorAll(r)).filter((function(e){return e===t}));null!==r&&l.length>0&&(this._selector=r,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var n=t.prototype;return n.toggle=function(){e(this._element).hasClass("show")?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass("show")&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains("collapse")}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data("bs.collapse"))&&i._isTransitioning))){var s=e.Event("show.bs.collapse");if(e(this._element).trigger(s),!s.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data("bs.collapse",null));var r=this._getDimension();e(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[r]=0,this._triggerArray.length&&e(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(r[0].toUpperCase()+r.slice(1)),c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){e(o._element).removeClass("collapsing").addClass("collapse show"),o._element.style[r]="",o.setTransitioning(!1),e(o._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(c),this._element.style[r]=this._element[l]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass("show")){var n=e.Event("hide.bs.collapse");if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",a.reflow(this._element),e(this._element).addClass("collapsing").removeClass("collapse show");var o=this._triggerArray.length;if(o>0)for(var s=0;s<o;s++){var r=this._triggerArray[s],l=a.getSelectorFromElement(r);if(null!==l)e([].slice.call(document.querySelectorAll(l))).hasClass("show")||e(r).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[i]="";var c=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(){t.setTransitioning(!1),e(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(c)}}},n.setTransitioning=function(t){this._isTransitioning=t},n.dispose=function(){e.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n._getConfig=function(t){return(t=s({},w,t)).toggle=Boolean(t.toggle),a.typeCheckConfig(y,t,T),t},n._getDimension=function(){return e(this._element).hasClass("width")?"width":"height"},n._getParent=function(){var n,i=this;a.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',s=[].slice.call(n.querySelectorAll(o));return e(s).each((function(e,n){i._addAriaAndCollapsedClass(t._getTargetFromElement(n),[n])})),n},n._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass("show");n.length&&e(n).toggleClass("collapsed",!i).attr("aria-expanded",i)},t._getTargetFromElement=function(t){var e=a.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.collapse"),r=s({},w,i.data(),"object"==typeof n&&n?n:{});if(!o&&r.toggle&&"string"==typeof n&&/show|hide/.test(n)&&(r.toggle=!1),o||(o=new t(this,r),i.data("bs.collapse",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return w}}]),t}();e(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=a.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data("bs.collapse")?"toggle":n.data();C._jQueryInterface.call(t,i)}))})),e.fn[y]=C._jQueryInterface,e.fn[y].Constructor=C,e.fn[y].noConflict=function(){return e.fn[y]=E,C._jQueryInterface};var S="dropdown",k=e.fn[S],D=new RegExp("38|40|27"),N={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},A={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},I=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var i=t.prototype;return i.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")){var n=e(this._menu).hasClass("show");t._clearMenus(),n||this.show(!0)}},i.show=function(i){if(void 0===i&&(i=!1),!(this._element.disabled||e(this._element).hasClass("disabled")||e(this._menu).hasClass("show"))){var o={relatedTarget:this._element},s=e.Event("show.bs.dropdown",o),r=t._getParentFromElement(this._element);if(e(r).trigger(s),!s.isDefaultPrevented()){if(!this._inNavbar&&i){if("undefined"==typeof n)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var l=this._element;"parent"===this._config.reference?l=r:a.isElement(this._config.reference)&&(l=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(l=this._config.reference[0])),"scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new n(l,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass("show"),e(r).toggleClass("show").trigger(e.Event("shown.bs.dropdown",o))}}},i.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass("disabled")&&e(this._menu).hasClass("show")){var n={relatedTarget:this._element},i=e.Event("hide.bs.dropdown",n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass("show"),e(o).toggleClass("show").trigger(e.Event("hidden.bs.dropdown",n)))}},i.dispose=function(){e.removeData(this._element,"bs.dropdown"),e(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},i.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},i._addEventListeners=function(){var t=this;e(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},i._getConfig=function(t){return t=s({},this.constructor.Default,e(this._element).data(),t),a.typeCheckConfig(S,t,this.constructor.DefaultType),t},i._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},i._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start";return t.hasClass("dropup")?n=e(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass("dropdown-menu-right")&&(n="bottom-end"),n},i._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},i._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},i._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),s({},t,this._config.popperConfig)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.dropdown");if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data("bs.dropdown",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),o=0,s=i.length;o<s;o++){var r=t._getParentFromElement(i[o]),a=e(i[o]).data("bs.dropdown"),l={relatedTarget:i[o]};if(n&&"click"===n.type&&(l.clickEvent=n),a){var c=a._menu;if(e(r).hasClass("show")&&!(n&&("click"===n.type&&/input|textarea/i.test(n.target.tagName)||"keyup"===n.type&&9===n.which)&&e.contains(r,n.target))){var h=e.Event("hide.bs.dropdown",l);e(r).trigger(h),h.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),a._popper&&a._popper.destroy(),e(c).removeClass("show"),e(r).removeClass("show").trigger(e.Event("hidden.bs.dropdown",l)))}}}},t._getParentFromElement=function(t){var e,n=a.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(n){if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(".dropdown-menu").length):!D.test(n.which))&&!this.disabled&&!e(this).hasClass("disabled")){var i=t._getParentFromElement(this),o=e(i).hasClass("show");if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||o&&(27===n.which||32===n.which))return 27===n.which&&e(i.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void e(this).trigger("click");var s=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==s.length){var r=s.indexOf(n.target);38===n.which&&r>0&&r--,40===n.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}}},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return N}},{key:"DefaultType",get:function(){return A}}]),t}();e(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',I._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",I._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",I._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),I._jQueryInterface.call(e(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),e.fn[S]=I._jQueryInterface,e.fn[S].Constructor=I,e.fn[S].noConflict=function(){return e.fn[S]=k,I._jQueryInterface};var O=e.fn.modal,j={backdrop:!0,keyboard:!0,focus:!0,show:!0},x={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},P=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var n=t.prototype;return n.toggle=function(t){return this._isShown?this.hide():this.show(t)},n.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass("fade")&&(this._isTransitioning=!0);var i=e.Event("show.bs.modal",{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return n.hide(t)})),e(this._dialog).on("mousedown.dismiss.bs.modal",(function(){e(n._element).one("mouseup.dismiss.bs.modal",(function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return n._showElement(t)})))}},n.hide=function(t){var n=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var i=e.Event("hide.bs.modal");if(e(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass("fade");if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off("focusin.bs.modal"),e(this._element).removeClass("show"),e(this._element).off("click.dismiss.bs.modal"),e(this._dialog).off("mousedown.dismiss.bs.modal"),o){var s=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,(function(t){return n._hideModal(t)})).emulateTransitionEnd(s)}else this._hideModal()}}},n.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return e(t).off(".bs.modal")})),e(document).off("focusin.bs.modal"),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(t){return t=s({},j,t),a.typeCheckConfig("modal",t,x),t},n._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var n=e.Event("hidePrevented.bs.modal");if(e(this._element).trigger(n),n.defaultPrevented)return;var i=this._element.scrollHeight>document.documentElement.clientHeight;i||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var o=a.getTransitionDurationFromElement(this._dialog);e(this._element).off(a.TRANSITION_END),e(this._element).one(a.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),i||e(t._element).one(a.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}else this.hide()},n._showElement=function(t){var n=this,i=e(this._element).hasClass("fade"),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&a.reflow(this._element),e(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var s=e.Event("shown.bs.modal",{relatedTarget:t}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(s)};if(i){var l=a.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(a.TRANSITION_END,r).emulateTransitionEnd(l)}else r()},n._enforceFocus=function(){var t=this;e(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off("keydown.dismiss.bs.modal")},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):e(window).off("resize.bs.modal")},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger("hidden.bs.modal")}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on("click.dismiss.bs.modal",(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&n._triggerBackdropTransition()})),i&&a.reflow(this._backdrop),e(this._backdrop).addClass("show"),!t)return;if(!i)return void t();var o=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass("show");var s=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass("fade")){var r=a.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s()}else t&&t()},n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),i=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(n,i){var o=i.style.paddingRight,s=e(i).css("padding-right");e(i).data("padding-right",o).css("padding-right",parseFloat(s)+t._scrollbarWidth+"px")})),e(i).each((function(n,i){var o=i.style.marginRight,s=e(i).css("margin-right");e(i).data("margin-right",o).css("margin-right",parseFloat(s)-t._scrollbarWidth+"px")}));var o=document.body.style.paddingRight,s=e(document.body).css("padding-right");e(document.body).data("padding-right",o).css("padding-right",parseFloat(s)+this._scrollbarWidth+"px")}e(document.body).addClass("modal-open")},n._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));e(t).each((function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""}));var n=[].slice.call(document.querySelectorAll(".sticky-top"));e(n).each((function(t,n){var i=e(n).data("margin-right");"undefined"!=typeof i&&e(n).css("margin-right",i).removeData("margin-right")}));var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this).data("bs.modal"),r=s({},j,e(this).data(),"object"==typeof n&&n?n:{});if(o||(o=new t(this,r),e(this).data("bs.modal",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](i)}else r.show&&o.show(i)}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return j}}]),t}();e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var n,i=this,o=a.getSelectorFromElement(this);o&&(n=document.querySelector(o));var r=e(n).data("bs.modal")?"toggle":s({},e(n).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var l=e(n).one("show.bs.modal",(function(t){t.isDefaultPrevented()||l.one("hidden.bs.modal",(function(){e(i).is(":visible")&&i.focus()}))}));P._jQueryInterface.call(e(n),r,this)})),e.fn.modal=P._jQueryInterface,e.fn.modal.Constructor=P,e.fn.modal.noConflict=function(){return e.fn.modal=O,P._jQueryInterface};var R=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],L={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},q=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,F=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function Q(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),s=[].slice.call(i.body.querySelectorAll("*")),r=function(t,n){var i=s[t],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var a=[].slice.call(i.attributes),l=[].concat(e["*"]||[],e[r]||[]);a.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===R.indexOf(n)||Boolean(t.nodeValue.match(q)||t.nodeValue.match(F));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,s=i.length;o<s;o++)if(n.match(i[o]))return!0;return!1})(t,l)||i.removeAttribute(t.nodeName)}))},a=0,l=s.length;a<l;a++)r(a);return i.body.innerHTML}var B="tooltip",H=e.fn[B],U=new RegExp("(^|\\s)bs-tooltip\\S+","g"),M=["sanitize","whiteList","sanitizeFn"],W={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},V={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},z={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:L,popperConfig:null},K={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},X=function(){function t(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var i=t.prototype;return i.enable=function(){this._isEnabled=!0},i.disable=function(){this._isEnabled=!1},i.toggleEnabled=function(){this._isEnabled=!this._isEnabled},i.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},i.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},i.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var i=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(i);var o=a.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),l=a.getUID(this.constructor.NAME);r.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&e(r).addClass("fade");var c="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(c);this.addAttachmentClass(h);var u=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,this._getPopperConfig(h)),e(r).addClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),"out"===n&&t._leave(null,t)};if(e(this.tip).hasClass("fade")){var f=a.getTransitionDurationFromElement(this.tip);e(this.tip).one(a.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},i.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){"show"!==n._hoverState&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass("show"),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,e(this.tip).hasClass("fade")){var r=a.getTransitionDurationFromElement(i);e(i).one(a.TRANSITION_END,s).emulateTransitionEnd(r)}else s();this._hoverState=""}},i.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},i.isWithContent=function(){return Boolean(this.getTitle())},i.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},i.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},i.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass("fade show")},i.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=Q(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},i.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},i._getPopperConfig=function(t){var e=this;return s({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},i._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=s({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},i._getContainer=function(){return!1===this.config.container?document.body:a.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},i._getAttachment=function(t){return V[t.toUpperCase()]},i._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i="hover"===n?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o="hover"===n?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=s({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},i._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},i._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e(n.getTipElement()).hasClass("show")||"show"===n._hoverState?n._hoverState="show":(clearTimeout(n._timeout),n._hoverState="show",n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){"show"===n._hoverState&&n.show()}),n.config.delay.show):n.show())},i._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState="out",n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){"out"===n._hoverState&&n.hide()}),n.config.delay.hide):n.hide())},i._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},i._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==M.indexOf(t)&&delete n[t]})),"number"==typeof(t=s({},this.constructor.Default,n,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),a.typeCheckConfig(B,t,this.constructor.DefaultType),t.sanitize&&(t.template=Q(t.template,t.whiteList,t.sanitizeFn)),t},i._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},i._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(U);null!==n&&n.length&&t.removeClass(n.join(""))},i._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},i._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.tooltip"),o="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new t(this,o),e(this).data("bs.tooltip",i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return z}},{key:"NAME",get:function(){return B}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return K}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return W}}]),t}();e.fn[B]=X._jQueryInterface,e.fn[B].Constructor=X,e.fn[B].noConflict=function(){return e.fn[B]=H,X._jQueryInterface};var Y="popover",$=e.fn[Y],J=new RegExp("(^|\\s)bs-popover\\S+","g"),G=s({},X.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Z=s({},X.DefaultType,{content:"(string|element|function)"}),tt={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},et=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,n.__proto__=i;var r=s.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(J);null!==n&&n.length>0&&t.removeClass(n.join(""))},s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data("bs.popover"),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data("bs.popover",n)),"string"==typeof t)){if("undefined"==typeof n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},o(s,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return G}},{key:"NAME",get:function(){return Y}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return tt}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return Z}}]),s}(X);e.fn[Y]=et._jQueryInterface,e.fn[Y].Constructor=et,e.fn[Y].noConflict=function(){return e.fn[Y]=$,et._jQueryInterface};var nt="scrollspy",it=e.fn[nt],ot={offset:10,method:"auto",target:""},st={offset:"number",method:"string",target:"(string|element)"},rt=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return i._process(t)})),this.refresh(),this._process()}var n=t.prototype;return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?n:this._config.method,o="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,s=a.getSelectorFromElement(t);if(s&&(n=document.querySelector(s)),n){var r=n.getBoundingClientRect();if(r.width||r.height)return[e(n)[i]().top+o,s]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},n._getConfig=function(t){if("string"!=typeof(t=s({},ot,"object"==typeof t&&t?t:{})).target&&a.isElement(t.target)){var n=e(t.target).attr("id");n||(n=a.getUID(nt),e(t.target).attr("id",n)),t.target="#"+n}return a.typeCheckConfig(nt,t,st),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},n._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass("dropdown-item")?(i.closest(".dropdown").find(".dropdown-toggle").addClass("active"),i.addClass("active")):(i.addClass("active"),i.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),i.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),e(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data("bs.scrollspy");if(i||(i=new t(this,"object"==typeof n&&n),e(this).data("bs.scrollspy",i)),"string"==typeof n){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"Default",get:function(){return ot}}]),t}();e(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),n=t.length;n--;){var i=e(t[n]);rt._jQueryInterface.call(i,i.data())}})),e.fn[nt]=rt._jQueryInterface,e.fn[nt].Constructor=rt,e.fn[nt].noConflict=function(){return e.fn[nt]=it,rt._jQueryInterface};var at=e.fn.tab,lt=function(){function t(t){this._element=t}var n=t.prototype;return n.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass("active")||e(this._element).hasClass("disabled"))){var n,i,o=e(this._element).closest(".nav, .list-group")[0],s=a.getSelectorFromElement(this._element);if(o){var r="UL"===o.nodeName||"OL"===o.nodeName?"> li > .active":".active";i=(i=e.makeArray(e(o).find(r)))[i.length-1]}var l=e.Event("hide.bs.tab",{relatedTarget:this._element}),c=e.Event("show.bs.tab",{relatedTarget:i});if(i&&e(i).trigger(l),e(this._element).trigger(c),!c.isDefaultPrevented()&&!l.isDefaultPrevented()){s&&(n=document.querySelector(s)),this._activate(this._element,o);var h=function(){var n=e.Event("hidden.bs.tab",{relatedTarget:t._element}),o=e.Event("shown.bs.tab",{relatedTarget:i});e(i).trigger(n),e(t._element).trigger(o)};n?this._activate(n,n.parentNode,h):h()}}},n.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},n._activate=function(t,n,i){var o=this,s=(!n||"UL"!==n.nodeName&&"OL"!==n.nodeName?e(n).children(".active"):e(n).find("> li > .active"))[0],r=i&&s&&e(s).hasClass("fade"),l=function(){return o._transitionComplete(t,s,i)};if(s&&r){var c=a.getTransitionDurationFromElement(s);e(s).removeClass("show").one(a.TRANSITION_END,l).emulateTransitionEnd(c)}else l()},n._transitionComplete=function(t,n,i){if(n){e(n).removeClass("active");var o=e(n.parentNode).find("> .dropdown-menu .active")[0];o&&e(o).removeClass("active"),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(e(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),a.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&e(t.parentNode).hasClass("dropdown-menu")){var s=e(t).closest(".dropdown")[0];if(s){var r=[].slice.call(s.querySelectorAll(".dropdown-toggle"));e(r).addClass("active")}t.setAttribute("aria-expanded",!0)}i&&i()},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.tab");if(o||(o=new t(this),i.data("bs.tab",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}}]),t}();e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),lt._jQueryInterface.call(e(this),"show")})),e.fn.tab=lt._jQueryInterface,e.fn.tab.Constructor=lt,e.fn.tab.noConflict=function(){return e.fn.tab=at,lt._jQueryInterface};var ct=e.fn.toast,ht={animation:"boolean",autohide:"boolean",delay:"number"},ut={animation:!0,autohide:!0,delay:500},dt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var n=t.prototype;return n.show=function(){var t=this,n=e.Event("show.bs.toast");if(e(this._element).trigger(n),!n.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var i=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),e(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),a.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var o=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,i).emulateTransitionEnd(o)}else i()}},n.hide=function(){if(this._element.classList.contains("show")){var t=e.Event("hide.bs.toast");e(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},n.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),e(this._element).off("click.dismiss.bs.toast"),e.removeData(this._element,"bs.toast"),this._element=null,this._config=null},n._getConfig=function(t){return t=s({},ut,e(this._element).data(),"object"==typeof t&&t?t:{}),a.typeCheckConfig("toast",t,this.constructor.DefaultType),t},n._setListeners=function(){var t=this;e(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},n._close=function(){var t=this,n=function(){t._element.classList.add("hide"),e(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var i=a.getTransitionDurationFromElement(this._element);e(this._element).one(a.TRANSITION_END,n).emulateTransitionEnd(i)}else n()},n._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data("bs.toast");if(o||(o=new t(this,"object"==typeof n&&n),i.data("bs.toast",o)),"string"==typeof n){if("undefined"==typeof o[n])throw new TypeError('No method named "'+n+'"');o[n](this)}}))},o(t,null,[{key:"VERSION",get:function(){return"4.5.1"}},{key:"DefaultType",get:function(){return ht}},{key:"Default",get:function(){return ut}}]),t}();e.fn.toast=dt._jQueryInterface,e.fn.toast.Constructor=dt,e.fn.toast.noConflict=function(){return e.fn.toast=ct,dt._jQueryInterface},t.Alert=h,t.Button=d,t.Carousel=b,t.Collapse=C,t.Dropdown=I,t.Modal=P,t.Popover=et,t.Scrollspy=rt,t.Tab=lt,t.Toast=dt,t.Tooltip=X,t.Util=a,Object.defineProperty(t,"__esModule",{value:!0})}));
7
+ //# sourceMappingURL=bootstrap.min.js.map
admin/js/popper.min.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*
2
+ Copyright (C) Federico Zivolo 2017
3
+ Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
4
+ */(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?e.ownerDocument.documentElement:document.documentElement}function p(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i||'HTML'===i){var n=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||n;return r[o]}return e[o]}function l(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function f(e,t){var o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+i+'Width'],10)}function m(e,t,o,i){return J(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],ie()?o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+('Height'===e?'Bottom':'Right')]:0)}function h(){var e=document.body,t=document.documentElement,o=ie()&&getComputedStyle(t);return{height:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var o={};if(ie())try{o=e.getBoundingClientRect();var i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,m=e.offsetHeight-d;if(l||m){var g=t(e);l-=f(g,'x'),m-=f(g,'y'),r.width-=l,r.height-=m}return c(r)}function u(e,o){var i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),f=parseFloat(a.borderTopWidth,10),m=parseFloat(a.borderLeftWidth,10),h=c({top:p.top-s.top-f,left:p.left-s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var u=parseFloat(a.marginTop,10),b=parseFloat(a.marginLeft,10);h.top-=f-u,h.bottom-=f-u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=l(h,o)),h}function b(e){var t=e.ownerDocument.documentElement,o=u(e,t),i=J(t.clientWidth,window.innerWidth||0),n=J(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function w(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||w(o(e))}function y(e,t,i,r){var p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?(a=n(o(t)),'BODY'===a.nodeName&&(a=e.ownerDocument.documentElement)):'window'===r?a=e.ownerDocument.documentElement:a=r;var l=u(a,s);if('HTML'===a.nodeName&&!w(s)){var f=h(),m=f.height,c=f.width;p.top+=l.top-l.marginTop,p.bottom=m+l.top,p.left+=l.left-l.marginLeft,p.right=c+l.left}else p=l}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function E(e){var t=e.width,o=e.height;return t*o}function v(e,t,o,i,n){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=y(o,i,r,n),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],{area:E(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,i=e.height;return t>=o.clientWidth&&i>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function O(e,t,o){var i=d(t,o);return u(o,i)}function L(e){var t=getComputedStyle(e),o=parseFloat(t.marginTop)+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return n}function x(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o){o=o.split('-')[0];var i=L(e),n={width:i.width,height:i.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-i[a]:t[x(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function D(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var i=T(e,function(e){return e[t]===o});return e.indexOf(i)}function C(t,o,i){var n=void 0===i?t:t.slice(0,D(t,'name',i));return n.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var i=t['function']||t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o.offsets.reference),o=i(o,t))}),o}function N(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=O(this.state,this.popper,this.reference),e.placement=v(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position='absolute',e=C(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var o=e.name,i=e.enabled;return i&&o===t})}function W(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function P(){return this.state.isDestroyed=!0,k(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.left='',this.popper.style.position='',this.popper.style.top='',this.popper.style[W('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function B(e){var t=e.ownerDocument;return t?t.defaultView:window}function H(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function A(e,t,o,i){o.updateBound=i,B(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=A(this.reference,this.options,this.state,this.scheduleUpdate))}function M(e,t){return B(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function R(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=M(this.reference,this.state))}function U(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t){Object.keys(t).forEach(function(o){var i='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&U(t[o])&&(i='px'),e.style[o]=t[o]+i})}function j(e,t){Object.keys(t).forEach(function(o){var i=t[o];!1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return e.name===o&&e.enabled&&e.order<i.order});if(!n){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return n}function K(e){return'end'===e?'start':'start'===e?'end':e}function q(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));return t?i.reverse():i}function V(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?J(document.documentElement.clientHeight,window.innerHeight||0):J(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function z(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return V(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){U(o)&&(n[t]+=o*('-'===e[i-1]?-1:1))})}),n}function G(e,t){var o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')[0];return o=U(+i)?[+i,0]:z(i,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}for(var _=Math.min,X=Math.floor,J=Math.max,Q='undefined'!=typeof window&&'undefined'!=typeof document,Z=['Edge','Trident','Firefox'],$=0,ee=0;ee<Z.length;ee+=1)if(Q&&0<=navigator.userAgent.indexOf(Z[ee])){$=1;break}var i,te=Q&&window.Promise,oe=te?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function(){return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE 10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var i in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],ae=de.slice(3),le={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},fe=function(){function t(o,i){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.options=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return re(t,[{key:'update',value:function(){return N.call(this)}},{key:'destroy',value:function(){return P.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return R.call(this)}}]),t}();return fe.Utils=('undefined'==typeof window?global:window).PopperUtils,fe.placements=de,fe.Defaults={placement:'bottom',eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:pe({},d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,l[i])}return e}},offset:{order:200,enabled:!0,fn:G,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||r(e.instance.popper);e.instance.reference===o&&(o=r(o));var i=y(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return p[e]<i[e]&&!t.escapeWithReference&&(o=J(p[e],i[e])),pe({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t](e))}),e.offsets.popper=p,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[g]-u)),d[m]+u>s[g]&&(e.offsets.popper[m]+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(k(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.placement.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')[0],n=x(i);var a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'right'===i&&f(a.left)<f(l.right)||'top'===i&&f(a.bottom)>f(l.top)||'bottom'===i&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'===i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return n[p?'left':'top']=r[o]-(s?n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:{order:800,enabled:!0,fn:function(e){if(!F(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=T(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===p?t.gpuAcceleration:p,l=r(e.instance.popper),f=g(l),m={position:n.position},h={left:X(n.left),top:X(n.top),bottom:X(n.bottom),right:X(n.right)},c='bottom'===o?'top':'bottom',u='right'===i?'left':'right',b=W('transform');if(d='bottom'==c?-f.height+h.bottom:h.top,s='right'==u?-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[u]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==u?-1:1;m[c]=d*w,m[u]=s*y,m.willChange=c+', '+u}var E={"x-placement":e.placement};return e.attributes=se({},E,e.attributes),e.styles=se({},m,e.styles),e.arrowStyles=se({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return Y(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,i,n){var r=O(n,t,e),p=v(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),Y(t,{position:'absolute'}),o},gpuAcceleration:void 0}}},fe});
5
+ //# sourceMappingURL=popper.min.js.map
admin/partials/class-conversios-header.php CHANGED
@@ -46,12 +46,12 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
46
  <div class="row">
47
  <div class="promoleft">
48
  <div class="promobandmsg">
49
- Level up your game by getting detail insights on every products. Make the informed decision for your next campaign.
50
  </div>
51
  </div>
52
  <div class="promoright">
53
  <div class="prmoupgrdbtn">
54
- <a target="_blank" href="<?php echo $this->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Top+Bar+upgrading+to+pro&utm_campaign=Upsell+at+Conversios'; ?>" class="upgradebtn">Upgrade</a>
55
  </div>
56
  </div>
57
  </div>
@@ -80,11 +80,11 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
80
  foreach ($ee_msg_list as $key => $value) {
81
  if( isset($value["active"]) && $value["active"] == 1 ){
82
  $active_count++;
83
- $m_date = isset($value["date"])?"<span class=\"tvc-msg_date\">".$value["date"]."</span>":"";
84
- $m_title = isset($value["title"])?"<h4 class=\"tvc-msg_title\">".$value["title"]."</h4>":"";
85
  $m_html = isset($value["html"])?"<span class=\"tvc-msg_text\">".base64_decode($value["html"])."</span>":"";
86
  $target = (isset($value["link_type"]) && $value["link_type"] == "external")?"target=\"_blank\"":"";
87
- $m_link = isset($value["link"])?"<a ".$target." href=".$value["link"]." class=\"tvc-notification-button is-secondary\">".$value["link_title"]."</a>":"";
88
 
89
  $html.="<li>
90
  <section class=\"tvc-msg plain\">
@@ -93,7 +93,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
93
  <div class=\"tvc-msg_actions\">
94
  ".$m_link."
95
  <div class=\"tvc-dropdown\">
96
- <button type=\"button\" data-id=".$key." class=\"tvc-notification-button is-tertiary is-dismissible-notification\">Dismiss</button>
97
  </div>
98
  ".$m_date."
99
  </div>
@@ -110,15 +110,15 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
110
  <div class="row align-items-center">
111
  <div class="hdrtpleft">
112
  <div class="brandlogo">
113
- <a target="_blank" href="<?php echo $this->conversios_site_url; ?>"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/logo.png'; ?>" alt="" /></a>
114
  </div>
115
  <div class="hdrcntcbx">
116
- For any query, contact us at <span>+1 (415) 968-6313</span>
117
  </div>
118
  </div>
119
  <div class="hdrtpright">
120
  <div class="hustleplanbtn">
121
- <a href="<?php echo $this->site_url.'conversios-account'; ?>"><button class="cvrs-btn greenbtn"><?php echo $plan_name; ?></button></a>
122
  </div>
123
  <?php /*
124
  <div class="hdrnotiwrp">
@@ -128,7 +128,7 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
128
  */ ?>
129
  </div>
130
  <div class="hdrcntcbx mblhdrcntcbx">
131
- For any query, contact us at <span>+1 (415) 968-6313</span>
132
  </div>
133
  </div>
134
  </div>
@@ -149,8 +149,8 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
149
  $conversios_menu_list = array(
150
  'conversios' => array(
151
  'title'=>'Dashboard',
152
- 'icon'=>ENHANCAD_PLUGIN_URL.'/admin/images/conversios-menu.png',
153
- 'acitve_icon'=>ENHANCAD_PLUGIN_URL.'/admin/images/active-conversios-menu.png'
154
  ),
155
  'conversios-google-analytics'=>array('title'=>'Google Analytics'),
156
  'conversios-google-ads'=>array('title'=>'Google Ads'),
@@ -179,9 +179,9 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
179
  $is_active = $this->is_active_menu($key);
180
  $icon = "";
181
  if(!isset($value['icon']) && !isset($value['acitve_icon'])){
182
- $icon = ENHANCAD_PLUGIN_URL.'/admin/images/'.$key.'-menu.png';
183
  if($is_active == 'active'){
184
- $icon = ENHANCAD_PLUGIN_URL.'/admin/images/'.$is_active.'-'.$key.'-menu.png';
185
  }
186
  }else{
187
  $icon = (isset($value['icon']))?$value['icon']:((isset($value['acitve_icon']))?$value['acitve_icon']:"");
@@ -205,10 +205,8 @@ if ( ! class_exists( 'Conversios_Header' ) ) {
205
  </div>
206
  </div>
207
  <?php
208
- }
209
-
210
  }
211
-
212
  }
213
  }
214
  new Conversios_Header();
46
  <div class="row">
47
  <div class="promoleft">
48
  <div class="promobandmsg">
49
+ <?php _e("Level up your game by getting detail insights on every products. Make the informed decision for your next campaign.","conversios"); ?>
50
  </div>
51
  </div>
52
  <div class="promoright">
53
  <div class="prmoupgrdbtn">
54
+ <a target="_blank" href="<?php echo esc_url($this->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Top+Bar+upgrading+to+pro&utm_campaign=Upsell+at+Conversios'); ?>" class="upgradebtn"><?php _e("Upgrade","conversios"); ?></a>
55
  </div>
56
  </div>
57
  </div>
80
  foreach ($ee_msg_list as $key => $value) {
81
  if( isset($value["active"]) && $value["active"] == 1 ){
82
  $active_count++;
83
+ $m_date = isset($value["date"])?"<span class=\"tvc-msg_date\">".esc_attr($value["date"])."</span>":"";
84
+ $m_title = isset($value["title"])?"<h4 class=\"tvc-msg_title\">".esc_attr($value["title"])."</h4>":"";
85
  $m_html = isset($value["html"])?"<span class=\"tvc-msg_text\">".base64_decode($value["html"])."</span>":"";
86
  $target = (isset($value["link_type"]) && $value["link_type"] == "external")?"target=\"_blank\"":"";
87
+ $m_link = isset($value["link"])?"<a ".$target." href=".esc_url($value["link"])." class=\"tvc-notification-button is-secondary\">".esc_attr($value["link_title"])."</a>":"";
88
 
89
  $html.="<li>
90
  <section class=\"tvc-msg plain\">
93
  <div class=\"tvc-msg_actions\">
94
  ".$m_link."
95
  <div class=\"tvc-dropdown\">
96
+ <button type=\"button\" data-id=".$key." class=\"tvc-notification-button is-tertiary is-dismissible-notification\">".__("Dismiss","conversios")."</button>
97
  </div>
98
  ".$m_date."
99
  </div>
110
  <div class="row align-items-center">
111
  <div class="hdrtpleft">
112
  <div class="brandlogo">
113
+ <a target="_blank" href="<?php echo esc_url($this->conversios_site_url); ?>"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/logo.png'); ?>" alt="" /></a>
114
  </div>
115
  <div class="hdrcntcbx">
116
+ <?php _e("For any query, contact us at <span><a href=\"tel:+1 (415) 968-6313\">+1 (415) 968-6313</a></span>","conversios"); ?>
117
  </div>
118
  </div>
119
  <div class="hdrtpright">
120
  <div class="hustleplanbtn">
121
+ <a href="<?php echo $this->site_url.'conversios-account'; ?>"><button class="cvrs-btn greenbtn"><?php echo esc_attr($plan_name); ?></button></a>
122
  </div>
123
  <?php /*
124
  <div class="hdrnotiwrp">
128
  */ ?>
129
  </div>
130
  <div class="hdrcntcbx mblhdrcntcbx">
131
+ <?php _e("For any query, contact us at <span><a href=\"tel:+1 (415) 968-6313\">+1 (415) 968-6313</a></span>","conversios"); ?>
132
  </div>
133
  </div>
134
  </div>
149
  $conversios_menu_list = array(
150
  'conversios' => array(
151
  'title'=>'Dashboard',
152
+ 'icon'=>esc_url(ENHANCAD_PLUGIN_URL."/admin/images/conversios-menu.png"),
153
+ 'acitve_icon'=>esc_url(ENHANCAD_PLUGIN_URL."/admin/images/active-conversios-menu.png")
154
  ),
155
  'conversios-google-analytics'=>array('title'=>'Google Analytics'),
156
  'conversios-google-ads'=>array('title'=>'Google Ads'),
179
  $is_active = $this->is_active_menu($key);
180
  $icon = "";
181
  if(!isset($value['icon']) && !isset($value['acitve_icon'])){
182
+ $icon = esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/'.$key.'-menu.png');
183
  if($is_active == 'active'){
184
+ $icon = esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/'.$is_active.'-'.$key.'-menu.png');
185
  }
186
  }else{
187
  $icon = (isset($value['icon']))?$value['icon']:((isset($value['acitve_icon']))?$value['acitve_icon']:"");
205
  </div>
206
  </div>
207
  <?php
208
+ }
 
209
  }
 
210
  }
211
  }
212
  new Conversios_Header();
admin/partials/enhanced-ecommerce-google-analytics-admin-display.php DELETED
@@ -1,113 +0,0 @@
1
- <?php
2
- /**
3
- * Provide a admin area view for the plugin
4
- *
5
- * This file is used to markup the admin-facing aspects of the plugin.
6
- *
7
- * @link tatvic.com
8
- * @since 1.0.0
9
- *
10
- * @package Enhanced_Ecommerce_Google_Analytics
11
- * @subpackage Enhanced_Ecommerce_Google_Analytics/admin/partials
12
- *
13
- */
14
- if (!defined('ABSPATH')) {
15
- exit;
16
- }
17
- class TVC_Tabs {
18
- protected $TVC_Admin_Helper;
19
- protected $site_url;
20
- protected $google_detail;
21
- public function __construct() {
22
- $this->TVC_Admin_Helper = new TVC_Admin_Helper();
23
- $this->site_url = "admin.php?page=conversios";
24
- $this->google_detail = $this->TVC_Admin_Helper->get_ee_options_data();
25
- $this->create_tabs();
26
- }
27
- protected function info_htnml($validation){
28
- if($validation == true){
29
- return '<img src="'.ENHANCAD_PLUGIN_URL.'/admin/images/config-success.svg" alt="configuration success" class="config-success">';
30
- }else{
31
- return '<img src="'.ENHANCAD_PLUGIN_URL.'/admin/images/exclaimation.png" alt="configuration success" class="config-fail">';
32
- }
33
- }
34
- /* add active tab class */
35
- protected function is_active_tabs($page=""){
36
- if($page!="" && isset($_GET['page']) && $_GET['page'] == $page){
37
- return "active";
38
- }
39
- return ;
40
- }
41
-
42
- protected function create_tabs(){
43
- $setting_status = $this->TVC_Admin_Helper->check_setting_status();
44
- $googleDetail = [];
45
- $plan_id = 1;
46
- if(isset($this->google_detail['setting'])){
47
- if ($this->google_detail['setting']) {
48
- $googleDetail = $this->google_detail['setting'];
49
- if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
50
- $plan_id = $googleDetail->plan_id;
51
- }
52
- }
53
- }
54
- ?>
55
- <ul class="nav nav-pills nav-justified">
56
- <li class="nav-item">
57
- <div class="tvc-tooltip <?php echo $this->is_active_tabs('conversios'); ?>">
58
- <?php if(isset($setting_status['google_analytic']) && $setting_status['google_analytic'] == false ){?>
59
- <?php echo (isset($setting_status['google_analytic_msg'])?'<span class="tvc-tooltiptext tvc-tooltip-right">'.$setting_status['google_analytic_msg'].'</span>':"") ?>
60
- <?php }?>
61
- <div class="nav-item nav-link <?php echo $this->is_active_tabs('conversios'); ?>">
62
- <?php if(isset($setting_status['google_analytic']) ){
63
- echo $this->info_htnml($setting_status['google_analytic']);
64
- }?>
65
- <a href="<?php echo $this->site_url; ?>" class=""> Google Analytics</a>
66
- </div>
67
- </div>
68
- </li>
69
- <li class="nav-item">
70
- <div class="tvc-tooltip <?php echo $this->is_active_tabs('conversios-google-ads'); ?>">
71
- <?php if(isset($setting_status['google_ads']) && $setting_status['google_ads'] == false ){?>
72
- <?php echo (isset($setting_status['google_ads'])?'<span class="tvc-tooltiptext tvc-tooltip-right">'.$setting_status['google_ads_msg'].'</span>':"") ?>
73
- <?php } ?>
74
- <div class="nav-link <?php echo $this->is_active_tabs('conversios-google-ads'); ?>">
75
- <?php if(isset($setting_status['google_ads']) ){
76
- echo $this->info_htnml($setting_status['google_ads']);
77
- }?>
78
- <a href="<?php echo $this->site_url.'-google-ads'; ?>" class="">Google Ads</a>
79
- </div>
80
- </li>
81
- <?php
82
- /*$sub_tab_active="";
83
- if(isset($_GET['tab']) && $_GET['tab'] == 'conversios-google-shopping-feed'){
84
- $sub_tab_active="active";
85
- }*/
86
- ?>
87
- <li class="nav-item">
88
- <div class="tvc-tooltip <?php echo $this->is_active_tabs('conversios-google-shopping-feed'); ?>">
89
- <?php if(isset($setting_status['google_shopping']) && $setting_status['google_shopping'] == false ){
90
- echo (isset($setting_status['google_shopping_msg'])?'<span class="tvc-tooltiptext tvc-tooltip-right">'.$setting_status['google_shopping_msg'].'</span>':"");
91
- } ?>
92
- <div class="nav-link <?php echo $this->is_active_tabs('conversios-google-shopping-feed'); ?>">
93
- <?php if(isset($setting_status['google_shopping']) ){
94
- echo $this->info_htnml($setting_status['google_shopping']);
95
- } ?>
96
- <a href="<?php echo $this->site_url.'-google-shopping-feed'; ?>" class="">Google Shopping</a>
97
- </div>
98
- </li>
99
- <?php if($plan_id ==1){?>
100
- <li class="nav-item tvc-new-freevspro-nav-item">
101
- <div class="nav-link <?php echo $this->is_active_tabs('conversios-pricings'); ?>">
102
- <span class="tvc-new-freevspro">New</span>
103
- <a href="<?php echo $this->site_url.'-pricings'; ?>" class="">Free Vs Pro</a>
104
- </div>
105
- </li>
106
- <?php } ?>
107
- <li class="tvc-help-need">
108
- For any query, reach out to us at <a href="tel:+1 (415) 968-6313">+1 (415) 968-6313</a>
109
- </li>
110
- </ul>
111
- <?php
112
- }
113
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/partials/general-fields.php CHANGED
@@ -83,15 +83,15 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
83
  $googleDetail->is_domain_claim = '1';
84
  }
85
  }
86
- $_POST['subscription_id'] = $googleDetail->id;
87
  $_POST['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && $googleDetail->enhanced_e_commerce_tracking == "1") ? "on" : "";
88
 
89
  $_POST['ga_ST'] = (isset($googleDetail->add_gtag_snippet) && $googleDetail->add_gtag_snippet == "1") ? "on" : "";
90
- $_POST['gm_id'] = $googleDetail->measurement_id;
91
- $_POST['ga_id'] = $googleDetail->property_id;
92
- $_POST['google_ads_id'] = $googleDetail->google_ads_id;
93
- $_POST['google_merchant_id'] = $googleDetail->google_merchant_center_id;
94
- $_POST['tracking_option'] = $googleDetail->tracking_option;
95
  $_POST['ga_gUser'] = 'on';
96
  //$_POST['ga_gCkout'] = 'on';
97
  $_POST['ga_Impr'] = 6;
@@ -101,7 +101,7 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
101
  $_POST['google-analytic'] = '';
102
  //update option in wordpress local database
103
  update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
104
- update_option('ads_tracking_id', $googleDetail->google_ads_id);
105
  update_option('ads_ert', $googleDetail->remarketing_tags);
106
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
107
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
@@ -115,10 +115,10 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
115
  $TVC_Admin_Helper->update_remarketing_snippets();
116
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
117
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
118
- wp_redirect("admin.php?page=conversios-google-shopping-feed&tab=sync_product_page&welcome_msg=true");
119
  exit;
120
  }else{
121
- wp_redirect("admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page&welcome_msg=true");
122
  exit;
123
  }
124
  }
@@ -127,7 +127,7 @@ if (isset($_GET['connect']) && isset($_GET['subscription_id'])) {
127
  } else if(isset($_GET['connect']) && !isset($_POST['ee_submit_plugin'])) {
128
  $googleDetail = [];
129
  $class = 'alert-message tvc-alert-error';
130
- $message_p = esc_html__('Google analytic detail is empty.');
131
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message_p));
132
  }else{
133
  $TVC_Admin_Helper->is_ee_options_data_empty();
@@ -147,7 +147,7 @@ if (isset($_POST['ee_submit_plugin'])) {
147
 
148
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
149
  $class = 'alert-message tvc-alert-success';
150
- $message_p = __( 'Your settings have been saved.', 'sample-text-domain' );
151
  /* API Save */
152
  /*if(isset($_POST['ga_eeT'])){
153
  $_POST['enhanced_e_commerce_tracking']=($_POST['ga_eeT']=="on")?1:0;
@@ -203,13 +203,13 @@ if(isset($google_detail['setting'])){
203
  <?php if($plan_id == 1){?>
204
  <div class="licence tvc-licence" >
205
  <div class="tvc_licence_key_wapper <?php if($plan_id != 1){?>tvc-hide<?php }?>">
206
- <p>You are using our free plugin, no licence needed ! Happy analyzing..!! :)</p>
207
- <p class="font-weight-bold">To unlock more features of google products, consider our <a href="<?php echo $TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Google+Analytics+Screen+pro+version&utm_campaign=Upsell+at+Conversios'; ?>" target="_blank">pro version.</a></p>
208
  <form method="post" name="google-analytic" id="tvc-licence-active">
209
  <div class="input-group">
210
- <input type="text" id="licence_key" name="licence_key" class="form-control" placeholder="Already purchased? Enter licence key" required="">
211
  <div class="input-group-append">
212
- <button type="submit" class="btn btn-primary" name="verify-licence-key"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/right-arrow.svg'; ?>" alt="active licence key"></button>
213
  </div>
214
  </div>
215
  </form>
@@ -220,72 +220,72 @@ if(isset($google_detail['setting'])){
220
  <div class="google-account-analytics">
221
  <div class="row mb-3">
222
  <div class="col-6 col-md-6 col-lg-6">
223
- <h2 class="ga-title">Connected Google Analytics Account:</h2>
224
  </div>
225
  <div class="col-6 col-md-6 col-lg-6 text-right">
226
  <div class="acc-num">
227
  <p class="ga-text">
228
- <?php echo ((isset($data['ga_id']) && $data['ga_id'] != '') ? $data['ga_id'] : '<span>Get started</span>'); ?>
229
  </p>
230
  <?php
231
  if (isset($data['ga_id']) && $data['ga_id'] != '') {
232
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
233
  } else {
234
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
235
  }?>
236
  </div>
237
  </div>
238
  </div>
239
  <div class="row mb-3">
240
  <div class="col-6 col-md-6 col-lg-6">
241
- <h2 class="ga-title">Connected Google Analytics 4 Account:</h2>
242
  </div>
243
  <div class="col-6 col-md-6 col-lg-6 text-right">
244
  <div class="acc-num">
245
  <p class="ga-text">
246
- <?php echo ((isset($data['gm_id']) && $data['gm_id'] != '') ? $data['gm_id'] : '<span>Get started</span>'); ?>
247
  </p>
248
  <?php
249
- if (isset($data['gm_id']) && $data['gm_id'] != '') {
250
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
251
  } else {
252
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
253
  }?>
254
  </div>
255
  </div>
256
  </div>
257
  <div class="row mb-3">
258
  <div class="col-6 col-md-6 col-lg-6">
259
- <h2 class="ga-title">Linked Google Ads Account:</h2>
260
  </div>
261
  <div class="col-6 col-md-6 col-lg-6 text-right">
262
  <div class="acc-num">
263
  <p class="ga-text">
264
- <?php echo ((isset($data['google_ads_id']) && $data['google_ads_id'] != '') ? $data['google_ads_id'] : '<span>Get started</span>'); ?>
265
  </p>
266
  <?php
267
- if (isset($data['google_ads_id']) && $data['google_ads_id'] != '') {
268
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
269
  } else {
270
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
271
  }?>
272
  </div>
273
  </div>
274
  </div>
275
  <div class="row mb-3">
276
  <div class="col-6 col-md-6 col-lg-6">
277
- <h2 class="ga-title">Linked Google Merchant Center Account:</h2>
278
  </div>
279
  <div class="col-6 col-md-6 col-lg-6 text-right">
280
  <div class="acc-num">
281
  <p class="ga-text">
282
- <?php echo ((isset($data['google_merchant_id']) && $data['google_merchant_id'] != '') ? $data['google_merchant_id'] : '<span>Get started</span>'); ?>
283
  </p>
284
  <?php
285
- if (isset($data['google_merchant_id']) && $data['google_merchant_id'] != '') {
286
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
287
  } else {
288
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
289
  }?>
290
  </div>
291
  </div>
@@ -297,27 +297,27 @@ if(isset($google_detail['setting'])){
297
  <tbody>
298
  <tr>
299
  <th>
300
- <label class="align-middle" for="tracking_code">Tracking Code</label>
301
  </th>
302
  <td>
303
  <label class = "align-middle">
304
  <?php $ga_ST = !empty($data['ga_ST']) ? 'checked' : ''; ?>
305
- <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo $ga_ST; ?> >
306
- <label class="custom-control-label" for="ga_ST">Add Global Site Tracking Code 'gtag.js'</label>
307
 
308
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature adds new gtag.js tracking code to your store. You don't need to enable this if gtag.js is implemented via any third party analytics plugin."></i>
309
  </label><br/>
310
  <label class = "align-middle">
311
  <?php $ga_eeT = !empty($data['ga_eeT']) ? 'checked' : ''; ?>
312
- <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo $ga_eeT; ?> >
313
- <label class="custom-control-label" for="ga_eeT">Add Enhanced Ecommerce Tracking Code</label>
314
 
315
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature adds Enhanced Ecommerce Tracking Code to your Store"></i>
316
  </label><br/>
317
  <label class = "align-middle">
318
  <?php $ga_gUser = !empty($data['ga_gUser']) ? 'checked' : ''; ?>
319
- <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo $ga_gUser; ?> >
320
- <label class="custom-control-label" for="ga_gUser">Add Code to Track the Login Step of Guest Users (Optional)</label>
321
 
322
  <i style="cursor: help;" class="fas fa-question-circle" title="If you have Guest Check out enable, we recommend you to add this code"></i>
323
  </label>
@@ -325,25 +325,25 @@ if(isset($google_detail['setting'])){
325
  </tr>
326
  <tr>
327
  <th>
328
- <label for="ga_Impr">Impression Thresold</label>
329
  </th>
330
  <td>
331
  <?php $ga_Impr = !empty($data['ga_Impr']) ? $data['ga_Impr'] : 6; ?>
332
- <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo $ga_Impr; ?>">
333
  <label for="ga_Impr"></label>
334
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions."></i>
335
- <p class="description"><b>Note : To avoid processing load on server we recommend upto 6 Impression Thresold.</b></p>
336
  </td>
337
  </tr>
338
  <tr>
339
  <th>
340
- <label class = "align-middle" for="ga_IPA">I.P. Anoymization</label>
341
  </th>
342
  <td>
343
  <label class = "align-middle">
344
  <?php $ga_IPA = !empty($data['ga_IPA']) ? 'checked' : ''; ?>
345
- <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo $ga_IPA; ?>>
346
- <label class="custom-control-label" for="ga_IPA">Enable I.P. Anonymization</label>
347
 
348
  <i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to anonymize (or stop collecting) the I.P Address of your users in Google Analytics. Be in legal compliance by using I.P Anonymization which is important for EU countries As per the GDPR compliance"></i>
349
  </label>
@@ -351,13 +351,13 @@ if(isset($google_detail['setting'])){
351
  </tr>
352
  <tr>
353
  <th>
354
- <label class = "align-middle" for="ga_OPTOUT">Google Analytics Opt Out</label>
355
  </th>
356
  <td>
357
  <label class = "align-middle">
358
  <?php $ga_OPTOUT = !empty($data['ga_OPTOUT']) ? 'checked' : ''; ?>
359
- <input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo $ga_OPTOUT; ?>>
360
- <label class="custom-control-label" for="ga_OPTOUT">Enable Google Analytics Opt Out (Optional)</label>
361
 
362
  <i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to provide website visitors the ability to prevent their data from being used by Google Analytics As per the GDPR compliance.Go through the documentation to check the setup"></i>
363
  </label>
@@ -365,27 +365,27 @@ if(isset($google_detail['setting'])){
365
  </tr>
366
  <tr>
367
  <th>
368
- <label class = "align-middle" for="ga_PrivacyPolicy">Privacy Policy</label>
369
  </th>
370
  <td>
371
  <label class = "align-middle">
372
  <?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy']) ? 'checked' : ''; ?>
373
- <input type="checkbox" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo $ga_PrivacyPolicy; ?>>
374
- <label class="custom-control-label" for="ga_PrivacyPolicy">Accept Privacy Policy of Plugin</label>
375
 
376
- <p class="description">By using Tatvic Plugin, you agree to Tatvic plugin's <a href= "https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_premium_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank">Privacy Policy</a></p>
377
  </label>
378
  </td>
379
  </tr>
380
  </tbody>
381
  </table>
382
  <p class="submit save-for-later" id="save-for-later">
383
- <input type="hidden" id="ga_id" name = "ga_id" value="<?= (!empty($data['ga_id']))?$data['ga_id']:""; ?>"/>
384
- <input type="hidden" id="gm_id" name = "gm_id" value="<?= (!empty($data['gm_id']))?$data['gm_id']:""; ?>"/>
385
- <input type="hidden" id="google_ads_id" name = "google_ads_id" value="<?= (!empty($data['google_ads_id']))?$data['google_ads_id']:""; ?>"/>
386
- <input type="hidden" id="google_merchant_id" name = "google_merchant_id" value="<?= (!empty($data['google_merchant_id']))?$data['google_merchant_id']:""; ?>"/>
387
- <input type="hidden" name="subscription_id" value="<?php echo (!empty($data['subscription_id']))?$data['subscription_id']:""; ?>">
388
- <button type="submit" class="btn btn-primary" id="ee_submit_plugin" name="ee_submit_plugin">Save</button>
389
  </p>
390
  </form>
391
  </div>
@@ -396,7 +396,7 @@ if(isset($google_detail['setting'])){
396
  </div>
397
  </div>
398
  </div>
399
- <?php echo get_connect_google_popup_html();
400
  echo get_connect_google_popup_html_to_active_licence();
401
  ?>
402
  <script>
83
  $googleDetail->is_domain_claim = '1';
84
  }
85
  }
86
+ $_POST['subscription_id'] = esc_attr($googleDetail->id);
87
  $_POST['ga_eeT'] = (isset($googleDetail->enhanced_e_commerce_tracking) && $googleDetail->enhanced_e_commerce_tracking == "1") ? "on" : "";
88
 
89
  $_POST['ga_ST'] = (isset($googleDetail->add_gtag_snippet) && $googleDetail->add_gtag_snippet == "1") ? "on" : "";
90
+ $_POST['gm_id'] = esc_attr($googleDetail->measurement_id);
91
+ $_POST['ga_id'] = esc_attr($googleDetail->property_id);
92
+ $_POST['google_ads_id'] = esc_attr($googleDetail->google_ads_id);
93
+ $_POST['google_merchant_id'] = esc_attr($googleDetail->google_merchant_center_id);
94
+ $_POST['tracking_option'] = esc_attr($googleDetail->tracking_option);
95
  $_POST['ga_gUser'] = 'on';
96
  //$_POST['ga_gCkout'] = 'on';
97
  $_POST['ga_Impr'] = 6;
101
  $_POST['google-analytic'] = '';
102
  //update option in wordpress local database
103
  update_option('google_ads_conversion_tracking', $googleDetail->google_ads_conversion_tracking);
104
+ update_option('ads_tracking_id', esc_attr($googleDetail->google_ads_id));
105
  update_option('ads_ert', $googleDetail->remarketing_tags);
106
  update_option('ads_edrt', $googleDetail->dynamic_remarketing_tags);
107
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
115
  $TVC_Admin_Helper->update_remarketing_snippets();
116
  if(isset($googleDetail->google_merchant_center_id) || isset($googleDetail->google_ads_id) ){
117
  if( $googleDetail->google_merchant_center_id != "" && $googleDetail->google_ads_id != ""){
118
+ wp_redirect(esc_url("admin.php?page=conversios-google-shopping-feed&tab=sync_product_page&welcome_msg=true"));
119
  exit;
120
  }else{
121
+ wp_redirect(esc_url("admin.php?page=conversios-google-shopping-feed&tab=gaa_config_page&welcome_msg=true"));
122
  exit;
123
  }
124
  }
127
  } else if(isset($_GET['connect']) && !isset($_POST['ee_submit_plugin'])) {
128
  $googleDetail = [];
129
  $class = 'alert-message tvc-alert-error';
130
+ $message_p = esc_html__("Google analytic detail is empty.", "conversios");
131
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message_p));
132
  }else{
133
  $TVC_Admin_Helper->is_ee_options_data_empty();
147
 
148
  Enhanced_Ecommerce_Google_Settings::add_update_settings('ee_options');
149
  $class = 'alert-message tvc-alert-success';
150
+ $message_p = __( 'Your settings have been saved.', 'conversios' );
151
  /* API Save */
152
  /*if(isset($_POST['ga_eeT'])){
153
  $_POST['enhanced_e_commerce_tracking']=($_POST['ga_eeT']=="on")?1:0;
203
  <?php if($plan_id == 1){?>
204
  <div class="licence tvc-licence" >
205
  <div class="tvc_licence_key_wapper <?php if($plan_id != 1){?>tvc-hide<?php }?>">
206
+ <p><?php _e("You are using our free plugin, no licence needed ! Happy analyzing..!! :)","conversios"); ?></p>
207
+ <p class="font-weight-bold"><?php _e("To unlock more features of google products, consider our","conversios"); ?> <a href="<?php echo $TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Google+Analytics+Screen+pro+version&utm_campaign=Upsell+at+Conversios'; ?>" target="_blank"><?php _e("pro version.","conversios"); ?></a></p>
208
  <form method="post" name="google-analytic" id="tvc-licence-active">
209
  <div class="input-group">
210
+ <input type="text" id="licence_key" name="licence_key" class="form-control" placeholder="<?php _e("Already purchased? Enter licence key","conversios"); ?>" required="">
211
  <div class="input-group-append">
212
+ <button type="submit" class="btn btn-primary" name="verify-licence-key"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/right-arrow.svg'); ?>" alt="active licence key"></button>
213
  </div>
214
  </div>
215
  </form>
220
  <div class="google-account-analytics">
221
  <div class="row mb-3">
222
  <div class="col-6 col-md-6 col-lg-6">
223
+ <h2 class="ga-title"><?php _e("Connected Google Analytics Account:","conversios"); ?></h2>
224
  </div>
225
  <div class="col-6 col-md-6 col-lg-6 text-right">
226
  <div class="acc-num">
227
  <p class="ga-text">
228
+ <?php echo (isset($data['ga_id']) && $data['ga_id'] != '') ? $data['ga_id'] : '<span>'.__("Get started","conversios").'</span>'; ?>
229
  </p>
230
  <?php
231
  if (isset($data['ga_id']) && $data['ga_id'] != '') {
232
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'.esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
233
  } else {
234
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
235
  }?>
236
  </div>
237
  </div>
238
  </div>
239
  <div class="row mb-3">
240
  <div class="col-6 col-md-6 col-lg-6">
241
+ <h2 class="ga-title"><?php _e("Connected Google Analytics 4 Account:","conversios"); ?></h2>
242
  </div>
243
  <div class="col-6 col-md-6 col-lg-6 text-right">
244
  <div class="acc-num">
245
  <p class="ga-text">
246
+ <?php echo (isset($data['gm_id']) && $data['gm_id'] != '') ? $data['gm_id'] : '<span>'.__("Get started","conversios").'</span>'; ?>
247
  </p>
248
  <?php
249
+ if (isset($data['gm_id']) && esc_attr($data['gm_id']) != '') {
250
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
251
  } else {
252
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
253
  }?>
254
  </div>
255
  </div>
256
  </div>
257
  <div class="row mb-3">
258
  <div class="col-6 col-md-6 col-lg-6">
259
+ <h2 class="ga-title"><?php _e("Linked Google Ads Account:","conversios"); ?></h2>
260
  </div>
261
  <div class="col-6 col-md-6 col-lg-6 text-right">
262
  <div class="acc-num">
263
  <p class="ga-text">
264
+ <?php echo (isset($data['google_ads_id']) && $data['google_ads_id'] != '') ? $data['google_ads_id'] : '<span>'.__("Get started","conversios").'</span>'; ?>
265
  </p>
266
  <?php
267
+ if (isset($data['google_ads_id']) && esc_attr($data['google_ads_id']) != '') {
268
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
269
  } else {
270
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
271
  }?>
272
  </div>
273
  </div>
274
  </div>
275
  <div class="row mb-3">
276
  <div class="col-6 col-md-6 col-lg-6">
277
+ <h2 class="ga-title"><?php _e("Linked Google Merchant Center Account:","conversios"); ?></h2>
278
  </div>
279
  <div class="col-6 col-md-6 col-lg-6 text-right">
280
  <div class="acc-num">
281
  <p class="ga-text">
282
+ <?php echo (isset($data['google_merchant_id']) && $data['google_merchant_id'] != '') ? $data['google_merchant_id'] : '<span>'.__("Get started","conversios").'</span>'; ?>
283
  </p>
284
  <?php
285
+ if (isset($data['google_merchant_id']) && esc_attr($data['google_merchant_id']) != '') {
286
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
287
  } else {
288
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
289
  }?>
290
  </div>
291
  </div>
297
  <tbody>
298
  <tr>
299
  <th>
300
+ <label class="align-middle" for="tracking_code"><?php _e("Tracking Code","conversios"); ?></label>
301
  </th>
302
  <td>
303
  <label class = "align-middle">
304
  <?php $ga_ST = !empty($data['ga_ST']) ? 'checked' : ''; ?>
305
+ <input type="checkbox" name="ga_ST" id="ga_ST" <?php echo esc_attr($ga_ST); ?> >
306
+ <label class="custom-control-label" for="ga_ST"><?php _e("Add Global Site Tracking Code 'gtag.js'","conversios"); ?></label>
307
 
308
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature adds new gtag.js tracking code to your store. You don't need to enable this if gtag.js is implemented via any third party analytics plugin."></i>
309
  </label><br/>
310
  <label class = "align-middle">
311
  <?php $ga_eeT = !empty($data['ga_eeT']) ? 'checked' : ''; ?>
312
+ <input type="checkbox" name="ga_eeT" id="ga_eeT" <?php echo esc_attr($ga_eeT); ?> >
313
+ <label class="custom-control-label" for="ga_eeT"><?php _e("Add Enhanced Ecommerce Tracking Code","conversios"); ?></label>
314
 
315
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature adds Enhanced Ecommerce Tracking Code to your Store"></i>
316
  </label><br/>
317
  <label class = "align-middle">
318
  <?php $ga_gUser = !empty($data['ga_gUser']) ? 'checked' : ''; ?>
319
+ <input type="checkbox" name="ga_gUser" id="ga_gUser" <?php echo esc_attr($ga_gUser); ?> >
320
+ <label class="custom-control-label" for="ga_gUser"><?php _e("Add Code to Track the Login Step of Guest Users (Optional)","conversios"); ?></label>
321
 
322
  <i style="cursor: help;" class="fas fa-question-circle" title="If you have Guest Check out enable, we recommend you to add this code"></i>
323
  </label>
325
  </tr>
326
  <tr>
327
  <th>
328
+ <label for="ga_Impr"><?php _e("Impression Thresold","conversios"); ?></label>
329
  </th>
330
  <td>
331
  <?php $ga_Impr = !empty($data['ga_Impr']) ? $data['ga_Impr'] : 6; ?>
332
+ <input type="number" min="1" id="ga_Impr" name = "ga_Impr" value = "<?php echo esc_attr($ga_Impr); ?>">
333
  <label for="ga_Impr"></label>
334
  <i style="cursor: help;" class="fas fa-question-circle" title="This feature sets Impression threshold for category page. It sends hit after these many numbers of products impressions."></i>
335
+ <p class="description"><b><?php _e("Note : To avoid processing load on server we recommend upto 6 Impression Thresold.","conversios"); ?></b></p>
336
  </td>
337
  </tr>
338
  <tr>
339
  <th>
340
+ <label class = "align-middle" for="ga_IPA"><?php _e("I.P. Anoymization","conversios"); ?></label>
341
  </th>
342
  <td>
343
  <label class = "align-middle">
344
  <?php $ga_IPA = !empty($data['ga_IPA']) ? 'checked' : ''; ?>
345
+ <input class="" type="checkbox" name="ga_IPA" id="ga_IPA" <?php echo esc_attr($ga_IPA); ?>>
346
+ <label class="custom-control-label" for="ga_IPA"><?php _e("Enable I.P. Anonymization","conversios"); ?></label>
347
 
348
  <i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to anonymize (or stop collecting) the I.P Address of your users in Google Analytics. Be in legal compliance by using I.P Anonymization which is important for EU countries As per the GDPR compliance"></i>
349
  </label>
351
  </tr>
352
  <tr>
353
  <th>
354
+ <label class = "align-middle" for="ga_OPTOUT"><?php _e("Google Analytics Opt Out","conversios"); ?></label>
355
  </th>
356
  <td>
357
  <label class = "align-middle">
358
  <?php $ga_OPTOUT = !empty($data['ga_OPTOUT']) ? 'checked' : ''; ?>
359
+ <input class="" type="checkbox" name="ga_OPTOUT" id="ga_OPTOUT" <?php echo esc_attr($ga_OPTOUT); ?>>
360
+ <label class="custom-control-label" for="ga_OPTOUT"><?php _e("Enable Google Analytics Opt Out (Optional)","conversios"); ?></label>
361
 
362
  <i style="cursor: help;" class="fas fa-question-circle" title="Use this feature to provide website visitors the ability to prevent their data from being used by Google Analytics As per the GDPR compliance.Go through the documentation to check the setup"></i>
363
  </label>
365
  </tr>
366
  <tr>
367
  <th>
368
+ <label class = "align-middle" for="ga_PrivacyPolicy"><?php _e("Privacy Policy","conversios"); ?></label>
369
  </th>
370
  <td>
371
  <label class = "align-middle">
372
  <?php $ga_PrivacyPolicy = !empty($data['ga_PrivacyPolicy']) ? 'checked' : ''; ?>
373
+ <input type="checkbox" name="ga_PrivacyPolicy" id="ga_PrivacyPolicy" required="required" <?php echo esc_attr($ga_PrivacyPolicy); ?>>
374
+ <label class="custom-control-label" for="ga_PrivacyPolicy"><?php _e("Accept Privacy Policy of Plugin","conversios"); ?></label>
375
 
376
+ <p class="description"><?php _e("By using Tatvic Plugin, you agree to Tatvic plugin's","conversios"); ?> <a href= "https://www.tatvic.com/privacy-policy/?ref=plugin_policy&utm_source=plugin_backend&utm_medium=woo_premium_plugin&utm_campaign=GDPR_complaince_ecomm_plugins" target="_blank"><?php _e("Privacy Policy","conversios"); ?></a></p>
377
  </label>
378
  </td>
379
  </tr>
380
  </tbody>
381
  </table>
382
  <p class="submit save-for-later" id="save-for-later">
383
+ <input type="hidden" id="ga_id" name = "ga_id" value="<?= esc_attr((!empty($data['ga_id']))?$data['ga_id']:""); ?>"/>
384
+ <input type="hidden" id="gm_id" name = "gm_id" value="<?= esc_attr((!empty($data['gm_id']))?$data['gm_id']:""); ?>"/>
385
+ <input type="hidden" id="google_ads_id" name = "google_ads_id" value="<?= esc_attr((!empty($data['google_ads_id']))?$data['google_ads_id']:""); ?>"/>
386
+ <input type="hidden" id="google_merchant_id" name = "google_merchant_id" value="<?= esc_attr((!empty($data['google_merchant_id']))?$data['google_merchant_id']:""); ?>"/>
387
+ <input type="hidden" name="subscription_id" value="<?php echo esc_attr((!empty($data['subscription_id']))?$data['subscription_id']:""); ?>">
388
+ <button type="submit" class="btn btn-primary" id="ee_submit_plugin" name="ee_submit_plugin"><?php _e("Save","conversios"); ?></button>
389
  </p>
390
  </form>
391
  </div>
396
  </div>
397
  </div>
398
  </div>
399
+ <?php
400
  echo get_connect_google_popup_html_to_active_licence();
401
  ?>
402
  <script>
admin/partials/pricings.php CHANGED
@@ -30,8 +30,8 @@ class TVC_Pricings {
30
  }
31
  }
32
 
33
- $close_icon =ENHANCAD_PLUGIN_URL.'/admin/images/close.png';
34
- $check_icon =ENHANCAD_PLUGIN_URL.'/admin/images/check.png';
35
  ?>
36
  <div class="tab-content">
37
  <?php if($message){
@@ -43,303 +43,303 @@ class TVC_Pricings {
43
  <div class="tvc-container">
44
  <div class="clearfix">
45
  <div class="row-heading clearfix">
46
- <div class="column tvc-blank-col"><span>Features</span></div>
47
  <div class="column discounted tvc-free-plan">
48
- <div class="name-wrap"><div class="name">STARTER</div></div>
49
  <div class="tvc-list-price">
50
- <div class="price-current"><span class="inner">FREE</span></div>
51
- <div class="tvc_month_free">FOREVER FREE</div>
52
  </div>
53
  <span>
54
- <a href="javascript:void(0)" class="btn tvc-btn">Currently Active</a>
55
  </span>
56
  </div>
57
  <div class="column discounted ">
58
- <div class="name-wrap"><div class="name">HUSTLE</div></div>
59
  <div class="tvc-list-price-month">
60
  <div class="tvc-list-price">
61
  <div class="price-normal">
62
- <span>$39.00</span>
63
- <div class="tvc-plan-off">50% OFF</div>
64
  </div>
65
- <div class="price-current"><span class="inner">$19<span>/month</span></span></div>
66
- <div class="tvc_month_free">Limited Offer</div>
67
  </div>
68
- <a target="_blank" href="https://conversios.io/checkout/?pid=plan_1_m&utm_source=EE+Plugin+User+Interface&utm_medium=HUSTLE&utm_campaign=Upsell+at+Conversios" class="btn tvc-btn">Get Started</a>
69
  </div>
70
  </div>
71
  <div class="column discounted popular">
72
  <div class="tvc_popular">
73
- <div class="tvc_popular_inner">POPULAR</div>
74
  </div>
75
  <div class="name-wrap">
76
- <div class="name">GROWTH</div>
77
  </div>
78
  <div class="tvc-list-price-month">
79
  <div class="tvc-list-price">
80
- <div class="price-normal"><span>$59.00</span>
81
- <div class="tvc-plan-off">50% OFF</div>
82
  </div>
83
- <div class="price-current"><span class="inner">$29<span>/month</span></span></div>
84
- <div class="tvc_month_free">Limited Offer</div>
85
  </div>
86
- <a target="_blank" href="https://conversios.io/checkout/?pid=plan_2_m&utm_source=EE+Plugin+User+Interface&utm_medium=GROWTH&utm_campaign=Upsell+at+Conversios" class="btn tvc-btn">Get Started</a>
87
  </div>
88
  </div>
89
  <div class="column discounted ">
90
  <div class="name-wrap">
91
- <div class="name">LEAP</div>
92
  </div>
93
  <div class="tvc-list-price-month">
94
  <div class="tvc-list-price">
95
- <div class="price-normal"><span>$99.00</span>
96
- <div class="tvc-plan-off">50% OFF</div>
97
  </div>
98
- <div class="price-current"><span class="inner">$49<span>/month</span></span></div>
99
- <div class="tvc_month_free">Limited Offer</div>
100
  </div>
101
- <a target="_blank" href="https://conversios.io/checkout/?pid=plan_3_m&utm_source=EE+Plugin+User+Interface&utm_medium=LEAP&utm_campaign=Upsell+at+Conversios" class="btn tvc-btn">Get Started</a>
102
  </div>
103
  </div>
104
  </div>
105
- <div class="row-subheading clearfix">Google Analytics</div>
106
  <div class="row-feature clearfix">
107
- <div class="column">Universal Analytics Tracking</div>
108
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
109
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
110
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
111
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
112
  </div>
113
  <div class="row-feature clearfix">
114
- <div class="column">Google Analytics 4 Tracking</div>
115
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
116
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
117
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
118
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
119
  </div>
120
  <div class="row-feature clearfix">
121
- <div class="column">Dual Set up (UA + GA4)</div>
122
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
123
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
124
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
125
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
126
  </div>
127
  <div class="row-feature clearfix">
128
- <div class="column">eCommerce tracking</div>
129
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
130
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
131
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
132
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
133
  </div><div class="row-feature clearfix">
134
- <div class="column">Shopping Behavior Analysis</div>
135
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
136
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
137
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
138
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
139
  </div><div class="row-feature clearfix">
140
- <div class="column">Checkout Behavior Tracking</div>
141
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
142
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
143
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
144
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
145
  </div><div class="row-feature clearfix">
146
- <div class="column">Channel Performance Analysis</div>
147
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
148
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
149
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
150
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
151
  </div><div class="row-feature clearfix">
152
- <div class="column">All Pages tracking</div>
153
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
154
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
155
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
156
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
157
  </div><div class="row-feature clearfix">
158
- <div class="column">Google Analytics and Google Ads linking</div>
159
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
160
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
161
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
162
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
163
  </div><div class="row-feature clearfix">
164
- <div class="column">Custom dimensions tracking</div>
165
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
166
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
167
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
168
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
169
  </div><div class="row-feature clearfix">
170
- <div class="column">Custom metrics tracking</div>
171
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
172
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
173
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
174
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
175
  </div><div class="row-feature clearfix">
176
- <div class="column">User id tracking</div>
177
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
178
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
179
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
180
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
181
  </div><div class="row-feature clearfix">
182
- <div class="column">client id tracking</div>
183
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
184
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
185
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
186
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
187
  </div><div class="row-feature clearfix">
188
- <div class="column">Scroll tracking</div>
189
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
190
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
191
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
192
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
193
  </div>
194
  <div class="row-feature clearfix">
195
- <div class="column">Affiliate performance tracking</div>
196
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
197
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
198
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
199
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
200
  </div>
201
  <div class="row-feature clearfix">
202
- <div class="column">Coupon Performance Tracking</div>
203
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
204
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
205
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
206
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
207
  </div>
208
  <div class="row-feature clearfix">
209
- <div class="column">Actionable Dashboard</div>
210
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
211
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
212
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
213
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
214
  </div>
215
  <div class="row-feature clearfix">
216
- <div class="column">Menu tracking</div>
217
- <div class="column">(Upcoming)</div>
218
- <div class="column">(Upcoming)</div>
219
- <div class="column popular">(Upcoming)</div>
220
- <div class="column">(Upcoming)</div>
221
  </div>
222
  <div class="row-feature clearfix">
223
- <div class="column">Search Query Tracking</div>
224
- <div class="column">(Upcoming)</div>
225
- <div class="column">(Upcoming)</div>
226
- <div class="column popular">(Upcoming)</div>
227
- <div class="column">(Upcoming)</div>
228
  </div>
229
- <div class="row-subheading clearfix">Google Shopping</div>
230
  <div class="row-feature clearfix">
231
- <div class="column">Google Merchant Center account management</div>
232
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
233
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
234
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
235
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
236
  </div><div class="row-feature clearfix">
237
- <div class="column">Site verification</div>
238
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
239
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
240
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
241
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
242
  </div><div class="row-feature clearfix">
243
- <div class="column">Domain claim</div>
244
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
245
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
246
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
247
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
248
  </div><div class="row-feature clearfix">
249
- <div class="column">Products Sync via Content API</div>
250
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 100)</div>
251
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 1000)</div>
252
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 5000)</div>
253
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Unlimited)</div>
254
  </div><div class="row-feature clearfix">
255
- <div class="column">Automatic Products Update</div>
256
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 100)</div>
257
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 1000)</div>
258
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 5000)</div>
259
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Unlimited)</div>
260
  </div><div class="row-feature clearfix">
261
- <div class="column">Schedule Product Sync</div>
262
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
263
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
264
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
265
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
266
  </div><div class="row-feature clearfix">
267
- <div class="column">Smart Shopping Campaign management</div>
268
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
269
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
270
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
271
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
272
  </div><div class="row-feature clearfix">
273
- <div class="column">Smart Shopping reports</div>
274
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
275
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
276
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
277
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
278
  </div><div class="row-feature clearfix">
279
- <div class="column">Google Ads and Google Merchant Center account linking</div>
280
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
281
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
282
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
283
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
284
  </div><div class="row-feature clearfix">
285
- <div class="column">Remarketing tags</div>
286
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
287
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
288
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
289
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
290
  </div><div class="row-feature clearfix">
291
- <div class="column">Dynamic Remarketing Tags for eCommerce events</div>
292
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Limited)</div>
293
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
294
- <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
295
- <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Complete)</div>
296
  </div><div class="row-feature clearfix">
297
- <div class="column">Google Ads Conversion tracking</div>
298
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
299
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
300
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
301
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
302
  </div><div class="row-feature clearfix">
303
- <div class="column">Product filters for selected products sync</div>
304
- <div class="column">(Upcoming)</div>
305
- <div class="column">(Upcoming)</div>
306
- <div class="column popular">(Upcoming)</div>
307
- <div class="column">(Upcoming)</div>
308
  </div><div class="row-feature clearfix">
309
- <div class="column">Product filter for Smart Shopping Campaign</div>
310
- <div class="column">(Upcoming)</div>
311
- <div class="column">(Upcoming)</div>
312
- <div class="column popular">(Upcoming)</div>
313
- <div class="column">(Upcoming)</div>
314
  </div>
315
  <div class="row-feature clearfix">
316
- <div class="column">Rule Based Shopping Campaigns</div>
317
- <div class="column">(Upcoming)</div>
318
- <div class="column">(Upcoming)</div>
319
- <div class="column popular">(Upcoming)</div>
320
- <div class="column">(Upcoming)</div>
321
  </div>
322
- <div class="row-subheading clearfix">Support</div>
323
  <div class="row-feature clearfix">
324
- <div class="column">Free Google Analytics Audit</div>
325
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
326
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
327
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
328
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
329
  </div><div class="row-feature clearfix">
330
- <div class="column">Free Consultation with Shopping Expert</div>
331
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
332
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
333
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
334
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
335
  </div><div class="row-feature clearfix">
336
- <div class="column">Dedicated Customer Success Manager</div>
337
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
338
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
339
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
340
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
341
  </div><div class="row-footer clearfix">
342
- <div class="column">Premium Support (24*7)</div>
343
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
344
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
345
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
@@ -350,8 +350,8 @@ class TVC_Pricings {
350
  </div>
351
  <div class="tvc-guarantee">
352
  <div class="guarantee">
353
- <div class="title"><span>15 Days</span>100% No-Risk Money Back Guarantee!</div>
354
- <div class="description">You are fully protected by our 100% No-Risk-Double-Guarantee. If you don’t like over the next 15 days, then we will happily refund 100% of your money. No questions asked.</div>
355
  </div>
356
  </div>
357
  </div>
30
  }
31
  }
32
 
33
+ $close_icon = esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close.png');
34
+ $check_icon = esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/check.png');
35
  ?>
36
  <div class="tab-content">
37
  <?php if($message){
43
  <div class="tvc-container">
44
  <div class="clearfix">
45
  <div class="row-heading clearfix">
46
+ <div class="column tvc-blank-col"><span><?php _e("Features","conversios"); ?></span></div>
47
  <div class="column discounted tvc-free-plan">
48
+ <div class="name-wrap"><div class="name"><?php _e("STARTER","conversios"); ?></div></div>
49
  <div class="tvc-list-price">
50
+ <div class="price-current"><span class="inner"><?php _e("FREE","conversios"); ?></span></div>
51
+ <div class="tvc_month_free"><?php _e("FOREVER FREE","conversios"); ?></div>
52
  </div>
53
  <span>
54
+ <a href="javascript:void(0)" class="btn tvc-btn"><?php _e("Currently Active","conversios"); ?></a>
55
  </span>
56
  </div>
57
  <div class="column discounted ">
58
+ <div class="name-wrap"><div class="name"><?php _e("HUSTLE","conversios"); ?></div></div>
59
  <div class="tvc-list-price-month">
60
  <div class="tvc-list-price">
61
  <div class="price-normal">
62
+ <span><?php _e("$39.00","conversios"); ?></span>
63
+ <div class="tvc-plan-off"><?php _e("50% OFF","conversios"); ?></div>
64
  </div>
65
+ <div class="price-current"><span class="inner"><?php _e("$19<span>/month</span>","conversios"); ?></span></div>
66
+ <div class="tvc_month_free"><?php _e("Limited Offer","conversios"); ?></div>
67
  </div>
68
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/checkout/?pid=plan_1_m&utm_source=EE+Plugin+User+Interface&utm_medium=HUSTLE&utm_campaign=Upsell+at+Conversios"); ?>" class="btn tvc-btn"><?php _e("Get Started","conversios"); ?></a>
69
  </div>
70
  </div>
71
  <div class="column discounted popular">
72
  <div class="tvc_popular">
73
+ <div class="tvc_popular_inner"><?php _e("POPULAR","conversios"); ?></div>
74
  </div>
75
  <div class="name-wrap">
76
+ <div class="name"><?php _e("GROWTH","conversios"); ?></div>
77
  </div>
78
  <div class="tvc-list-price-month">
79
  <div class="tvc-list-price">
80
+ <div class="price-normal"><span><?php _e("$59.00","conversios"); ?></span>
81
+ <div class="tvc-plan-off"><?php _e("50% OFF","conversios"); ?></div>
82
  </div>
83
+ <div class="price-current"><span class="inner"><?php _e("$29<span>/month</span>","conversios"); ?></span></div>
84
+ <div class="tvc_month_free"><?php _e("Limited Offer","conversios"); ?></div>
85
  </div>
86
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/checkout/?pid=plan_2_m&utm_source=EE+Plugin+User+Interface&utm_medium=GROWTH&utm_campaign=Upsell+at+Conversios"); ?>" class="btn tvc-btn"><?php _e("Get Started","conversios"); ?></a>
87
  </div>
88
  </div>
89
  <div class="column discounted ">
90
  <div class="name-wrap">
91
+ <div class="name"><?php _e("LEAP","conversios"); ?></div>
92
  </div>
93
  <div class="tvc-list-price-month">
94
  <div class="tvc-list-price">
95
+ <div class="price-normal"><span><?php _e("$99.00","conversios"); ?></span>
96
+ <div class="tvc-plan-off"><?php _e("50% OFF","conversios"); ?></div>
97
  </div>
98
+ <div class="price-current"><span class="inner"><?php _e("$49<span>/month</span>","conversios"); ?></span></div>
99
+ <div class="tvc_month_free"><?php _e("Limited Offer","conversios"); ?></div>
100
  </div>
101
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/checkout/?pid=plan_3_m&utm_source=EE+Plugin+User+Interface&utm_medium=LEAP&utm_campaign=Upsell+at+Conversios"); ?>" class="btn tvc-btn"><?php _e("Get Started","conversios"); ?></a>
102
  </div>
103
  </div>
104
  </div>
105
+ <div class="row-subheading clearfix"><?php _e("Google Analytics","conversios"); ?></div>
106
  <div class="row-feature clearfix">
107
+ <div class="column"><?php _e("Universal Analytics Tracking","conversios"); ?></div>
108
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
109
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
110
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
111
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
112
  </div>
113
  <div class="row-feature clearfix">
114
+ <div class="column"><?php _e("Google Analytics 4 Tracking","conversios"); ?></div>
115
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
116
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
117
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
118
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
119
  </div>
120
  <div class="row-feature clearfix">
121
+ <div class="column"><?php _e("Dual Set up (UA + GA4)","conversios"); ?></div>
122
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
123
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
124
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
125
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
126
  </div>
127
  <div class="row-feature clearfix">
128
+ <div class="column"><?php _e("eCommerce tracking","conversios"); ?></div>
129
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
130
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
131
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
132
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
133
  </div><div class="row-feature clearfix">
134
+ <div class="column"><?php _e("Shopping Behavior Analysis","conversios"); ?></div>
135
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
136
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
137
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
138
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
139
  </div><div class="row-feature clearfix">
140
+ <div class="column"><?php _e("Checkout Behavior Tracking","conversios"); ?></div>
141
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
142
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
143
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
144
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
145
  </div><div class="row-feature clearfix">
146
+ <div class="column"><?php _e("Channel Performance Analysis","conversios"); ?></div>
147
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
148
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
149
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
150
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
151
  </div><div class="row-feature clearfix">
152
+ <div class="column"><?php _e("All Pages tracking","conversios"); ?></div>
153
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
154
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
155
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
156
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
157
  </div><div class="row-feature clearfix">
158
+ <div class="column"><?php _e("Google Analytics and Google Ads linking","conversios"); ?></div>
159
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
160
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
161
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
162
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
163
  </div><div class="row-feature clearfix">
164
+ <div class="column"><?php _e("Custom dimensions tracking","conversios"); ?></div>
165
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
166
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
167
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
168
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
169
  </div><div class="row-feature clearfix">
170
+ <div class="column"><?php _e("Custom metrics tracking","conversios"); ?></div>
171
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
172
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
173
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
174
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
175
  </div><div class="row-feature clearfix">
176
+ <div class="column"><?php _e("User id tracking","conversios"); ?></div>
177
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
178
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
179
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
180
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
181
  </div><div class="row-feature clearfix">
182
+ <div class="column"><?php _e("Client id tracking","conversios"); ?></div>
183
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
184
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
185
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
186
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
187
  </div><div class="row-feature clearfix">
188
+ <div class="column"><?php _e("Scroll tracking","conversios"); ?></div>
189
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
190
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
191
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
192
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
193
  </div>
194
  <div class="row-feature clearfix">
195
+ <div class="column"><?php _e("Affiliate performance tracking","conversios"); ?></div>
196
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
197
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
198
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
199
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
200
  </div>
201
  <div class="row-feature clearfix">
202
+ <div class="column"><?php _e("Coupon Performance Tracking","conversios"); ?></div>
203
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
204
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
205
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
206
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
207
  </div>
208
  <div class="row-feature clearfix">
209
+ <div class="column"><?php _e("Actionable Dashboard","conversios"); ?></div>
210
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
211
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
212
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
213
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
214
  </div>
215
  <div class="row-feature clearfix">
216
+ <div class="column"><?php _e("Menu tracking","conversios"); ?></div>
217
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
218
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
219
+ <div class="column popular"><?php _e("(Upcoming)","conversios"); ?></div>
220
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
221
  </div>
222
  <div class="row-feature clearfix">
223
+ <div class="column"><?php _e("Search Query Tracking","conversios"); ?></div>
224
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
225
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
226
+ <div class="column popular"><?php _e("(Upcoming)","conversios"); ?></div>
227
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
228
  </div>
229
+ <div class="row-subheading clearfix"><?php _e("Google Shopping","conversios"); ?></div>
230
  <div class="row-feature clearfix">
231
+ <div class="column"><?php _e("Google Merchant Center account management","conversios"); ?></div>
232
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
233
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
234
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
235
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
236
  </div><div class="row-feature clearfix">
237
+ <div class="column"><?php _e("Site verification","conversios"); ?></div>
238
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
239
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
240
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
241
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
242
  </div><div class="row-feature clearfix">
243
+ <div class="column"><?php _e("Domain claim","conversios"); ?></div>
244
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
245
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
246
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
247
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
248
  </div><div class="row-feature clearfix">
249
+ <div class="column"><?php _e("Products Sync via Content API","conversios"); ?></div>
250
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 100)</div>
251
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 1000)</div>
252
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 5000)</div>
253
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Unlimited)</div>
254
  </div><div class="row-feature clearfix">
255
+ <div class="column"><?php _e("Automatic Products Update","conversios"); ?></div>
256
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 100)</div>
257
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 1000)</div>
258
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br>(upto 5000)</div>
259
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br>(Unlimited)</div>
260
  </div><div class="row-feature clearfix">
261
+ <div class="column"><?php _e("Schedule Product Sync","conversios"); ?></div>
262
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
263
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
264
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
265
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
266
  </div><div class="row-feature clearfix">
267
+ <div class="column"><?php _e("Smart Shopping Campaign management","conversios"); ?></div>
268
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
269
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
270
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
271
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
272
  </div><div class="row-feature clearfix">
273
+ <div class="column"><?php _e("Smart Shopping reports","conversios"); ?></div>
274
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
275
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
276
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
277
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
278
  </div><div class="row-feature clearfix">
279
+ <div class="column"><?php _e("Google Ads and Google Merchant Center account linking","conversios"); ?></div>
280
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
281
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
282
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
283
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
284
  </div><div class="row-feature clearfix">
285
+ <div class="column"><?php _e("Remarketing tags","conversios"); ?></div>
286
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
287
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
288
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
289
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
290
  </div><div class="row-feature clearfix">
291
+ <div class="column"><?php _e("Dynamic Remarketing Tags for eCommerce events","conversios"); ?></div>
292
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Limited)","conversios"); ?></div>
293
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
294
+ <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
295
+ <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"><br><?php _e("(Complete)","conversios"); ?></div>
296
  </div><div class="row-feature clearfix">
297
+ <div class="column"><?php _e("Google Ads Conversion tracking","conversios"); ?></div>
298
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
299
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
300
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
301
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
302
  </div><div class="row-feature clearfix">
303
+ <div class="column"><?php _e("Product filters for selected products sync","conversios"); ?></div>
304
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
305
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
306
+ <div class="column popular"><?php _e("(Upcoming)","conversios"); ?></div>
307
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
308
  </div><div class="row-feature clearfix">
309
+ <div class="column"><?php _e("Product filter for Smart Shopping Campaign","conversios"); ?></div>
310
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
311
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
312
+ <div class="column popular"><?php _e("(Upcoming)","conversios"); ?></div>
313
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
314
  </div>
315
  <div class="row-feature clearfix">
316
+ <div class="column"><?php _e("Rule Based Shopping Campaigns","conversios"); ?></div>
317
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
318
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
319
+ <div class="column popular"><?php _e("(Upcoming)","conversios"); ?></div>
320
+ <div class="column"><?php _e("(Upcoming)","conversios"); ?></div>
321
  </div>
322
+ <div class="row-subheading clearfix"><?php _e("Support","conversios"); ?></div>
323
  <div class="row-feature clearfix">
324
+ <div class="column"><?php _e("Free Google Analytics Audit","conversios"); ?></div>
325
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
326
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
327
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
328
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
329
  </div><div class="row-feature clearfix">
330
+ <div class="column"><?php _e("Free Consultation with Shopping Expert","conversios"); ?></div>
331
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
332
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
333
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
334
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
335
  </div><div class="row-feature clearfix">
336
+ <div class="column"><?php _e("Dedicated Customer Success Manager","conversios"); ?></div>
337
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
338
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
339
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
340
  <div class="column"><img src="<?php echo $check_icon; ?>" alt="yes"></div>
341
  </div><div class="row-footer clearfix">
342
+ <div class="column"><?php _e("Premium Support (24*7)","conversios"); ?></div>
343
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
344
  <div class="column"><img src="<?php echo $close_icon; ?>" alt="no"></div>
345
  <div class="column popular "><img src="<?php echo $check_icon; ?>" alt="yes"></div>
350
  </div>
351
  <div class="tvc-guarantee">
352
  <div class="guarantee">
353
+ <div class="title"><?php _e("<span>15 Days</span>100% No-Risk Money Back Guarantee!","conversios"); ?></div>
354
+ <div class="description"><?php _e("You are fully protected by our 100% No-Risk-Double-Guarantee. If you don’t like over the next 15 days, then we will happily refund 100% of your money. No questions asked.","conversios"); ?></div>
355
  </div>
356
  </div>
357
  </div>
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.4.1
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
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.4.1' );
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.5.0
19
  * Author: Tatvic
20
  * Author URI: www.tatvic.com
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.5.0' );
41
  $fullName = plugin_basename( __FILE__ );
42
  $dir = str_replace('/enhanced-ecommerce-google-analytics.php','',$fullName);
43
  if ( ! defined( 'ENHANCAD_PLUGIN_NAME' ) ) {
includes/class-enhanced-ecommerce-google-analytics-activator.php CHANGED
@@ -32,7 +32,7 @@ class Enhanced_Ecommerce_Google_Analytics_Activator {
32
  */
33
  public static function activate() {
34
  if (!is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
35
- wp_die('Hey, It seems WooCommerce plugin is not active on your wp-admin. Enhanced ecommerce plugin can only be activated if you have active WooCommerce plugin in your wp-admin. <br><a href="' . admin_url( 'plugins.php' ) . '">&laquo; Return to Plugins</a>');
36
  }
37
  }
38
  }
32
  */
33
  public static function activate() {
34
  if (!is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
35
+ wp_die(__("Hey, It seems WooCommerce plugin is not active on your wp-admin. Conversios.io - Google Analytics and Google Shopping plugin can only be activated if you have active WooCommerce plugin in your wp-admin.","conversios").' <br><a href="' . esc_url(admin_url( 'plugins.php' )) . '">&laquo; Return to Plugins</a>');
36
  }
37
  }
38
  }
includes/class-enhanced-ecommerce-google-analytics.php CHANGED
@@ -217,7 +217,9 @@ class Enhanced_Ecommerce_Google_Analytics {
217
  if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
218
  $this->loader->run();
219
  }else if( is_plugin_active( 'enhanced-e-commerce-for-woocommerce-store/enhanced-ecommerce-google-analytics.php' ) ){
220
- printf('<div class="notice notice-error"><p>Hey, It seems WooCommerce plugin is not active on your wp-admin. Enhanced ecommerce plugin can only be activated if you have active WooCommerce plugin in your wp-admin.</p></div>');
 
 
221
  }
222
  }
223
  }
@@ -259,11 +261,11 @@ class Enhanced_Ecommerce_Google_Analytics {
259
  $deactivate_link = $links['deactivate'];
260
  unset($links['deactivate']);
261
  $setting_url = 'admin.php?page=conversios-google-analytics';
262
- $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">Settings</a>';
263
 
264
- $links[] = '<a href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq" target="_blank">FAQ</a>';
265
- $links[] = '<a href="https://conversios.io/help-center/Installation-Manual.pdf" target="_blank">Documentation</a>';
266
- $links[] = '<a href="https://conversios.io/pricings/?utm_source=EE+Plugin+User+Interface&utm_medium=Plugins+Listing+Page+Upgrade+to+Premium&utm_campaign=Upsell+at+Conversios" target="_blank"><b>Upgrade to Premium</b></a>';
267
  $links['deactivate'] = $deactivate_link;
268
  return $links;
269
  }
@@ -275,7 +277,7 @@ class Enhanced_Ecommerce_Google_Analytics {
275
 
276
  public function check_dependency(){
277
  if ( function_exists('run_actionable_google_analytics')) {
278
- _e('<div class="error"><p><strong>'. wp_sprintf( 'Note: ' ) .'</strong>'. wp_sprintf( 'It seems <strong>Actionable Google Analytics Plugin</strong> is active on your store. Kindly deactivate it in order to avoid data duplication in GA.' ) .'</p></div>');
279
  die();
280
  }
281
  }
217
  if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
218
  $this->loader->run();
219
  }else if( is_plugin_active( 'enhanced-e-commerce-for-woocommerce-store/enhanced-ecommerce-google-analytics.php' ) ){
220
+ if(!isset($_POST['action'])){
221
+ printf('<div class="notice tvc-notice notice-error"><p>'.__("Hey, It seems WooCommerce plugin is not active on your wp-admin. Conversios.io - Google Analytics and Google Shopping plugin can only be activated if you have active WooCommerce plugin in your wp-admin.","conversios").'</p></div>');
222
+ }
223
  }
224
  }
225
  }
261
  $deactivate_link = $links['deactivate'];
262
  unset($links['deactivate']);
263
  $setting_url = 'admin.php?page=conversios-google-analytics';
264
+ $links[] = '<a href="' . get_admin_url(null, $setting_url) . '">'.__("Settings","conversios").'</a>';
265
 
266
+ $links[] = '<a href="'.esc_url("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq").'" target="_blank">'.__("FAQ","conversios").'</a>';
267
+ $links[] = '<a href="'.esc_url("https://conversios.io/help-center/Installation-Manual.pdf").'" target="_blank">'.__("Documentation","conversios").'</a>';
268
+ $links[] = '<a href="'.esc_url("https://conversios.io/pricings/?utm_source=EE+Plugin+User+Interface&utm_medium=Plugins+Listing+Page+Upgrade+to+Premium&utm_campaign=Upsell+at+Conversios").'" target="_blank"><b>'.__("Upgrade to Premium","conversios").'</b></a>';
269
  $links['deactivate'] = $deactivate_link;
270
  return $links;
271
  }
277
 
278
  public function check_dependency(){
279
  if ( function_exists('run_actionable_google_analytics')) {
280
+ _e('<div class="error"><p><strong>'. wp_sprintf( 'Note: ' ) .'</strong>'. wp_sprintf(__( 'It seems <strong>Actionable Google Analytics Plugin</strong> is active on your store. Kindly deactivate it in order to avoid data duplication in GA.' )) .'</p></div>');
281
  die();
282
  }
283
  }
includes/class-tvc-register-scripts.php CHANGED
@@ -8,29 +8,29 @@ if ( ! defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
10
  if ( ! class_exists( 'TVC_Register_Scripts' ) ) :
 
 
 
 
 
 
 
 
 
 
 
11
  /**
12
- * Register Scripts Class
13
  */
14
- class TVC_Register_Scripts {
15
- public function __construct() {
16
- // only load the next hooks when on the Settings page
17
- if ( isset($_GET['page']) && strpos($_GET['page'], 'conversios') !== false) {
18
- add_action( 'admin_enqueue_scripts', array( $this, 'tvc_register_required_options_page_scripts' ) );
19
- }
20
- }
21
-
22
- /**
23
- * Registers all required java scripts for the feed manager Settings page.
24
- */
25
- public function tvc_register_required_options_page_scripts() {
26
- // enqueue notice handling script
27
- ?>
28
- <script>
29
- var tvc_ajax_url = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
30
- </script>
31
- <?php
32
- }
33
  }
 
34
  // End of TVC_Register_Scripts class
35
  endif;
36
  $my_ajax_registration_class = new TVC_Register_Scripts();
8
  exit;
9
  }
10
  if ( ! class_exists( 'TVC_Register_Scripts' ) ) :
11
+ /**
12
+ * Register Scripts Class
13
+ */
14
+ class TVC_Register_Scripts {
15
+ public function __construct() {
16
+ // only load the next hooks when on the Settings page
17
+ if ( isset($_GET['page']) && strpos($_GET['page'], 'conversios') !== false) {
18
+ add_action( 'admin_enqueue_scripts', array( $this, 'tvc_register_required_options_page_scripts' ) );
19
+ }
20
+ }
21
+
22
  /**
23
+ * Registers all required java scripts for the feed manager Settings page.
24
  */
25
+ public function tvc_register_required_options_page_scripts() {
26
+ // enqueue notice handling script
27
+ ?>
28
+ <script>
29
+ var tvc_ajax_url = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
30
+ </script>
31
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
32
  }
33
+ }
34
  // End of TVC_Register_Scripts class
35
  endif;
36
  $my_ajax_registration_class = new TVC_Register_Scripts();
includes/data/class-tvc-ajax-file.php CHANGED
@@ -25,9 +25,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
25
  add_action('wp_ajax_tvcajax-update-campaign-status', array($this, 'tvcajax_update_campaign_status'));
26
  add_action('wp_ajax_tvcajax-delete-campaign', array($this, 'tvcajax_delete_campaign'));
27
 
28
- add_action('wp_ajax_tvcajax-product-syncup', array($this, 'tvcajax_product_syncup'));
29
  add_action('wp_ajax_tvcajax-gmc-category-lists', array($this, 'tvcajax_get_gmc_categories'));
30
- add_action('wp_ajax_tvcajax-custom-metrics-dimension', array($this, 'tvcajax_custom_metrics_dimension'));
31
  add_action('wp_ajax_tvcajax-store-time-taken', array($this, 'tvcajax_store_time_taken'));
32
 
33
  add_action('wp_ajax_tvc_call_api_sync', array($this, 'tvc_call_api_sync'));
@@ -62,17 +61,28 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
62
 
63
  $sync_produt = ""; $sync_produt_p = ""; $is_synced_up = ""; $sync_message = "";
64
  $sync_progressive_data = isset($_POST['sync_progressive_data'])?$_POST['sync_progressive_data']:"";
 
 
65
  $sync_produt = isset($sync_progressive_data['sync_produt'])?$sync_progressive_data['sync_produt']:"";
 
 
66
  $sync_step = isset($sync_progressive_data['sync_step'])?$sync_progressive_data['sync_step']:"1";
 
 
67
  $total_product =isset($sync_progressive_data['total_product'])?$sync_progressive_data['total_product']:"0";
 
 
68
  $last_sync_product_id =isset($sync_progressive_data['last_sync_product_id'])?$sync_progressive_data['last_sync_product_id']:"";
 
 
69
  $skip_products =isset($sync_progressive_data['skip_products'])?$sync_progressive_data['skip_products']:"0";
 
70
 
71
  //print_r($_POST);
72
- $merchant_id = isset($_POST['tvc_data'])?$_POST['tvc_data']:"";
73
- $account_id = isset($_POST['account_id'])?$_POST['account_id']:"";
74
- $customer_id = isset($_POST['customer_id'])?$_POST['customer_id']:"";
75
- $subscription_id = isset($_POST['subscription_id'])?$_POST['subscription_id']:"";
76
  $data = isset($_POST['tvc_data'])?$_POST['tvc_data']:"";
77
 
78
 
@@ -140,7 +150,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
140
  'taxonomy' => 'product_cat',
141
  'field' => 'term_id',
142
  'terms' => $mc_key, /* category name */
143
- 'operator' => 'IN'
 
144
  )
145
  )
146
  ));
@@ -184,7 +195,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
184
  $sync_produt = $total_product;
185
  $sync_produt_p = ($sync_produt*100)/$total_product;
186
  $is_synced_up = ($total_product <= $sync_produt)?true:false;
187
- $sync_message = "Initiated, products are being synced to Merchant Center.Do not refresh..";
188
  //step one end
189
  }else if($sync_step == 2){
190
  $rs = $TVCProductSyncHelper->call_batch_wise_sync_product($last_sync_product_id, $product_batch_size);
@@ -198,13 +209,13 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
198
  $last_sync_product_id = (isset($rs['last_sync_product_id']))?$rs['last_sync_product_id']:0;
199
  $sync_produt_p = ($sync_produt*100)/$total_product;
200
  $is_synced_up = ($total_product <= $sync_produt)?true:false;
201
- $sync_message = "Initiated, products are being synced to Merchant Center.Do not refresh..";
202
  if($total_product <= $sync_produt){
203
  $customObj->setGmcCategoryMapping($catMapRequest);
204
  $customObj->setGmcAttributeMapping($attrMapRequest);
205
  $TVC_Admin_Auto_Product_sync_Helper = new TVC_Admin_Auto_Product_sync_Helper();
206
  $TVC_Admin_Auto_Product_sync_Helper->update_last_sync_in_db();
207
- $sync_message = "Initiated, products are being synced to Merchant Center.Do not refresh..";
208
  $TVC_Admin_DB_Helper->tvc_safe_truncate_table($prouct_pre_sync_table);
209
  }
210
  }
@@ -229,6 +240,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
229
  public function tvc_call_active_licence(){
230
  if ( is_admin() ) {
231
  $licence_key = isset($_POST['licence_key'])?$_POST['licence_key']:"";
 
232
  $TVC_Admin_Helper = new TVC_Admin_Helper();
233
  $subscription_id = $TVC_Admin_Helper->get_subscriptionId();
234
  if($subscription_id!="" && $licence_key != ""){
@@ -236,9 +248,9 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
236
 
237
  if($response->error== false){
238
  //$key, $html, $title = null, $link = null, $link_title = null, $overwrite= false
239
- $TVC_Admin_Helper->add_ee_msg_nofification("active_licence_key", "Your plan is now successfully activated.", "Congratulations!!", "", "", true);
240
  $TVC_Admin_Helper->update_subscription_details_api_to_db();
241
- echo json_encode(array('error' => false, "is_connect"=>true, 'message' => "The licence key has been activated."));
242
  }else{
243
  echo json_encode(array('error' => true, "is_connect"=>true, 'message' => $response->message));
244
  }
@@ -248,7 +260,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
248
  $TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
249
  echo json_encode(array('error' => true, "is_connect"=>false, 'message' => ""));
250
  }else{
251
- echo json_encode(array('error' => true, "is_connect"=>false, 'message' => "Licence key is required."));
252
  }
253
  }
254
  exit;
@@ -257,6 +269,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
257
  public function tvc_call_notification_dismiss(){
258
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'TVCNonce'), 'tvc_call_notification_dismiss-nonce')){
259
  $ee_dismiss_id = isset($_POST['data']['ee_dismiss_id'])?$_POST['data']['ee_dismiss_id']:"";
 
260
  if($ee_dismiss_id != ""){
261
  $TVC_Admin_Helper = new TVC_Admin_Helper();
262
  $ee_msg_list = $TVC_Admin_Helper->get_ee_msg_nofification_list();
@@ -264,7 +277,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
264
  unset($ee_msg_list[$ee_dismiss_id]);
265
  $ee_msg_list[$ee_dismiss_id]["active"]=0;
266
  $TVC_Admin_Helper->set_ee_msg_nofification_list($ee_msg_list);
267
- echo json_encode(array('status' => 'success', 'message' => $ee_additional_data));
268
  }
269
 
270
  }
@@ -273,7 +286,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
273
  }
274
  public function tvc_call_notice_dismiss(){
275
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'apiNoticDismissNonce'), 'tvc_call_notice_dismiss-nonce')){
276
- $ee_notice_dismiss_id = $_POST['data']['ee_notice_dismiss_id'];
 
277
  if($ee_notice_dismiss_id != ""){
278
  $TVC_Admin_Helper = new TVC_Admin_Helper();
279
  $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
@@ -291,7 +305,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
291
  if(isset($api_rs['error']) && isset($api_rs['message']) && $api_rs['message']){
292
  echo json_encode($api_rs);
293
  }else{
294
- echo json_encode(array('error' => true, 'message' => "Please try after some time."));
295
  }
296
  exit;
297
  }
@@ -325,31 +339,31 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
325
  exit;
326
  }
327
  public function get_tvc_access_token(){
328
- if(!empty($this->access_token)){
329
- return $this->access_token;
330
- }else if(isset($_SESSION['access_token']) && $_SESSION['access_token']){
331
- $this->access_token = $_SESSION['access_token'];
332
- return $this->access_token;
333
- }else{
334
- $TVC_Admin_Helper = new TVC_Admin_Helper();
335
- $google_detail = $TVC_Admin_Helper->get_ee_options_data();
336
- $this->access_token = $google_detail['setting']->access_token;
337
- return $this->access_token;
338
- }
339
  }
340
 
341
  public function get_tvc_refresh_token(){
342
- if(!empty($this->refresh_token)){
343
- return $this->refresh_token;
344
- }else if(isset($_SESSION['refresh_token']) && $_SESSION['refresh_token']){
345
- $this->refresh_token = $_SESSION['refresh_token'];
346
- return $this->refresh_token;
347
- }else{
348
- $TVC_Admin_Helper = new TVC_Admin_Helper();
349
- $google_detail = $TVC_Admin_Helper->get_ee_options_data();
350
- $this->refresh_token = $google_detail['setting']->refresh_token;
351
- return $this->refresh_token;
352
- }
353
  }
354
  /**
355
  * Delete the campaign
@@ -358,9 +372,9 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
358
  // make sure this call is legal
359
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignDeleteNonce'), 'tvcajax-delete-campaign-nonce')){
360
 
361
- $merchantId = filter_input(INPUT_POST, 'merchantId');
362
- $customerId = filter_input(INPUT_POST, 'customerId');
363
- $campaignId = filter_input(INPUT_POST, 'campaignId');
364
 
365
  $url = $this->apiDomain.'/campaigns/delete';
366
  $data = [
@@ -411,13 +425,13 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
411
  "content-type: application/json"
412
  );
413
 
414
- $merchantId = filter_input(INPUT_POST, 'merchantId');
415
- $customerId = filter_input(INPUT_POST, 'customerId');
416
- $campaignId = filter_input(INPUT_POST, 'campaignId');
417
- $budgetId = filter_input(INPUT_POST, 'budgetId');
418
- $campaignName = filter_input(INPUT_POST, 'campaignName');
419
- $budget = filter_input(INPUT_POST, 'budget');
420
- $status = filter_input(INPUT_POST, 'status');
421
  $curl_url = $this->apiDomain.'/campaigns/update';
422
  $shoppingObj = new ShoppingApi();
423
  $campaignData = $shoppingObj->getCampaignDetails($campaignId);
@@ -450,7 +464,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
450
  $message = $response->message;
451
  echo json_encode(['status' => 'success', 'message' => $message]);
452
  }else{
453
- $message = is_array($response->errors) ? $response->errors[0] : "Face some unprocessable entity";
454
  echo json_encode(['status' => 'error', 'message' => $message]);
455
  }
456
  }
@@ -464,8 +478,8 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
464
  // make sure this call is legal
465
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignCategoryListsNonce'), 'tvcajax-campaign-category-lists-nonce')){
466
 
467
- $country_code = filter_input(INPUT_POST, 'countryCode');
468
- $customer_id = filter_input(INPUT_POST, 'customerId');
469
  $url = $this->apiDomain.'/products/categories';
470
 
471
  $data = [
@@ -517,9 +531,9 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
517
  // make sure this call is legal
518
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'gmcCategoryListsNonce'), 'tvcajax-gmc-category-lists-nonce')){
519
 
520
- $country_code = filter_input(INPUT_POST, 'countryCode');
521
- $customer_id = filter_input(INPUT_POST, 'customerId');
522
- $parent = filter_input(INPUT_POST, 'parent');
523
  $url = $this->apiDomain.'/products/gmc-categories';
524
 
525
  $data = [
@@ -568,340 +582,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
568
  /**
569
  * create product batch for product sync up
570
  */
571
- public function tvcajax_product_syncup(){
572
- // make sure this call is legal
573
- ini_set('max_execution_time', '0');
574
- ini_set('memory_limit','-1');
575
- if($this->safe_ajax_call(filter_input(INPUT_POST, 'productSyncupNonce'), 'tvcajax-product-syncup-nonce')){
576
-
577
- if(!class_exists('CustomApi')){
578
- include(ENHANCAD_PLUGIN_DIR . 'includes/setup/CustomApi.php');
579
- }
580
- $customObj = new CustomApi();
581
- //echo "<br>1=>".round(microtime(true) * 1000);
582
- $batchId = time();
583
- $merchantId = filter_input(INPUT_POST, 'merchantId');
584
- $customerId = filter_input(INPUT_POST, 'customerId');
585
- $accountId = filter_input(INPUT_POST, 'accountId');
586
- $subscriptionId = filter_input(INPUT_POST, 'subscriptionId');
587
- //$platformCustomerId = filter_input(INPUT_POST, 'platformCustomerId');
588
- $data = filter_input(INPUT_POST, 'data');
589
- parse_str($data, $formArray);
590
- $mappedCatsDB = [];
591
- $mappedCats = [];
592
- $mappedAttrs = [];
593
- $skipProducts = [];
594
- foreach($formArray as $key => $value){
595
- if(preg_match("/^category-name-/i", $key)){
596
- if($value != ''){
597
- $keyArray = explode("name-", $key);
598
- $mappedCatsDB[$keyArray[1]]['name'] = $value;
599
- }
600
- unset($formArray[$key]);
601
- }else if(preg_match("/^category-/i", $key)){
602
- if($value != '' && $value > 0){
603
- $keyArray = explode("-", $key);
604
- $mappedCats[$keyArray[1]] = $value;
605
- $mappedCatsDB[$keyArray[1]]['id'] = $value;
606
- }
607
- unset($formArray[$key]);
608
- }else{
609
- if($value){
610
- $mappedAttrs[$key] = $value;
611
- }
612
- }
613
- }
614
- update_option("ee_prod_mapped_cats", serialize($mappedCatsDB));
615
- update_option("ee_prod_mapped_attrs", serialize($mappedAttrs));
616
-
617
- if(!empty($mappedCats)){
618
- $catMapRequest = [];
619
- $catMapRequest['subscription_id'] = $subscriptionId;
620
- $catMapRequest['customer_id'] = $customerId;
621
- $catMapRequest['merchant_id'] = $merchantId;
622
- $catMapRequest['category'] = $mappedCats;
623
- //$catMapResponse = $customObj->setGmcCategoryMapping($catMapRequest);
624
- }
625
- if(!empty($mappedAttrs)){
626
- $attrMapRequest = [];
627
- $attrMapRequest['subscription_id'] = $subscriptionId;
628
- $attrMapRequest['customer_id'] = $customerId;
629
- $attrMapRequest['merchant_id'] = $merchantId;
630
- $attrMapRequest['attribute'] = $mappedAttrs;
631
- //$attrMapResponse = $customObj->setGmcAttributeMapping($attrMapRequest);
632
- }
633
- $TVC_Admin_Helper = new TVC_Admin_Helper();
634
- $cat_list = $TVC_Admin_Helper->get_tvc_product_cat_list_with_name();
635
- $tvc_currency = ((get_option('woocommerce_currency') != '')? get_option('woocommerce_currency') : 'USD');
636
- $temp_product=array();
637
- $fixed_att_select_list = array("gender", "age_group", "shipping", "tax", "content_language", "target_country", "condition");
638
- foreach ($fixed_att_select_list as $fixed_key) {
639
- if(isset($formArray[$fixed_key]) && $formArray[$fixed_key] != "" ){
640
- if($fixed_key == "shipping" && $formArray[$fixed_key] != ""){
641
- $temp_product[$fixed_key]['price']['value'] = $formArray[$fixed_key];
642
- $temp_product[$fixed_key]['price']['currency'] = $tvc_currency;
643
- $temp_product[$fixed_key]['country'] = $formArray['target_country'];
644
- //$temp_product[$fixed_key] =$formArray['target_country'].'::'.$formArray[$fixed_key].' '.$tvc_currency;
645
- }else if($fixed_key == "tax" && $formArray[$fixed_key] != ""){
646
- //$temp_product[$fixed_key] =$formArray['target_country'].'::'.$formArray[$fixed_key];
647
- $temp_product['taxes']['rate'] = $formArray[$fixed_key];
648
- $temp_product['taxes']['country'] = $formArray['target_country'];
649
- }else if( $formArray[$fixed_key] != ""){
650
- $temp_product[$fixed_key] = $formArray[$fixed_key];
651
- }
652
- }
653
- unset($formArray[$fixed_key]);
654
- }
655
-
656
- $entries = [];
657
- if(!empty($mappedCats)){
658
- foreach($mappedCats as $mc_key => $mappedCat){
659
- $all_products = get_posts(array(
660
- 'post_type' => 'product',
661
- 'numberposts' => -1,
662
- 'post_status' => 'publish',
663
- 'tax_query' => array(
664
- array(
665
- 'taxonomy' => 'product_cat',
666
- 'field' => 'term_id',
667
- 'terms' => $mc_key, /* category name */
668
- 'operator' => 'IN'
669
- )
670
- )
671
- ));
672
-
673
- foreach($all_products as $postkey => $postvalue){
674
-
675
- $postmeta = [];
676
- $postmeta = $TVC_Admin_Helper->tvc_get_post_meta($postvalue->ID);
677
- $prd = wc_get_product($postvalue->ID);
678
- $postObj = (object) array_merge((array) $postvalue, (array) $postmeta);
679
-
680
- $product = array(
681
- 'offer_id'=>$postvalue->ID,
682
- 'channel'=>'online',
683
- 'link'=>get_permalink($postvalue->ID),
684
- 'google_product_category'=>$mappedCat
685
- );
686
- if(isset($cat_list[$mc_key]) && $cat_list[$mc_key]!=""){
687
- //$product['product_type'] = "Home > ".str_replace(array("-","_"), array(" "," ") , $cat_list[$mc_key]);
688
- }
689
- $product = array_merge($temp_product,$product);
690
-
691
- if($prd->get_type() == "variable"){
692
- $variation_attributes = $prd->get_variation_attributes();
693
- $can_add_item_group_id = false;
694
- $is_color_size = false;
695
- if(!empty($variation_attributes)){
696
- foreach($variation_attributes as $va_key => $va_value ){
697
- $va_key = str_replace("_", " ", $va_key);
698
- if (strpos($va_key, 'color') !== false) {
699
- $can_add_item_group_id = true;
700
- $is_color_size = true;
701
- break;
702
- }else if (strpos($va_key, 'size') !== false) {
703
- $can_add_item_group_id = true;
704
- $is_color_size = true;
705
- break;
706
- }
707
- }
708
- }
709
- if(isset($formArray['gender']) && $formArray['gender']!= ""){
710
- $can_add_item_group_id = true;
711
- }else if(isset($formArray['age_group']) && $formArray['age_group']!= ""){
712
- $can_add_item_group_id = true;
713
- }
714
- //echo "<br>".$mc_key."=>".$postvalue->ID."can_add_item_group_id=>".$can_add_item_group_id;
715
- if($can_add_item_group_id == true){
716
- $p_variations = $prd->get_available_variations();
717
- if(!empty($p_variations)){
718
- foreach ($p_variations as $v_key => $v_value) {
719
- $postmeta_var = (object)$TVC_Admin_Helper->tvc_get_post_meta($v_value['variation_id']);
720
- $product['title'] = (isset($postObj->$formArray['title']))?$postObj->$formArray['title']:get_the_title($postvalue->ID);
721
- $tvc_temp_desc_key = $formArray['description'];
722
- $product['description'] = (isset($v_value['variation_description']) && $v_value['variation_description'] != "")?$v_value['variation_description']:$postObj->$tvc_temp_desc_key;
723
- $product['offer_id'] = $v_value['variation_id'];
724
- $product['id'] = $v_value['variation_id'];
725
- $product['item_group_id'] = $postvalue->ID;
726
- $image_id = $v_value['image_id'];
727
- $product['image_link'] = wp_get_attachment_image_url($image_id, 'full');
728
- if($is_color_size == true){
729
- if(isset($v_value['attributes']) && !empty($v_value['attributes']) ){
730
- foreach($v_value['attributes'] as $va_key => $va_value ){
731
- $va_key = str_replace("_", " ", $va_key);
732
- if (strpos($va_key, 'color') !== false) {
733
- $product['color'] = $va_value;
734
- }else if (strpos($va_key, 'size') !== false) {
735
- $product['sizes'] = $va_value;
736
- }
737
- }
738
- }
739
- }
740
- foreach($formArray as $key => $value){
741
- if($key == 'price'){
742
- if(isset($postmeta_var->$value) && $postmeta_var->$value > 0){
743
- $product[$key]['value'] = $postmeta_var->$value;
744
- }else if(isset($postmeta_var->_regular_price) && $postmeta_var->_regular_price && $postmeta_var->_regular_price >0 ){
745
- $product[$key]['value'] = $postmeta_var->_regular_price;
746
- }else if(isset($postmeta_var->_price) && $postmeta_var->_price && $postmeta_var->_price >0 ){
747
- $product[$key]['value'] = $postmeta_var->_price;
748
- }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
749
- $product[$key]['value'] = $postmeta_var->_sale_price;
750
- }
751
- if(isset($product[$key]['value']) && $product[$key]['value'] >0){
752
- $product[$key]['currency'] = $tvc_currency;
753
- }else{
754
- $skipProducts[$postmeta_var->ID] = $postmeta_var;
755
- }
756
- }else if($key == 'sale_price'){
757
- if(isset($postmeta_var->$value) && $postmeta_var->$value > 0){
758
- $product[$key]['value'] = $postmeta_var->$value;
759
- }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
760
- $product[$key]['value'] = $postmeta_var->_sale_price;
761
- }
762
- if(isset($product[$key]['value']) && $product[$key]['value'] >0){
763
- $product[$key]['currency'] = $tvc_currency;
764
- }
765
- }else if($key == 'availability'){
766
- $tvc_find = array("instock","outofstock","onbackorder");
767
- $tvc_replace = array("in stock","out of stock","preorder");
768
- if(isset($postmeta_var->$value) && $postmeta_var->$value != ""){
769
- $stock_status = $postmeta_var->$value;
770
- $stock_status = str_replace($tvc_find,$tvc_replace,$stock_status);
771
- $product[$key] = $stock_status;
772
- }else{
773
- $stock_status = $postmeta_var->_stock_status;
774
- $stock_status = str_replace($tvc_find,$tvc_replace,$stock_status);
775
- $product[$key] = $stock_status;
776
- }
777
- }else if(isset($postmeta_var->$value) && $postmeta_var->$value != ""){$product[$key] = $postmeta_var->$value;
778
- }
779
- }
780
- $entrie = [
781
- 'merchant_id' => $merchantId,
782
- 'batch_id' => ++$batchId,
783
- 'method' => 'insert',
784
- 'product' => $product
785
- ];
786
- $entries[] = $entrie;
787
- }
788
- }
789
- }else{
790
- goto simpleproduct;
791
- }
792
- }else{
793
- simpleproduct:
794
- $image_id = $prd->get_image_id();
795
- $product['image_link'] = wp_get_attachment_image_url($image_id, 'full');
796
- foreach($formArray as $key => $value){
797
- if($key == 'price'){
798
- if(isset($postObj->$value) && $postObj->$value > 0){
799
- $product[$key]['value'] = $postObj->$value;
800
- }else if(isset($postObj->_regular_price) && $postObj->_regular_price && $postObj->_regular_price >0 ){
801
- $product[$key]['value'] = $postObj->_regular_price;
802
- }else if(isset($postObj->_price) && $postObj->_price && $postObj->_price >0 ){
803
- $product[$key]['value'] = $postObj->_price;
804
- }else if(isset($postObj->_sale_price) && $postObj->_sale_price && $postObj->_sale_price >0 ){
805
- $product[$key]['value'] = $postObj->_sale_price;
806
- }
807
- if(isset($product[$key]['value']) && $product[$key]['value'] >0){
808
- $product[$key]['currency'] = $tvc_currency;
809
- }else{
810
- $skipProducts[$postObj->ID] = $postObj;
811
- }
812
- }else if($key == 'sale_price'){
813
- if(isset($postObj->$value) && $postObj->$value > 0){
814
- $product[$key]['value'] = $postObj->$value;
815
- }else if(isset($postObj->_sale_price) && $postObj->_sale_price && $postObj->_sale_price >0 ){
816
- $product[$key]['value'] = $postObj->_sale_price;
817
- }
818
- if(isset($product[$key]['value']) && $product[$key]['value'] >0){
819
- $product[$key]['currency'] = $tvc_currency;
820
- }
821
- }else if($key == 'availability'){
822
- $tvc_find = array("instock","outofstock","onbackorder");
823
- $tvc_replace = array("in stock","out of stock","preorder");
824
- if(isset($postObj->$value) && $postObj->$value != ""){
825
- $stock_status = $postObj->$value;
826
- $stock_status = str_replace($tvc_find,$tvc_replace,$stock_status);
827
- $product[$key] = $stock_status;
828
- }else{
829
- $stock_status = $postObj->_stock_status;
830
- $stock_status = str_replace($tvc_find,$tvc_replace,$stock_status);
831
- $product[$key] = $stock_status;
832
- }
833
- }else if(isset($postObj->$value) && $postObj->$value != ""){
834
- //echo $key."==".$postObj->$value."<br>";
835
- $product[$key] = $postObj->$value;
836
- }
837
- }
838
-
839
- $entrie = [
840
- 'merchant_id' => $merchantId,
841
- 'batch_id' => ++$batchId,
842
- 'method' => 'insert',
843
- 'product' => $product
844
- ];
845
- $entries[] = $entrie;
846
- }
847
-
848
-
849
- }
850
- wp_reset_query();
851
- }
852
- $data = [
853
- 'merchant_id' => $accountId,
854
- 'account_id' => $merchantId,
855
- 'subscription_id' => $subscriptionId,
856
- 'entries' => $entries
857
- ];
858
- $url = $this->apiDomain.'/products/batch';
859
- $args = array(
860
- 'timeout' => 10000,
861
- 'headers' => array(
862
- 'Authorization' => "Bearer MTIzNA==",
863
- 'Content-Type' => 'application/json',
864
- 'AccessToken' => $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
865
- ),
866
- 'body' => wp_json_encode($data)
867
- );
868
-
869
-
870
-
871
- $request = wp_remote_post($url, $args);
872
-
873
- // Retrieve information
874
- $response_code = wp_remote_retrieve_response_code($request);
875
- $response_message = wp_remote_retrieve_response_message($request);
876
- $response_body = json_decode(wp_remote_retrieve_body($request));
877
-
878
- if((isset($response_body->error) && $response_body->error == '')){
879
- $TVC_Admin_Auto_Product_sync_Helper = new TVC_Admin_Auto_Product_sync_Helper();
880
- $TVC_Admin_Auto_Product_sync_Helper->update_last_sync_in_db();
881
- $customObj->setGmcCategoryMapping($catMapRequest);
882
- $customObj->setGmcAttributeMapping($attrMapRequest);
883
- echo json_encode(['status' => 'success', 'skipProducts' => count($skipProducts)]);
884
- }else{
885
- foreach($response_body->errors as $err){
886
- $message = $err;
887
- break;
888
- }
889
- echo json_encode(['status' => 'error', 'message' => $message]);
890
- }
891
- }else{
892
- echo json_encode(['status' => 'error', 'message' => "Category mapping is null."]);
893
- }
894
-
895
- // echo json_encode( $categories );
896
- }
897
- // IMPORTANT: don't forget to exit
898
- exit;
899
- }
900
-
901
- /**
902
- * create product batch for product sync up
903
- */
904
- public function tvcajax_custom_metrics_dimension(){
905
  // make sure this call is legal
906
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'customMetricsDimensionNonce'), 'tvcajax-custom-metrics-dimension-nonce')){
907
 
@@ -910,12 +591,12 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
910
  }
911
  $customObj = new CustomApi();
912
 
913
- $accountId = filter_input(INPUT_POST, 'accountId');
914
  // $accountId = '184918792';
915
- $webPropertyId = filter_input(INPUT_POST, 'webPropertyId');
916
  // $webPropertyId = 'UA-184918792-5';
917
- $subscriptionId = filter_input(INPUT_POST, 'subscriptionId');
918
- $data = filter_input(INPUT_POST, 'data');
919
  parse_str($data, $formArray);
920
  // Only for print array
921
 
@@ -981,7 +662,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
981
  $response_body = json_decode(wp_remote_retrieve_body($request)); */
982
 
983
 
984
-
985
 
986
  if((isset($dimenResponse->error) && $dimenResponse->error == '' && isset($metrResponse->error) && $metrResponse->error == '')){
987
  echo json_encode(['status' => 'success']);
@@ -1011,9 +692,9 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
1011
 
1012
  // IMPORTANT: don't forget to exit
1013
  exit;
1014
- }
1015
 
1016
- public function tvcajax_store_time_taken(){
1017
  // make sure this call is legal
1018
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignCategoryListsNonce'), 'tvcajax-store-time-taken-nonce')){
1019
  $ee_options_data = unserialize(get_option('ee_options'));
@@ -1059,7 +740,7 @@ class TVC_Ajax_File extends TVC_Ajax_Calls {
1059
 
1060
  // IMPORTANT: don't forget to exit
1061
  exit;
1062
- }
1063
  public function generateAccessToken($access_token, $refresh_token) {
1064
  $request = "https://www.googleapis.com/oauth2/v1/tokeninfo?"
1065
  . "access_token=" . $access_token;
25
  add_action('wp_ajax_tvcajax-update-campaign-status', array($this, 'tvcajax_update_campaign_status'));
26
  add_action('wp_ajax_tvcajax-delete-campaign', array($this, 'tvcajax_delete_campaign'));
27
 
 
28
  add_action('wp_ajax_tvcajax-gmc-category-lists', array($this, 'tvcajax_get_gmc_categories'));
29
+ //add_action('wp_ajax_tvcajax-custom-metrics-dimension', array($this, 'tvcajax_custom_metrics_dimension'));
30
  add_action('wp_ajax_tvcajax-store-time-taken', array($this, 'tvcajax_store_time_taken'));
31
 
32
  add_action('wp_ajax_tvc_call_api_sync', array($this, 'tvc_call_api_sync'));
61
 
62
  $sync_produt = ""; $sync_produt_p = ""; $is_synced_up = ""; $sync_message = "";
63
  $sync_progressive_data = isset($_POST['sync_progressive_data'])?$_POST['sync_progressive_data']:"";
64
+ $sync_progressive_data = $sync_progressive_data;
65
+
66
  $sync_produt = isset($sync_progressive_data['sync_produt'])?$sync_progressive_data['sync_produt']:"";
67
+ $sync_produt = sanitize_text_field($sync_produt);
68
+
69
  $sync_step = isset($sync_progressive_data['sync_step'])?$sync_progressive_data['sync_step']:"1";
70
+ $sync_step = sanitize_text_field($sync_step);
71
+
72
  $total_product =isset($sync_progressive_data['total_product'])?$sync_progressive_data['total_product']:"0";
73
+ $total_product = sanitize_text_field($total_product);
74
+
75
  $last_sync_product_id =isset($sync_progressive_data['last_sync_product_id'])?$sync_progressive_data['last_sync_product_id']:"";
76
+ $last_sync_product_id = sanitize_text_field($last_sync_product_id);
77
+
78
  $skip_products =isset($sync_progressive_data['skip_products'])?$sync_progressive_data['skip_products']:"0";
79
+ $skip_products = sanitize_text_field($skip_products);
80
 
81
  //print_r($_POST);
82
+ $merchant_id = esc_attr(isset($_POST['tvc_data'])?$_POST['tvc_data']:"");
83
+ $account_id = esc_attr(isset($_POST['account_id'])?$_POST['account_id']:"");
84
+ $customer_id = esc_attr(isset($_POST['customer_id'])?$_POST['customer_id']:"");
85
+ $subscription_id = esc_attr(isset($_POST['subscription_id'])?$_POST['subscription_id']:"");
86
  $data = isset($_POST['tvc_data'])?$_POST['tvc_data']:"";
87
 
88
 
150
  'taxonomy' => 'product_cat',
151
  'field' => 'term_id',
152
  'terms' => $mc_key, /* category name */
153
+ 'operator' => 'IN',
154
+ 'include_children' => false
155
  )
156
  )
157
  ));
195
  $sync_produt = $total_product;
196
  $sync_produt_p = ($sync_produt*100)/$total_product;
197
  $is_synced_up = ($total_product <= $sync_produt)?true:false;
198
+ $sync_message = __("Initiated, products are being synced to Merchant Center.Do not refresh..","conversios");
199
  //step one end
200
  }else if($sync_step == 2){
201
  $rs = $TVCProductSyncHelper->call_batch_wise_sync_product($last_sync_product_id, $product_batch_size);
209
  $last_sync_product_id = (isset($rs['last_sync_product_id']))?$rs['last_sync_product_id']:0;
210
  $sync_produt_p = ($sync_produt*100)/$total_product;
211
  $is_synced_up = ($total_product <= $sync_produt)?true:false;
212
+ $sync_message = __("Initiated, products are being synced to Merchant Center.Do not refresh..","conversios");
213
  if($total_product <= $sync_produt){
214
  $customObj->setGmcCategoryMapping($catMapRequest);
215
  $customObj->setGmcAttributeMapping($attrMapRequest);
216
  $TVC_Admin_Auto_Product_sync_Helper = new TVC_Admin_Auto_Product_sync_Helper();
217
  $TVC_Admin_Auto_Product_sync_Helper->update_last_sync_in_db();
218
+ $sync_message = __("Initiated, products are being synced to Merchant Center.Do not refresh..","conversios");
219
  $TVC_Admin_DB_Helper->tvc_safe_truncate_table($prouct_pre_sync_table);
220
  }
221
  }
240
  public function tvc_call_active_licence(){
241
  if ( is_admin() ) {
242
  $licence_key = isset($_POST['licence_key'])?$_POST['licence_key']:"";
243
+ $licence_key = sanitize_text_field($licence_key);
244
  $TVC_Admin_Helper = new TVC_Admin_Helper();
245
  $subscription_id = $TVC_Admin_Helper->get_subscriptionId();
246
  if($subscription_id!="" && $licence_key != ""){
248
 
249
  if($response->error== false){
250
  //$key, $html, $title = null, $link = null, $link_title = null, $overwrite= false
251
+ $TVC_Admin_Helper->add_ee_msg_nofification("active_licence_key", __("Your plan is now successfully activated.","conversios"), __("Congratulations!!","conversios"), "", "", true);
252
  $TVC_Admin_Helper->update_subscription_details_api_to_db();
253
+ echo json_encode(array('error' => false, "is_connect"=>true, 'message' => __("The licence key has been activated.","conversios") ));
254
  }else{
255
  echo json_encode(array('error' => true, "is_connect"=>true, 'message' => $response->message));
256
  }
260
  $TVC_Admin_Helper->set_ee_additional_data($ee_additional_data);
261
  echo json_encode(array('error' => true, "is_connect"=>false, 'message' => ""));
262
  }else{
263
+ echo json_encode(array('error' => true, "is_connect"=>false, 'message' => __("Licence key is required.","conversios")));
264
  }
265
  }
266
  exit;
269
  public function tvc_call_notification_dismiss(){
270
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'TVCNonce'), 'tvc_call_notification_dismiss-nonce')){
271
  $ee_dismiss_id = isset($_POST['data']['ee_dismiss_id'])?$_POST['data']['ee_dismiss_id']:"";
272
+ $ee_dismiss_id = sanitize_text_field($ee_dismiss_id);
273
  if($ee_dismiss_id != ""){
274
  $TVC_Admin_Helper = new TVC_Admin_Helper();
275
  $ee_msg_list = $TVC_Admin_Helper->get_ee_msg_nofification_list();
277
  unset($ee_msg_list[$ee_dismiss_id]);
278
  $ee_msg_list[$ee_dismiss_id]["active"]=0;
279
  $TVC_Admin_Helper->set_ee_msg_nofification_list($ee_msg_list);
280
+ echo json_encode(array('status' => 'success', 'message' => ""));
281
  }
282
 
283
  }
286
  }
287
  public function tvc_call_notice_dismiss(){
288
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'apiNoticDismissNonce'), 'tvc_call_notice_dismiss-nonce')){
289
+ $ee_notice_dismiss_id = isset($_POST['data']['ee_notice_dismiss_id'])?$_POST['data']['ee_notice_dismiss_id']:"";
290
+ $ee_notice_dismiss_id = sanitize_text_field($ee_notice_dismiss_id);
291
  if($ee_notice_dismiss_id != ""){
292
  $TVC_Admin_Helper = new TVC_Admin_Helper();
293
  $ee_additional_data = $TVC_Admin_Helper->get_ee_additional_data();
305
  if(isset($api_rs['error']) && isset($api_rs['message']) && $api_rs['message']){
306
  echo json_encode($api_rs);
307
  }else{
308
+ echo json_encode(array('error' => true, 'message' => __("Please try after some time.","conversios")));
309
  }
310
  exit;
311
  }
339
  exit;
340
  }
341
  public function get_tvc_access_token(){
342
+ if(!empty($this->access_token)){
343
+ return $this->access_token;
344
+ }else if(isset($_SESSION['access_token']) && $_SESSION['access_token']){
345
+ $this->access_token = $_SESSION['access_token'];
346
+ return $this->access_token;
347
+ }else{
348
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
349
+ $google_detail = $TVC_Admin_Helper->get_ee_options_data();
350
+ $this->access_token = $google_detail['setting']->access_token;
351
+ return $this->access_token;
352
+ }
353
  }
354
 
355
  public function get_tvc_refresh_token(){
356
+ if(!empty($this->refresh_token)){
357
+ return $this->refresh_token;
358
+ }else if(isset($_SESSION['refresh_token']) && $_SESSION['refresh_token']){
359
+ $this->refresh_token = $_SESSION['refresh_token'];
360
+ return $this->refresh_token;
361
+ }else{
362
+ $TVC_Admin_Helper = new TVC_Admin_Helper();
363
+ $google_detail = $TVC_Admin_Helper->get_ee_options_data();
364
+ $this->refresh_token = $google_detail['setting']->refresh_token;
365
+ return $this->refresh_token;
366
+ }
367
  }
368
  /**
369
  * Delete the campaign
372
  // make sure this call is legal
373
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignDeleteNonce'), 'tvcajax-delete-campaign-nonce')){
374
 
375
+ $merchantId = sanitize_text_field(filter_input(INPUT_POST, 'merchantId'));
376
+ $customerId = sanitize_text_field(filter_input(INPUT_POST, 'customerId'));
377
+ $campaignId = sanitize_text_field(filter_input(INPUT_POST, 'campaignId'));
378
 
379
  $url = $this->apiDomain.'/campaigns/delete';
380
  $data = [
425
  "content-type: application/json"
426
  );
427
 
428
+ $merchantId = sanitize_text_field(filter_input(INPUT_POST, 'merchantId'));
429
+ $customerId = sanitize_text_field(filter_input(INPUT_POST, 'customerId'));
430
+ $campaignId = sanitize_text_field(filter_input(INPUT_POST, 'campaignId'));
431
+ $budgetId = sanitize_text_field(filter_input(INPUT_POST, 'budgetId'));
432
+ $campaignName = sanitize_text_field(filter_input(INPUT_POST, 'campaignName'));
433
+ $budget = sanitize_text_field(filter_input(INPUT_POST, 'budget'));
434
+ $status = sanitize_text_field(filter_input(INPUT_POST, 'status'));
435
  $curl_url = $this->apiDomain.'/campaigns/update';
436
  $shoppingObj = new ShoppingApi();
437
  $campaignData = $shoppingObj->getCampaignDetails($campaignId);
464
  $message = $response->message;
465
  echo json_encode(['status' => 'success', 'message' => $message]);
466
  }else{
467
+ $message = is_array($response->errors) ? $response->errors[0] : __("Face some unprocessable entity","conversios");
468
  echo json_encode(['status' => 'error', 'message' => $message]);
469
  }
470
  }
478
  // make sure this call is legal
479
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignCategoryListsNonce'), 'tvcajax-campaign-category-lists-nonce')){
480
 
481
+ $country_code = sanitize_text_field(filter_input(INPUT_POST, 'countryCode'));
482
+ $customer_id = sanitize_text_field(filter_input(INPUT_POST, 'customerId'));
483
  $url = $this->apiDomain.'/products/categories';
484
 
485
  $data = [
531
  // make sure this call is legal
532
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'gmcCategoryListsNonce'), 'tvcajax-gmc-category-lists-nonce')){
533
 
534
+ $country_code = sanitize_text_field(filter_input(INPUT_POST, 'countryCode'));
535
+ $customer_id = sanitize_text_field(filter_input(INPUT_POST, 'customerId'));
536
+ $parent = sanitize_text_field(filter_input(INPUT_POST, 'parent'));
537
  $url = $this->apiDomain.'/products/gmc-categories';
538
 
539
  $data = [
582
  /**
583
  * create product batch for product sync up
584
  */
585
+ /*==public function tvcajax_custom_metrics_dimension(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
  // make sure this call is legal
587
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'customMetricsDimensionNonce'), 'tvcajax-custom-metrics-dimension-nonce')){
588
 
591
  }
592
  $customObj = new CustomApi();
593
 
594
+ $accountId = sanitize_text_field(filter_input(INPUT_POST, 'accountId'));
595
  // $accountId = '184918792';
596
+ $webPropertyId = sanitize_text_field(filter_input(INPUT_POST, 'webPropertyId'));
597
  // $webPropertyId = 'UA-184918792-5';
598
+ $subscriptionId = sanitize_text_field(filter_input(INPUT_POST, 'subscriptionId'));
599
+ $data = esc_attr(filter_input(INPUT_POST, 'data'));
600
  parse_str($data, $formArray);
601
  // Only for print array
602
 
662
  $response_body = json_decode(wp_remote_retrieve_body($request)); */
663
 
664
 
665
+ /*==
666
 
667
  if((isset($dimenResponse->error) && $dimenResponse->error == '' && isset($metrResponse->error) && $metrResponse->error == '')){
668
  echo json_encode(['status' => 'success']);
692
 
693
  // IMPORTANT: don't forget to exit
694
  exit;
695
+ }==*/
696
 
697
+ /*public function tvcajax_store_time_taken(){
698
  // make sure this call is legal
699
  if($this->safe_ajax_call(filter_input(INPUT_POST, 'campaignCategoryListsNonce'), 'tvcajax-store-time-taken-nonce')){
700
  $ee_options_data = unserialize(get_option('ee_options'));
740
 
741
  // IMPORTANT: don't forget to exit
742
  exit;
743
+ }*/
744
  public function generateAccessToken($access_token, $refresh_token) {
745
  $request = "https://www.googleapis.com/oauth2/v1/tokeninfo?"
746
  . "access_token=" . $access_token;
includes/data/class-tvc-taxonomies.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * TVC Taxonomies Class.
5
  *
@@ -150,4 +149,4 @@ if ( ! class_exists( 'TVC_Taxonomies' ) ) :
150
  }
151
  // end of TVC_Taxonomies_Class
152
 
153
- endif;
1
  <?php
 
2
  /**
3
  * TVC Taxonomies Class.
4
  *
149
  }
150
  // end of TVC_Taxonomies_Class
151
 
152
+ endif;
includes/setup/CustomApi.php CHANGED
@@ -131,12 +131,12 @@ class CustomApi{
131
  // Split the country/state
132
  $split_country = explode(":", $store_raw_country);
133
 
134
- $GLOBALS['tatvicData']['tvc_customer'] = $response_body->data->google_ads_id;
135
- $GLOBALS['tatvicData']['tvc_merchant'] = $response_body->data->google_merchant_center_id;
136
- $GLOBALS['tatvicData']['tvc_account'] = $response_body->data->ua_analytic_account_id;
137
- $GLOBALS['tatvicData']['tvc_subscription'] = $response_body->data->id;
138
  $GLOBALS['tatvicData']['tvc_country'] = $split_country[0];
139
- $GLOBALS['tatvicData']['tvc_gmc_id'] = $response_body->data->google_merchant_center_id;
140
  $GLOBALS['tatvicData']['tvc_main_merchant_id'] = $response_body->data->merchant_id;
141
  $GLOBALS['tatvicData']['tvc_site_url'] = $response_body->data->site_url;
142
  $GLOBALS['tatvicData']['tvc_track_opt'] = $response_body->data->tracking_option;
@@ -162,7 +162,7 @@ class CustomApi{
162
  if(isset($response_body->errors->key[0])){
163
  $return->message = $response_body->errors->key[0];
164
  }else{
165
- $return->message = "Please try after some time.";
166
  }
167
  }
168
  return $return;
@@ -253,7 +253,7 @@ class CustomApi{
253
  $postData = [
254
  'key' => $licence_key,
255
  'domain' => get_site_url(),
256
- 'subscription_id'=>$subscription_id
257
  ];
258
  $postData = json_encode($postData);
259
  $ch = curl_init();
@@ -283,7 +283,7 @@ class CustomApi{
283
  if(isset($response->errors->key[0])){
284
  $return->message = $response->errors->key[0];
285
  }else{
286
- $return->message = "Check your entered licese key.";
287
  }
288
 
289
  }
@@ -301,7 +301,7 @@ class CustomApi{
301
  );
302
  $curl_url = $this->apiDomain . "/google-ads/remarketing-snippets";
303
  $postData = [
304
- 'customer_id' => $customer_id
305
  ];
306
  $postData = json_encode($postData);
307
  $ch = curl_init();
@@ -348,8 +348,8 @@ class CustomApi{
348
  );
349
  $curl_url = $this->apiDomain . "/google-ads/conversion-list";
350
  $postData = [
351
- 'merchant_id' => $merchant_id,
352
- 'customer_id' => $customer_id
353
  ];
354
  $postData = json_encode($postData);
355
  $ch = curl_init();
@@ -691,46 +691,6 @@ class CustomApi{
691
  }
692
  }
693
 
694
- public function getSubscriptionDetail($id) {
695
- try {
696
- $url = $this->apiDomain . '/customer-subscriptions/subscription-detail';
697
- $actual_link = get_site_url();
698
- $data = [
699
- 'subscription_id' => $id,
700
- 'domain' => $actual_link
701
- ];
702
- $args = array(
703
- 'headers' => array(
704
- 'Authorization' => "Bearer $this->token",
705
- 'Content-Type' => 'application/json',
706
- ),
707
- 'body' => wp_json_encode($data)
708
- );
709
-
710
- // Send remote request
711
- $request = wp_remote_post($url, $args);
712
-
713
- // Retrieve information
714
- $response_code = wp_remote_retrieve_response_code($request);
715
- $response_message = wp_remote_retrieve_response_message($request);
716
- $response_body = json_decode(wp_remote_retrieve_body($request));
717
- if ((isset($response_body->error) && $response_body->error == '')) {
718
-
719
- return new WP_REST_Response(
720
- array(
721
- 'status' => $response_code,
722
- 'message' => $response_message,
723
- 'data' => $response_body->data
724
- )
725
- );
726
- } else {
727
- return new WP_Error($response_code, $response_message, $response_body);
728
- }
729
- } catch (Exception $e) {
730
- return $e->getMessage();
731
- }
732
- }
733
-
734
  public function getCampaignCurrencySymbol($postData) {
735
  try {
736
  $url = $this->apiDomain . '/campaigns/currency-symbol';
@@ -861,10 +821,10 @@ class CustomApi{
861
  );
862
 
863
  $data = [
864
- 'merchant_id' => $postData['merchant_id'],
865
  'website' => $postData['website_url'],
866
- 'account_id' => $postData['account_id'],
867
- 'method' => $postData['method']
868
  ];
869
 
870
  $this->curl_url = $url;
@@ -895,10 +855,10 @@ class CustomApi{
895
  );
896
 
897
  $data = [
898
- 'merchant_id' => $postData['merchant_id'],
899
  'website' => $postData['website_url'],
900
- 'subscription_id' => $postData['subscription_id'],
901
- 'account_id' => $postData['account_id'],
902
  'method' => $postData['method']
903
  ];
904
 
@@ -929,11 +889,11 @@ class CustomApi{
929
  "AccessToken:" . $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
930
  );
931
  $data = [
932
- 'merchant_id' => $postData['merchant_id'],
933
- 'account_id' => $postData['account_id'],
934
  'website' => $postData['website_url'],
935
  'access_token' => $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token()),
936
- 'subscription_id' => $postData['subscription_id'],
937
  ];
938
 
939
  $this->curl_url = $url;
131
  // Split the country/state
132
  $split_country = explode(":", $store_raw_country);
133
 
134
+ $GLOBALS['tatvicData']['tvc_customer'] = esc_attr($response_body->data->google_ads_id);
135
+ $GLOBALS['tatvicData']['tvc_merchant'] = esc_attr($response_body->data->google_merchant_center_id);
136
+ $GLOBALS['tatvicData']['tvc_account'] = esc_attr($response_body->data->ua_analytic_account_id);
137
+ $GLOBALS['tatvicData']['tvc_subscription'] = esc_attr($response_body->data->id);
138
  $GLOBALS['tatvicData']['tvc_country'] = $split_country[0];
139
+ $GLOBALS['tatvicData']['tvc_gmc_id'] = esc_attr($response_body->data->google_merchant_center_id);
140
  $GLOBALS['tatvicData']['tvc_main_merchant_id'] = $response_body->data->merchant_id;
141
  $GLOBALS['tatvicData']['tvc_site_url'] = $response_body->data->site_url;
142
  $GLOBALS['tatvicData']['tvc_track_opt'] = $response_body->data->tracking_option;
162
  if(isset($response_body->errors->key[0])){
163
  $return->message = $response_body->errors->key[0];
164
  }else{
165
+ $return->message = __("Please try after some time.","conversios");
166
  }
167
  }
168
  return $return;
253
  $postData = [
254
  'key' => $licence_key,
255
  'domain' => get_site_url(),
256
+ 'subscription_id'=>esc_attr($subscription_id)
257
  ];
258
  $postData = json_encode($postData);
259
  $ch = curl_init();
283
  if(isset($response->errors->key[0])){
284
  $return->message = $response->errors->key[0];
285
  }else{
286
+ $return->message = __("Check your entered licese key.","conversios");
287
  }
288
 
289
  }
301
  );
302
  $curl_url = $this->apiDomain . "/google-ads/remarketing-snippets";
303
  $postData = [
304
+ 'customer_id' => esc_attr($customer_id)
305
  ];
306
  $postData = json_encode($postData);
307
  $ch = curl_init();
348
  );
349
  $curl_url = $this->apiDomain . "/google-ads/conversion-list";
350
  $postData = [
351
+ 'merchant_id' => esc_attr($merchant_id),
352
+ 'customer_id' => esc_attr($customer_id)
353
  ];
354
  $postData = json_encode($postData);
355
  $ch = curl_init();
691
  }
692
  }
693
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
694
  public function getCampaignCurrencySymbol($postData) {
695
  try {
696
  $url = $this->apiDomain . '/campaigns/currency-symbol';
821
  );
822
 
823
  $data = [
824
+ 'merchant_id' => esc_attr($postData['merchant_id']),
825
  'website' => $postData['website_url'],
826
+ 'account_id' => esc_attr($postData['account_id']),
827
+ 'method' => esc_attr($postData['method'])
828
  ];
829
 
830
  $this->curl_url = $url;
855
  );
856
 
857
  $data = [
858
+ 'merchant_id' => esc_attr($postData['merchant_id']),
859
  'website' => $postData['website_url'],
860
+ 'subscription_id' => esc_attr($postData['subscription_id']),
861
+ 'account_id' => esc_attr($postData['account_id']),
862
  'method' => $postData['method']
863
  ];
864
 
889
  "AccessToken:" . $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token())
890
  );
891
  $data = [
892
+ 'merchant_id' => esc_attr($postData['merchant_id']),
893
+ 'account_id' => esc_attr($postData['account_id']),
894
  'website' => $postData['website_url'],
895
  'access_token' => $this->generateAccessToken($this->get_tvc_access_token(), $this->get_tvc_refresh_token()),
896
+ 'subscription_id' => esc_attr($postData['subscription_id']),
897
  ];
898
 
899
  $this->curl_url = $url;
includes/setup/ShoppingApi.php CHANGED
@@ -14,8 +14,8 @@ class ShoppingApi {
14
  //$queries = new TVC_Queries();
15
  $this->apiDomain = TVC_API_CALL_URL;
16
  $this->token = 'MTIzNA==';
17
- $this->merchantId = $this->TVC_Admin_Helper->get_merchantId();
18
- $this->customerId = $this->TVC_Admin_Helper->get_currentCustomerId();
19
  }
20
 
21
  public function getCampaigns() {
@@ -64,7 +64,7 @@ class ShoppingApi {
64
 
65
  $data = [
66
  'customer_id' => $this->customerId,
67
- 'country_code' => $country_code
68
  ];
69
 
70
  $args = array(
@@ -112,10 +112,10 @@ class ShoppingApi {
112
  $data = [
113
  'customer_id' => $this->customerId,
114
  'graph_type' => ($date_range_type == 2 && $days_diff > 31) ? 'month' : 'day',
115
- 'date_range_type' => $date_range_type,
116
- 'days' => $days,
117
- 'from_date' => $from_date,
118
- 'to_date' => $to_date
119
  ];
120
  $args = array(
121
  'headers' => array(
@@ -161,10 +161,10 @@ class ShoppingApi {
161
  $data = [
162
  'customer_id' => $this->customerId,
163
  'graph_type' => ($date_range_type == 2 && $days_diff > 61) ? 'month' : 'day',
164
- 'date_range_type' => $date_range_type,
165
- 'days' => $days,
166
- 'from_date' => $from_date,
167
- 'to_date' => $to_date
168
  ];
169
 
170
  $header = array(
@@ -199,10 +199,10 @@ class ShoppingApi {
199
  $data = [
200
  'customer_id' => $this->customerId,
201
  'graph_type' => ($date_range_type == 2 && $days_diff > 61) ? 'month' : 'day',
202
- 'date_range_type' => $date_range_type,
203
- 'days' => $days,
204
- 'from_date' => $from_date,
205
- 'to_date' => $to_date
206
  ];
207
  $header = array(
208
  "Authorization: Bearer $this->token",
@@ -237,10 +237,10 @@ class ShoppingApi {
237
  $data = [
238
  'customer_id' => $this->customerId,
239
  'graph_type' => ($date_range_type == 2 && $days_diff > 31) ? 'month' : 'day',
240
- 'date_range_type' => $date_range_type,
241
- 'days' => $days,
242
- 'from_date' => $from_date,
243
- 'to_date' => $to_date
244
  ];
245
 
246
  $args = array(
@@ -282,11 +282,11 @@ class ShoppingApi {
282
  $data = [
283
  'merchant_id' => $this->merchantId,
284
  'customer_id' => $this->customerId,
285
- 'campaign_id' => $campaign_id,
286
- 'date_range_type' => $date_range_type,
287
- 'days' => $days,
288
- 'from_date' => $from_date,
289
- 'to_date' => $to_date
290
  ];
291
 
292
  $args = array(
@@ -328,11 +328,11 @@ class ShoppingApi {
328
  $data = [
329
  'merchant_id' => $this->merchantId,
330
  'customer_id' => $this->customerId,
331
- 'campaign_id' => $campaign_id,
332
- 'date_range_type' => $date_range_type,
333
- 'days' => $days,
334
- 'from_date' => $from_date,
335
- 'to_date' => $to_date
336
  ];
337
 
338
  $args = array(
@@ -374,7 +374,7 @@ class ShoppingApi {
374
  $data = [
375
  'merchant_id' => $this->merchantId,
376
  'customer_id' => $this->customerId,
377
- 'campaign_id' => $campaign_id
378
  ];
379
 
380
  $args = array(
@@ -421,9 +421,9 @@ class ShoppingApi {
421
  $data = [
422
  'merchant_id' => $this->merchantId,
423
  'customer_id' => $this->customerId,
424
- 'campaign_name' => $campaign_name,
425
- 'budget' => $budget,
426
- 'target_country' => $target_country,
427
  'all_products' => $all_products,
428
  'filter_by' => 'category',
429
  'filter_data' => ["id" => $category_id, "level" => $category_level]
@@ -465,15 +465,15 @@ class ShoppingApi {
465
  $data = [
466
  'merchant_id' => $this->merchantId,
467
  'customer_id' => $this->customerId,
468
- 'campaign_id' => $campaign_id,
469
- 'account_budget_id' => $budget_id,
470
- 'campaign_name' => $campaign_name,
471
- 'target_country' => $target_country,
472
- 'budget' => $budget,
473
  'status' => 2, // ENABLE => 2, PAUSED => 3, REMOVED => 4
474
  'all_products' => $all_products,
475
- 'ad_group_id' => $ad_group_id,
476
- 'ad_group_resource_name' => $ad_group_resource_name,
477
  'filter_by' => 'category',
478
  'filter_data' => ["id" => $category_id, "level" => $category_level]
479
  ];
14
  //$queries = new TVC_Queries();
15
  $this->apiDomain = TVC_API_CALL_URL;
16
  $this->token = 'MTIzNA==';
17
+ $this->merchantId = sanitize_text_field($this->TVC_Admin_Helper->get_merchantId());
18
+ $this->customerId = sanitize_text_field($this->TVC_Admin_Helper->get_currentCustomerId());
19
  }
20
 
21
  public function getCampaigns() {
64
 
65
  $data = [
66
  'customer_id' => $this->customerId,
67
+ 'country_code' => sanitize_text_field($country_code)
68
  ];
69
 
70
  $args = array(
112
  $data = [
113
  'customer_id' => $this->customerId,
114
  'graph_type' => ($date_range_type == 2 && $days_diff > 31) ? 'month' : 'day',
115
+ 'date_range_type' => sanitize_text_field($date_range_type),
116
+ 'days' => sanitize_text_field($days),
117
+ 'from_date' => sanitize_text_field($from_date),
118
+ 'to_date' => sanitize_text_field($to_date)
119
  ];
120
  $args = array(
121
  'headers' => array(
161
  $data = [
162
  'customer_id' => $this->customerId,
163
  'graph_type' => ($date_range_type == 2 && $days_diff > 61) ? 'month' : 'day',
164
+ 'date_range_type' => sanitize_text_field($date_range_type),
165
+ 'days' => sanitize_text_field($days),
166
+ 'from_date' => sanitize_text_field($from_date),
167
+ 'to_date' => sanitize_text_field($to_date)
168
  ];
169
 
170
  $header = array(
199
  $data = [
200
  'customer_id' => $this->customerId,
201
  'graph_type' => ($date_range_type == 2 && $days_diff > 61) ? 'month' : 'day',
202
+ 'date_range_type' => sanitize_text_field($date_range_type),
203
+ 'days' => sanitize_text_field($days),
204
+ 'from_date' => sanitize_text_field($from_date),
205
+ 'to_date' => sanitize_text_field($to_date)
206
  ];
207
  $header = array(
208
  "Authorization: Bearer $this->token",
237
  $data = [
238
  'customer_id' => $this->customerId,
239
  'graph_type' => ($date_range_type == 2 && $days_diff > 31) ? 'month' : 'day',
240
+ 'date_range_type' => sanitize_text_field($date_range_type),
241
+ 'days' => sanitize_text_field($days),
242
+ 'from_date' => sanitize_text_field($from_date),
243
+ 'to_date' => sanitize_text_field($to_date)
244
  ];
245
 
246
  $args = array(
282
  $data = [
283
  'merchant_id' => $this->merchantId,
284
  'customer_id' => $this->customerId,
285
+ 'campaign_id' => sanitize_text_field($campaign_id),
286
+ 'date_range_type' => sanitize_text_field($date_range_type),
287
+ 'days' => sanitize_text_field($days),
288
+ 'from_date' => sanitize_text_field($from_date),
289
+ 'to_date' => sanitize_text_field($to_date)
290
  ];
291
 
292
  $args = array(
328
  $data = [
329
  'merchant_id' => $this->merchantId,
330
  'customer_id' => $this->customerId,
331
+ 'campaign_id' => sanitize_text_field($campaign_id),
332
+ 'date_range_type' => sanitize_text_field($date_range_type),
333
+ 'days' => sanitize_text_field($days),
334
+ 'from_date' => sanitize_text_field($from_date),
335
+ 'to_date' => sanitize_text_field($to_date)
336
  ];
337
 
338
  $args = array(
374
  $data = [
375
  'merchant_id' => $this->merchantId,
376
  'customer_id' => $this->customerId,
377
+ 'campaign_id' => sanitize_text_field($campaign_id)
378
  ];
379
 
380
  $args = array(
421
  $data = [
422
  'merchant_id' => $this->merchantId,
423
  'customer_id' => $this->customerId,
424
+ 'campaign_name' => sanitize_text_field($campaign_name),
425
+ 'budget' => sanitize_text_field($budget),
426
+ 'target_country' => sanitize_text_field($target_country),
427
  'all_products' => $all_products,
428
  'filter_by' => 'category',
429
  'filter_data' => ["id" => $category_id, "level" => $category_level]
465
  $data = [
466
  'merchant_id' => $this->merchantId,
467
  'customer_id' => $this->customerId,
468
+ 'campaign_id' => sanitize_text_field($campaign_id),
469
+ 'account_budget_id' => sanitize_text_field($budget_id),
470
+ 'campaign_name' => sanitize_text_field($campaign_name),
471
+ 'target_country' => sanitize_text_field($target_country),
472
+ 'budget' => sanitize_text_field($budget),
473
  'status' => 2, // ENABLE => 2, PAUSED => 3, REMOVED => 4
474
  'all_products' => $all_products,
475
+ 'ad_group_id' => sanitize_text_field($ad_group_id),
476
+ 'ad_group_resource_name' => sanitize_text_field($ad_group_resource_name),
477
  'filter_by' => 'category',
478
  'filter_data' => ["id" => $category_id, "level" => $category_level]
479
  ];
includes/setup/account.php CHANGED
@@ -18,51 +18,50 @@ class TVC_Account {
18
  $message = ""; $class="";
19
  $googleDetail = [];
20
  $plan_id = 1;
21
- $plan_name = "Free Plan";
22
- $plan_price ="Free";
23
  $api_licence_key="";
24
  $paypal_subscr_id = "";
25
  $product_sync_max_limit ="100";
26
  $activation_date = "";
27
  $next_payment_date = "";
28
- $subscription_type = "";
29
  if(isset($this->google_detail['setting'])){
30
  if ($this->google_detail['setting']) {
31
  $googleDetail = $this->google_detail['setting'];
32
  if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
33
- $plan_id = $googleDetail->plan_id;
34
  }
35
  if(isset($googleDetail->licence_key) && !in_array($googleDetail->plan_id, array("1"))){
36
- $api_licence_key = $googleDetail->licence_key;
37
  }
38
- if(isset($googleDetail->subscription_type) && !in_array($googleDetail->plan_id, array("1"))){
39
  if($googleDetail->subscription_type == 1){
40
  // $subscription_type = " ( Monthly )";
41
  }else if($googleDetail->subscription_type == 2){
42
  //$subscription_type = " ( Yearly )";
43
  }
44
- }
45
-
46
  if(isset($googleDetail->plan_name) && !in_array($googleDetail->plan_id, array("1"))){
47
- $plan_name = $googleDetail->plan_name.$subscription_type;
48
  }
49
  if(isset($googleDetail->price) && !in_array($googleDetail->plan_id, array("1"))){
50
- $plan_price = $googleDetail->price." USD";
51
  }
52
  if(isset($googleDetail->paypal_subscr_id) && !in_array($googleDetail->plan_id, array("1"))){
53
- $paypal_subscr_id = $googleDetail->paypal_subscr_id;
54
  }
55
  if(isset($googleDetail->max_limit)){
56
- $product_sync_max_limit = $googleDetail->max_limit;
57
  if(in_array($plan_id, array("7","8"))){
58
- $product_sync_max_limit = "Unlimited";
59
  }
60
  }
61
  if(isset($googleDetail->subscription_activation_date) && !in_array($googleDetail->plan_id, array("1"))){
62
- $activation_date = $googleDetail->subscription_activation_date;
63
  }
64
  if(isset($googleDetail->subscription_expiry_date) && !in_array($googleDetail->plan_id, array("1"))){
65
- $next_payment_date = $googleDetail->subscription_expiry_date;
66
  }
67
  }
68
  }
@@ -79,47 +78,45 @@ class TVC_Account {
79
  <div class="licence tvc-licence" >
80
  <div class="tvc_licence_key_wapper <?php if($plan_id != 1){?>tvc-hide<?php }?>">
81
  <?php if($plan_id == 1){?>
82
- <p>You are using our free plugin, no licence needed ! Happy analyzing..!! :)</p>
83
- <p class="font-weight-bold">To unlock more features of google products, consider our <a href="<?php echo $this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Account+Summary+pro+version&utm_campaign=Upsell+at+Conversios'; ?>" target="_blank">pro version.</a></p>
84
  <?php }?>
85
  <form method="post" name="google-analytic" id="tvc-licence-active">
86
  <div class="input-group">
87
  <input type="text" id="licence_key" name="licence_key" class="form-control" placeholder="Already purchased? Enter licence key" required="">
88
  <div class="input-group-append">
89
- <button type="submit" class="btn btn-primary" name="verify-licence-key"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/right-arrow.svg'; ?>" alt="active licence key"></button>
90
  </div>
91
  </div>
92
  </form>
93
  </div>
94
  <div class="google-account-analytics tvc_licence_key_change_wapper <?php if($plan_id == 1){?>tvc-hide<?php }?>">
95
  <div class="acc-num">
96
- <label class="ga-title tvc_licence_key_title">Licence key:</label>
97
  <p class="ga-text tvc_licence_key"><?php echo $api_licence_key; ?></p>
98
- <p class="ga-text text-right tvc_licence_key_change"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg'; ?>" alt="active licence key"></p>
99
  </div>
100
  </div>
101
  </div>
102
 
103
  <div class="tvc-table">
104
- <strong>Account Summary</strong>
105
  <table>
106
  <tbody>
107
- <tr><th>Plan name</th><td><?php echo $plan_name; ?></td></tr>
108
- <tr><th>Plan price</th><td><?php echo $plan_price; ?></td></tr>
109
- <tr><th>Product sync limit</th><td><?php echo $product_sync_max_limit; ?></td></tr>
110
  <?php if($plan_id != 1){?>
111
- <tr><th>Active licence key</th><td><?php echo $api_licence_key; ?></td></tr>
112
- <tr><th>PayPal subscription id</th><td><?php echo $paypal_subscr_id; ?></td></tr>
113
- <tr><th>Last bill date</th><td><?php echo $activation_date; ?></td></tr>
114
- <tr><th>Expected bill date</th><td><?php echo $next_payment_date; ?></td></tr>
115
  <?php } ?>
116
  </tbody>
117
  </table>
118
  </div>
119
  </div>
120
- <div class="col-md-6 col-lg-4">
121
- <?php //echo get_tvc_google_ads_help_html(); ?>
122
- </div>
123
  </div>
124
  </div>
125
  </div>
18
  $message = ""; $class="";
19
  $googleDetail = [];
20
  $plan_id = 1;
21
+ $plan_name = __("Free Plan","conversios");
22
+ $plan_price = __("Free","conversios");
23
  $api_licence_key="";
24
  $paypal_subscr_id = "";
25
  $product_sync_max_limit ="100";
26
  $activation_date = "";
27
  $next_payment_date = "";
28
+ //$subscription_type = "";
29
  if(isset($this->google_detail['setting'])){
30
  if ($this->google_detail['setting']) {
31
  $googleDetail = $this->google_detail['setting'];
32
  if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
33
+ $plan_id = esc_attr($googleDetail->plan_id);
34
  }
35
  if(isset($googleDetail->licence_key) && !in_array($googleDetail->plan_id, array("1"))){
36
+ $api_licence_key = esc_attr($googleDetail->licence_key);
37
  }
38
+ /*if(isset($googleDetail->subscription_type) && !in_array($googleDetail->plan_id, array("1"))){
39
  if($googleDetail->subscription_type == 1){
40
  // $subscription_type = " ( Monthly )";
41
  }else if($googleDetail->subscription_type == 2){
42
  //$subscription_type = " ( Yearly )";
43
  }
44
+ }*/
 
45
  if(isset($googleDetail->plan_name) && !in_array($googleDetail->plan_id, array("1"))){
46
+ $plan_name = esc_attr($googleDetail->plan_name);
47
  }
48
  if(isset($googleDetail->price) && !in_array($googleDetail->plan_id, array("1"))){
49
+ $plan_price = esc_attr($googleDetail->price." USD");
50
  }
51
  if(isset($googleDetail->paypal_subscr_id) && !in_array($googleDetail->plan_id, array("1"))){
52
+ $paypal_subscr_id = esc_attr($googleDetail->paypal_subscr_id);
53
  }
54
  if(isset($googleDetail->max_limit)){
55
+ $product_sync_max_limit = esc_attr($googleDetail->max_limit);
56
  if(in_array($plan_id, array("7","8"))){
57
+ $product_sync_max_limit = __("Unlimited","conversios");
58
  }
59
  }
60
  if(isset($googleDetail->subscription_activation_date) && !in_array($googleDetail->plan_id, array("1"))){
61
+ $activation_date = esc_attr($googleDetail->subscription_activation_date);
62
  }
63
  if(isset($googleDetail->subscription_expiry_date) && !in_array($googleDetail->plan_id, array("1"))){
64
+ $next_payment_date = esc_attr($googleDetail->subscription_expiry_date);
65
  }
66
  }
67
  }
78
  <div class="licence tvc-licence" >
79
  <div class="tvc_licence_key_wapper <?php if($plan_id != 1){?>tvc-hide<?php }?>">
80
  <?php if($plan_id == 1){?>
81
+ <p><?php _e("You are using our free plugin, no licence needed ! Happy analyzing..!! :)","conversios"); ?></p>
82
+ <p class="font-weight-bold"><?php _e("To unlock more features of google products, consider our","conversios"); ?> <a href="<?php echo $this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=Account+Summary+pro+version&utm_campaign=Upsell+at+Conversios'; ?>" target="_blank"><?php _e("pro version.","conversios"); ?></a></p>
83
  <?php }?>
84
  <form method="post" name="google-analytic" id="tvc-licence-active">
85
  <div class="input-group">
86
  <input type="text" id="licence_key" name="licence_key" class="form-control" placeholder="Already purchased? Enter licence key" required="">
87
  <div class="input-group-append">
88
+ <button type="submit" class="btn btn-primary" name="verify-licence-key"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/right-arrow.svg'); ?>" alt="active licence key"></button>
89
  </div>
90
  </div>
91
  </form>
92
  </div>
93
  <div class="google-account-analytics tvc_licence_key_change_wapper <?php if($plan_id == 1){?>tvc-hide<?php }?>">
94
  <div class="acc-num">
95
+ <label class="ga-title tvc_licence_key_title"><?php _e("Licence key:","conversios"); ?></label>
96
  <p class="ga-text tvc_licence_key"><?php echo $api_licence_key; ?></p>
97
+ <p class="ga-text text-right tvc_licence_key_change"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg'); ?>" alt="active licence key"></p>
98
  </div>
99
  </div>
100
  </div>
101
 
102
  <div class="tvc-table">
103
+ <strong><?php _e("Account Summary","conversios"); ?></strong>
104
  <table>
105
  <tbody>
106
+ <tr><th><?php _e("Plan name","conversios"); ?></th><td><?php echo $plan_name; ?></td></tr>
107
+ <tr><th><?php _e("Plan price","conversios"); ?></th><td><?php echo $plan_price; ?></td></tr>
108
+ <tr><th><?php _e("Product sync limit","conversios"); ?></th><td><?php echo $product_sync_max_limit; ?></td></tr>
109
  <?php if($plan_id != 1){?>
110
+ <tr><th><?php _e("Active licence key","conversios"); ?></th><td><?php echo $api_licence_key; ?></td></tr>
111
+ <tr><th><?php _e("PayPal subscription id","conversios"); ?></th><td><?php echo $paypal_subscr_id; ?></td></tr>
112
+ <tr><th><?php _e("Last bill date","conversios"); ?></th><td><?php echo $activation_date; ?></td></tr>
113
+ <tr><th><?php _e("Expected bill date","conversios"); ?></th><td><?php echo $next_payment_date; ?></td></tr>
114
  <?php } ?>
115
  </tbody>
116
  </table>
117
  </div>
118
  </div>
119
+ <div class="col-md-6 col-lg-4"></div>
 
 
120
  </div>
121
  </div>
122
  </div>
includes/setup/add-campaign.php CHANGED
@@ -5,6 +5,7 @@ class AddCampaign {
5
  protected $merchantId;
6
  protected $new_campaign;
7
  protected $TVC_Admin_Helper;
 
8
 
9
  public function __construct() {
10
  global $wpdb;
@@ -13,6 +14,7 @@ class AddCampaign {
13
  $this->post_data = $_POST;
14
  $this->merchantId = $this->TVC_Admin_Helper->get_merchantId();
15
  $this->currentCustomerId = $this->TVC_Admin_Helper->get_currentCustomerId();
 
16
  $this->html_run();
17
  }
18
  public function includes() {
@@ -40,6 +42,7 @@ class AddCampaign {
40
  }
41
 
42
  public function create_form() {
 
43
  $campaigns_list = [];
44
  $categories = [];
45
  $campaign_performance = [];
@@ -69,46 +72,42 @@ class AddCampaign {
69
 
70
 
71
  if (isset($_POST['create_campaign'])) {
72
- $campaign_name = isset($_POST['campaign_name'])?$_POST['campaign_name']:"";
73
- $campaign_budget = isset($_POST['campaign_budget'])?$_POST['campaign_budget']:"";
74
- $sales_country = isset($_POST['sales_country'])?$_POST['sales_country']:"";
75
- $all_products = isset($_POST['all_products'])?$_POST['all_products']:"";
76
- $category_id = isset($_POST['dimension'])?$_POST['dimension']:"";
77
- $category_level = isset($_POST['category_level'])?$_POST['category_level']:"";
78
 
79
  $campaign = $api_obj->createCampaign($campaign_name, $campaign_budget, $sales_country, $all_products, $category_id, $category_level);
80
  if(isset($campaign->errors) && !empty($campaign->errors)){
81
- $class = 'notice notice-error';
82
  $message = esc_html__((isset($campaign->errors) && isset($campaign->errors[0])) ? $campaign->errors[0] : 'Error', 'sample-text-domain');
83
- printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html('Error : ' . $message));
84
  }else{
85
- $class = 'notice notice-success';
86
  $campaign_neme = isset($campaign->data)?'with Resource name '.$campaign->data:"";
87
- $message = esc_html__('Smart Shopping Campaign Created Successfully '.$campaign_neme, 'sample-text-domain');
88
- printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
89
  }
90
  }else if (isset($_POST['update_campaign'])) {
91
- $campaign_name = isset($_POST['campaign_name'])?$_POST['campaign_name']:"";
92
- $campaign_budget = isset($_POST['campaign_budget'])?$_POST['campaign_budget']:"";
93
- $campaign_id = isset($_POST['campaign_id'])?$_POST['campaign_id']:"";
94
- $budget_id = isset($_POST['budget_id'])?$_POST['budget_id']:"";
95
- $sales_country = isset($_POST['sales_country'])?$_POST['sales_country']:"";
96
- $all_products = isset($_POST['all_products'])?$_POST['all_products']:"";
97
- $ad_group_id = isset($_POST['ad_group_id'])?$_POST['ad_group_id']:"";
98
- $ad_group_resource_name = isset($_POST['ad_group_resource_name'])?$_POST['ad_group_resource_name']:"";
99
- $category_id = isset($_POST['dimension']) ? $_POST['dimension']:"";
100
- $category_level = isset($_POST['category_level'])?$_POST['category_level']:"";
101
 
102
  $campaign = $api_obj->updateCampaign($campaign_name, $campaign_budget, $campaign_id, $budget_id, $sales_country, $all_products, $category_id, $category_level, $ad_group_id, $ad_group_resource_name);
103
  if (isset($campaign->errors) && !empty($campaign->errors)) {
104
- $class = 'notice notice-error';
105
  $message = esc_html__(isset($campaign->errors) ? $campaign->errors[0] : 'Error', 'sample-text-domain');
106
- printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html('Error : ' . $message));
107
  } else if(isset($campaign->data)){
108
  $campaign_neme = isset($campaign->data)?'with Resource name '.$campaign->data:"";
109
- $class = 'notice notice-success';
110
  $message = esc_html__('Smart Shopping Campaign Updated Successfully ' . $campaign_neme, 'sample-text-domain');
111
- printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
112
  // $url = admin_url('admin.php?page=tvc-configuration-page');
113
  //wp_redirect($url);
114
 
@@ -121,15 +120,14 @@ class AddCampaign {
121
  if (isset($campaign_details_res->errors) && !empty($campaign_details_res->errors)) {
122
  $error_code = array_keys($campaign_details_res->errors)[0];
123
  if($error_code == 404){
124
- $error_msg = 'Campaign details not found';
125
  }else{
126
  if (isset($campaign_details_res->error_data) && !empty($campaign_details_res->error_data)) {
127
  // $error_msg = array_values($campaign_details_res->error_data)[0]->errors[0];
128
  }
129
  }
130
- $class = 'notice notice-error';
131
  $message = esc_html__(isset($error_msg) ? $error_msg : 'There was some error fetching campaign details.', 'sample-text-domain');
132
- printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html('Error : ' . $message));
133
  } else {
134
  $campaign_details = $campaign_details_res->data;
135
  if ($campaign_details['status'] == 200) {
@@ -141,53 +139,56 @@ class AddCampaign {
141
  ?>
142
 
143
  <div class="tab-content">
 
 
 
144
  <div class="tab-pane show active" id="googleShoppingFeed">
145
  <div class="tab-card">
146
  <div class="row">
147
  <div class="col-md-6 col-lg-8 edit-section">
148
  <div class="edit-header-section">
149
  <script>
150
- var back_img = '<img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'; ?>" alt="back"/>';
151
- document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
152
  </script>
153
  </div>
154
  <?php
155
  if (!isset($_GET['edit'])) { ?>
156
  <form method="post" id="create-form">
157
  <div class="form-group">
158
- <h2 class="lead">Create a Smart Shopping Campaign to promote your products</h2>
159
- <p style="text-align:left; font-size: 14px;">A Smart Shopping campaign shows your products to potential customers across Google, Google Search Partners, the Google Display Network, YouTube, and Gmail.</p>
160
  <p style="text-align:left">
161
- <a href="https://support.google.com/google-ads/answer/7674739?hl=en" target="_blank">Learn more about Smart Shopping Campaigns.</a>
162
  </p>
163
  </div>
164
  <div class="form-row" style="margin-bottom: 0">
165
  <div class="col-md-12 row">
166
- <label for="campaign-name" class="form-group col-md-4 mt-2 text-left font-weight-bold">Campaign name: </label>
167
  <input type="text" class="form-group col-md-6" name="campaign_name" id="campaign-name" required>
168
  </div>
169
  <div class="col-md-12 row">
170
- <label for="campaign-budget" class="form-group col-md-4 mt-2 mb-0 text-left"><span class="font-weight-bold">Daily Campaign Budget (<?php echo $currency ;?>):</span> <p style="text-align:left;font-size: 11px;">Only pay if someone clicks your ad. Recommended minimum budget of <?php echo $currency ; ?>5 per day.</p></label>
171
  <input type="number" class="form-group col-md-6" name="campaign_budget" id="campaign-budget" style="height: 35px;" required>
172
  </div>
173
  <div class="col-md-12 row">
174
- <label for="sales-country" class="form-group col-md-4 mt-2 text-left"><span class="font-weight-bold">Target Country:</span> <p style="text-align:left;font-size: 11px;">If you want to target multiple countries, then create multiple campaigns.</p></label><?php echo $this->country_dropdown(); ?>
175
  </div>
176
  <div class="col-md-12 row">
177
- <label for="campaign-products" class="form-group col-md-4 mt-2 text-left font-weight-bold">Products in campaign: </label>
178
- <label class="mt-2"><input type="radio" id="campaign-products" name="all_products" value="1" checked />Include all Merchant Center products</label>
179
  </div>
180
  <div class="col-md-12 row" style="display:none;">
181
  <div class="col-md-4"></div>
182
- <label class=""><input type="radio" id="campaign-product-partition" value="0" name="all_products" />Select products using product partition filters</label>
183
  </div>
184
  <div class="col-md-12 row" style="display:none;">
185
  <div class="col-md-4"></div>
186
- <label>Product Partition filter dimension:</label><b> Category</b>
187
  </div>
188
  <div class="col-md-12 row" style="display:none;">
189
  <div class="col-md-4"></div>
190
- <label>Dimension Value:</label>
191
  <input type="hidden" name="category_level" id="category_level" value="" />
192
  <select class="col-md-3 ml-2" name="dimension" id="dimension" onchange="changeCategory()">
193
  <?php
@@ -197,38 +198,38 @@ class AddCampaign {
197
  </select>
198
  </div>
199
  <div class="col-md-12 row">
200
- <label class="form-group col-md-12 mt-2 mb-0 text-left font-weight-bold">Campaign duration: </label>
201
- <p class="ml-3" style="text-align:left; font-size: 14px;">Your campaign will run until you pause it. You can pause your campaign at any time, however it can take up to 30 days for google to optimize your products and ads.</p>
202
  </div>
203
  </div>
204
  <div class="col-12 row">
205
- <button onclick="showLoader()" type="submit" class="btn btn-primary" id="create_campaign" name="create_campaign">Create Smart Shopping Campaign</button>
206
  </div>
207
  </form>
208
  <hr>
209
  <form method="post">
210
  <div class="text-left">
211
- <p style="font-size: 14px;">Please note that campaigns will be created with accounts configured in previous steps.</p>
212
- <p style="font-size: 14px;"><span>Google Merchant Center : <?php echo $this->merchantId; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;<span>Google Ads Account Id : <?php echo $this->currentCustomerId; ?></span></p>
213
  </div>
214
  </form>
215
  <?php
216
  } else if (isset($_GET['edit']) && $_GET['edit'] != '') { ?>
217
  <form method="post">
218
  <div class="form-group">
219
- <h2 class="lead">Create/Update a Smart Shopping Campaign to promote your products</h2>
220
- <p style="text-align:left; font-size: 14px;">A Smart Shopping campaign shows your products to potential customers across Google, Google Search Partners, the Google Display Network, YouTube, and Gmail.</p>
221
  <p style="text-align:left">
222
- <a href="https://support.google.com/google-ads/answer/7674739?hl=en" target="_blank">Learn more about Smart Shopping Campaigns.</a>
223
  </p>
224
  </div>
225
  <div class="form-row" style="margin-bottom: 0">
226
  <div class="col-md-12 row">
227
- <label for="campaign-name" class="form-group col-md-4 mt-2 text-left font-weight-bold">Campaign name: </label>
228
  <input type="text" class="form-group col-md-6" name="campaign_name" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->compaignName:""; ?>" id="campaign-name" required>
229
  </div>
230
  <div class="col-md-12 row">
231
- <label for="campaign-budget" class="form-group col-md-4 mt-2 mb-0 text-left"><span class="font-weight-bold">Daily Campaign Budget (<?php echo $currency; ?>):</span> <p style="text-align:left;font-size: 11px;">Only pay if someone clicks your ad. Recommended minimum budget of <?php echo $currency; ?>5 per day.</p></label>
232
  <input type="number" class="form-group col-md-6" name="campaign_budget" id="campaign-budget" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->dailyBudget:""; ?>" style="height: 35px;" required>
233
  </div>
234
  <input type="hidden" name="campaign_id" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->compaignId:""; ?>" />
@@ -236,18 +237,18 @@ class AddCampaign {
236
  <input type="hidden" name="ad_group_id" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->adGroupId:""; ?>" />
237
  <input type="hidden" name="ad_group_resource_name" value="<?php echo(isset($campaign_details) && $campaign_details != '')? $campaign_details->adGroupResourceName:""; ?>" />
238
  <div class="col-md-12 row">
239
- <label for="sales-country" class="form-group col-md-4 mt-2 text-left"><span class="font-weight-bold">Target Country:</span> <p style="text-align:left;font-size: 11px;">If you want to target multiple countries, then create multiple campaigns.</p></label>
240
  <?php echo $this->country_dropdown($defaultCountry, true); ?>
241
  </div>
242
  <div class="col-md-12 row">
243
- <label for="campaign-products" class="form-group col-md-4 mt-2 text-left font-weight-bold">Products in campaign: </label>
244
  <label class="mt-2">
245
  <?php
246
  if(isset($campaign_details) && $campaign_details->category_level > 0 && $campaign_details->category_id > 0){
247
  echo '<input type="radio" id="campaign-products" name="all_products" value="1" />';
248
  }else{
249
  echo '<input type="radio" id="campaign-products" name="all_products" value="1" checked />';
250
- } ?> Include all Merchant Center products</label>
251
  </div>
252
  <div class="col-md-12 row" style="display: none;">
253
  <div class="col-md-4"></div>
@@ -257,15 +258,15 @@ class AddCampaign {
257
  echo '<input type="radio" id="campaign-product-partition" value="0" name="all_products" checked />';
258
  } else {
259
  echo '<input type="radio" id="campaign-product-partition" value="0" name="all_products" />';
260
- } ?> Select products using product partition filters</label>
261
  </div>
262
  <div class="col-md-12 row" style="display: none;">
263
  <div class="col-md-4"></div>
264
- <label>Product Partition filter dimension:</label><b> Category</b>
265
  </div>
266
  <div class="col-md-12 row" style="display: none;">
267
  <div class="col-md-4"></div>
268
- <label>Dimension Value:</label>
269
  <input type="hidden" name="category_level" id="category_level" value=" <?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->category_level:""; ?>" />
270
  <select class="col-md-3 ml-2" name="dimension" id="dimension" onchange="changeCategory()">
271
  <?php
@@ -281,19 +282,19 @@ class AddCampaign {
281
  </select>
282
  </div>
283
  <div class="col-md-12 row">
284
- <label class="form-group col-md-12 mt-2 mb-0 text-left font-weight-bold">Campaign duration: </label>
285
- <p class="ml-3" style="text-align:left; font-size: 14px;">Your campaign will run until you pause it. You can pause your campaign at any time, however it can take up to 30 days for google to optimize your products and ads.</p>
286
  </div>
287
  </div>
288
  <div class="col-12 row">
289
- <button onclick="showLoader()" type="submit" class="btn btn-primary btn-success" id="update_campaign" name="update_campaign">Update Smart Shopping Campaign</button>
290
  </div>
291
  </form>
292
  <hr>
293
  <form method="post">
294
  <div class="text-left">
295
- <p style="font-size: 14px;">Please note that campaigns will be created with accounts configured in previous steps.</p>
296
- <p style="font-size: 14px;"><span>Google Merchant Center : <?php echo $this->merchantId; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;<span>Google Ads Account Id : <?php echo $this->currentCustomerId; ?></span></p>
297
  </div>
298
  </form>
299
  <?php } ?>
5
  protected $merchantId;
6
  protected $new_campaign;
7
  protected $TVC_Admin_Helper;
8
+ protected $site_url;
9
 
10
  public function __construct() {
11
  global $wpdb;
14
  $this->post_data = $_POST;
15
  $this->merchantId = $this->TVC_Admin_Helper->get_merchantId();
16
  $this->currentCustomerId = $this->TVC_Admin_Helper->get_currentCustomerId();
17
+ $this->site_url = "admin.php?page=conversios-google-shopping-feed&tab=";
18
  $this->html_run();
19
  }
20
  public function includes() {
42
  }
43
 
44
  public function create_form() {
45
+ $message = "";
46
  $campaigns_list = [];
47
  $categories = [];
48
  $campaign_performance = [];
72
 
73
 
74
  if (isset($_POST['create_campaign'])) {
75
+ $campaign_name = esc_attr(isset($_POST['campaign_name'])?$_POST['campaign_name']:"");
76
+ $campaign_budget = esc_attr(isset($_POST['campaign_budget'])?$_POST['campaign_budget']:"");
77
+ $sales_country = esc_attr(isset($_POST['sales_country'])?$_POST['sales_country']:"");
78
+ $all_products = esc_attr(isset($_POST['all_products'])?$_POST['all_products']:"");
79
+ $category_id = esc_attr(isset($_POST['dimension'])?$_POST['dimension']:"");
80
+ $category_level = esc_attr(isset($_POST['category_level'])?$_POST['category_level']:"");
81
 
82
  $campaign = $api_obj->createCampaign($campaign_name, $campaign_budget, $sales_country, $all_products, $category_id, $category_level);
83
  if(isset($campaign->errors) && !empty($campaign->errors)){
84
+ $class = 'alert-message tvc-alert-error';
85
  $message = esc_html__((isset($campaign->errors) && isset($campaign->errors[0])) ? $campaign->errors[0] : 'Error', 'sample-text-domain');
 
86
  }else{
87
+ $class = 'alert-message tvc-alert-success';
88
  $campaign_neme = isset($campaign->data)?'with Resource name '.$campaign->data:"";
89
+ $message = esc_html__('Smart Shopping Campaign Created Successfully '.$campaign_neme, 'sample-text-domain');
 
90
  }
91
  }else if (isset($_POST['update_campaign'])) {
92
+ $campaign_name = esc_attr(isset($_POST['campaign_name'])?$_POST['campaign_name']:"");
93
+ $campaign_budget = esc_attr(isset($_POST['campaign_budget'])?$_POST['campaign_budget']:"");
94
+ $campaign_id = esc_attr(isset($_POST['campaign_id'])?$_POST['campaign_id']:"");
95
+ $budget_id = esc_attr(isset($_POST['budget_id'])?$_POST['budget_id']:"");
96
+ $sales_country = esc_attr(isset($_POST['sales_country'])?$_POST['sales_country']:"");
97
+ $all_products = esc_attr(isset($_POST['all_products'])?$_POST['all_products']:"");
98
+ $ad_group_id = esc_attr(isset($_POST['ad_group_id'])?$_POST['ad_group_id']:"");
99
+ $ad_group_resource_name = esc_attr(isset($_POST['ad_group_resource_name'])?$_POST['ad_group_resource_name']:"");
100
+ $category_id = esc_attr(isset($_POST['dimension']) ? $_POST['dimension']:"");
101
+ $category_level = esc_attr(isset($_POST['category_level'])?$_POST['category_level']:"");
102
 
103
  $campaign = $api_obj->updateCampaign($campaign_name, $campaign_budget, $campaign_id, $budget_id, $sales_country, $all_products, $category_id, $category_level, $ad_group_id, $ad_group_resource_name);
104
  if (isset($campaign->errors) && !empty($campaign->errors)) {
105
+ $class = 'alert-message tvc-alert-error';
106
  $message = esc_html__(isset($campaign->errors) ? $campaign->errors[0] : 'Error', 'sample-text-domain');
 
107
  } else if(isset($campaign->data)){
108
  $campaign_neme = isset($campaign->data)?'with Resource name '.$campaign->data:"";
109
+ $class = 'alert-message tvc-alert-success';
110
  $message = esc_html__('Smart Shopping Campaign Updated Successfully ' . $campaign_neme, 'sample-text-domain');
 
111
  // $url = admin_url('admin.php?page=tvc-configuration-page');
112
  //wp_redirect($url);
113
 
120
  if (isset($campaign_details_res->errors) && !empty($campaign_details_res->errors)) {
121
  $error_code = array_keys($campaign_details_res->errors)[0];
122
  if($error_code == 404){
123
+ $error_msg = __("Campaign details not found","conversios");
124
  }else{
125
  if (isset($campaign_details_res->error_data) && !empty($campaign_details_res->error_data)) {
126
  // $error_msg = array_values($campaign_details_res->error_data)[0]->errors[0];
127
  }
128
  }
129
+ $class = 'alert-message tvc-alert-error';
130
  $message = esc_html__(isset($error_msg) ? $error_msg : 'There was some error fetching campaign details.', 'sample-text-domain');
 
131
  } else {
132
  $campaign_details = $campaign_details_res->data;
133
  if ($campaign_details['status'] == 200) {
139
  ?>
140
 
141
  <div class="tab-content">
142
+ <?php if($message){
143
+ printf('<div class="%1$s"><div class="alert">%2$s</div></div>', esc_attr($class), esc_html($message));
144
+ }?>
145
  <div class="tab-pane show active" id="googleShoppingFeed">
146
  <div class="tab-card">
147
  <div class="row">
148
  <div class="col-md-6 col-lg-8 edit-section">
149
  <div class="edit-header-section">
150
  <script>
151
+ var back_img = '<img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'); ?>" alt="back"/>';
152
+ document.write('<a href="<?php echo $this->site_url."shopping_campaigns_page"; ?>" class="back-btn">'+back_img+'<span>Campaigns</span></a>');
153
  </script>
154
  </div>
155
  <?php
156
  if (!isset($_GET['edit'])) { ?>
157
  <form method="post" id="create-form">
158
  <div class="form-group">
159
+ <h2 class="lead"><?php _e("Create a Smart Shopping Campaign to promote your products","conversios"); ?></h2>
160
+ <p style="text-align:left; font-size: 14px;"><?php _e("A Smart Shopping campaign shows your products to potential customers across Google, Google Search Partners, the Google Display Network, YouTube, and Gmail.","conversios"); ?></p>
161
  <p style="text-align:left">
162
+ <a href="<?php echo esc_url("https://support.google.com/google-ads/answer/7674739?hl=en"); ?>" target="_blank"><?php _e("Learn more about Smart Shopping Campaigns.","conversios"); ?></a>
163
  </p>
164
  </div>
165
  <div class="form-row" style="margin-bottom: 0">
166
  <div class="col-md-12 row">
167
+ <label for="campaign-name" class="form-group col-md-4 mt-2 text-left font-weight-bold"><?php _e("Campaign name: ","conversios"); ?></label>
168
  <input type="text" class="form-group col-md-6" name="campaign_name" id="campaign-name" required>
169
  </div>
170
  <div class="col-md-12 row">
171
+ <label for="campaign-budget" class="form-group col-md-4 mt-2 mb-0 text-left"><span class="font-weight-bold"><?php _e("Daily Campaign Budget","conversios"); ?> (<?php echo $currency ;?>):</span> <p style="text-align:left;font-size: 11px;"><?php _e("Only pay if someone clicks your ad. Recommended minimum budget of $5 per day.","conversios"); ?></p></label>
172
  <input type="number" class="form-group col-md-6" name="campaign_budget" id="campaign-budget" style="height: 35px;" required>
173
  </div>
174
  <div class="col-md-12 row">
175
+ <label for="sales-country" class="form-group col-md-4 mt-2 text-left"><span class="font-weight-bold"><?php _e("Target Country:","conversios"); ?></span> <p style="text-align:left;font-size: 11px;"><?php _e("If you want to target multiple countries, then create multiple campaigns.","conversios"); ?></p></label><?php echo $this->country_dropdown(); ?>
176
  </div>
177
  <div class="col-md-12 row">
178
+ <label for="campaign-products" class="form-group col-md-4 mt-2 text-left font-weight-bold"><?php _e("Products in campaign:","conversios"); ?> </label>
179
+ <label class="mt-2"><input type="radio" id="campaign-products" name="all_products" value="1" checked /><?php _e("Include all Merchant Center products","conversios"); ?></label>
180
  </div>
181
  <div class="col-md-12 row" style="display:none;">
182
  <div class="col-md-4"></div>
183
+ <label class=""><input type="radio" id="campaign-product-partition" value="0" name="all_products" /><?php _e("Select products using product partition filters","conversios"); ?></label>
184
  </div>
185
  <div class="col-md-12 row" style="display:none;">
186
  <div class="col-md-4"></div>
187
+ <label><?php _e("Product Partition filter dimension:","conversios"); ?></label><b> Category</b>
188
  </div>
189
  <div class="col-md-12 row" style="display:none;">
190
  <div class="col-md-4"></div>
191
+ <label><?php _e("Dimension Value:","conversios"); ?></label>
192
  <input type="hidden" name="category_level" id="category_level" value="" />
193
  <select class="col-md-3 ml-2" name="dimension" id="dimension" onchange="changeCategory()">
194
  <?php
198
  </select>
199
  </div>
200
  <div class="col-md-12 row">
201
+ <label class="form-group col-md-12 mt-2 mb-0 text-left font-weight-bold"><?php _e("Campaign duration:","conversios"); ?> </label>
202
+ <p class="ml-3" style="text-align:left; font-size: 14px;"><?php _e("Your campaign will run until you pause it. You can pause your campaign at any time, however it can take up to 30 days for google to optimize your products and ads.","conversios"); ?></p>
203
  </div>
204
  </div>
205
  <div class="col-12 row">
206
+ <button onclick="showLoader()" type="submit" class="btn btn-primary" id="create_campaign" name="create_campaign"><?php _e("Create Smart Shopping Campaign","conversios"); ?></button>
207
  </div>
208
  </form>
209
  <hr>
210
  <form method="post">
211
  <div class="text-left">
212
+ <p style="font-size: 14px;"><?php _e("Please note that campaigns will be created with accounts configured in previous steps.","conversios"); ?></p>
213
+ <p style="font-size: 14px;"><span><?php _e("Google Merchant Center :","conversios"); ?> <?php echo $this->merchantId; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;<span><?php _e("Google Ads Account Id :","conversios"); ?> <?php echo $this->currentCustomerId; ?></span></p>
214
  </div>
215
  </form>
216
  <?php
217
  } else if (isset($_GET['edit']) && $_GET['edit'] != '') { ?>
218
  <form method="post">
219
  <div class="form-group">
220
+ <h2 class="lead"><?php _e("Create/Update a Smart Shopping Campaign to promote your products","conversios"); ?></h2>
221
+ <p style="text-align:left; font-size: 14px;"><?php _e("A Smart Shopping campaign shows your products to potential customers across Google, Google Search Partners, the Google Display Network, YouTube, and Gmail.","conversios"); ?></p>
222
  <p style="text-align:left">
223
+ <a href="https://support.google.com/google-ads/answer/7674739?hl=en" target="_blank"><?php _e("Learn more about Smart Shopping Campaigns.","conversios"); ?></a>
224
  </p>
225
  </div>
226
  <div class="form-row" style="margin-bottom: 0">
227
  <div class="col-md-12 row">
228
+ <label for="campaign-name" class="form-group col-md-4 mt-2 text-left font-weight-bold"><?php _e("Campaign name:","conversios"); ?> </label>
229
  <input type="text" class="form-group col-md-6" name="campaign_name" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->compaignName:""; ?>" id="campaign-name" required>
230
  </div>
231
  <div class="col-md-12 row">
232
+ <label for="campaign-budget" class="form-group col-md-4 mt-2 mb-0 text-left"><span class="font-weight-bold"><?php _e("Daily Campaign Budget","conversios"); ?> (<?php echo $currency; ?>):</span> <p style="text-align:left;font-size: 11px;"><?php _e("Only pay if someone clicks your ad. Recommended minimum budget of","conversios"); ?> <?php echo $currency; ?>5 per day.</p></label>
233
  <input type="number" class="form-group col-md-6" name="campaign_budget" id="campaign-budget" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->dailyBudget:""; ?>" style="height: 35px;" required>
234
  </div>
235
  <input type="hidden" name="campaign_id" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->compaignId:""; ?>" />
237
  <input type="hidden" name="ad_group_id" value="<?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->adGroupId:""; ?>" />
238
  <input type="hidden" name="ad_group_resource_name" value="<?php echo(isset($campaign_details) && $campaign_details != '')? $campaign_details->adGroupResourceName:""; ?>" />
239
  <div class="col-md-12 row">
240
+ <label for="sales-country" class="form-group col-md-4 mt-2 text-left"><span class="font-weight-bold"><?php _e("Target Country:","conversios"); ?></span> <p style="text-align:left;font-size: 11px;"><?php _e("If you want to target multiple countries, then create multiple campaigns.","conversios"); ?></p></label>
241
  <?php echo $this->country_dropdown($defaultCountry, true); ?>
242
  </div>
243
  <div class="col-md-12 row">
244
+ <label for="campaign-products" class="form-group col-md-4 mt-2 text-left font-weight-bold"><?php _e("Products in campaign:","conversios"); ?> </label>
245
  <label class="mt-2">
246
  <?php
247
  if(isset($campaign_details) && $campaign_details->category_level > 0 && $campaign_details->category_id > 0){
248
  echo '<input type="radio" id="campaign-products" name="all_products" value="1" />';
249
  }else{
250
  echo '<input type="radio" id="campaign-products" name="all_products" value="1" checked />';
251
+ } ?> <?php _e("Include all Merchant Center products","conversios"); ?></label>
252
  </div>
253
  <div class="col-md-12 row" style="display: none;">
254
  <div class="col-md-4"></div>
258
  echo '<input type="radio" id="campaign-product-partition" value="0" name="all_products" checked />';
259
  } else {
260
  echo '<input type="radio" id="campaign-product-partition" value="0" name="all_products" />';
261
+ } ?> <?php _e("Select products using product partition filters","conversios"); ?></label>
262
  </div>
263
  <div class="col-md-12 row" style="display: none;">
264
  <div class="col-md-4"></div>
265
+ <label><?php _e("Product Partition filter dimension:","conversios"); ?></label><b> Category</b>
266
  </div>
267
  <div class="col-md-12 row" style="display: none;">
268
  <div class="col-md-4"></div>
269
+ <label><?php _e("Dimension Value:","conversios"); ?></label>
270
  <input type="hidden" name="category_level" id="category_level" value=" <?php echo (isset($campaign_details) && $campaign_details != '')?$campaign_details->category_level:""; ?>" />
271
  <select class="col-md-3 ml-2" name="dimension" id="dimension" onchange="changeCategory()">
272
  <?php
282
  </select>
283
  </div>
284
  <div class="col-md-12 row">
285
+ <label class="form-group col-md-12 mt-2 mb-0 text-left font-weight-bold"><?php _e("Campaign duration:","conversios"); ?> </label>
286
+ <p class="ml-3" style="text-align:left; font-size: 14px;"><?php _e("Your campaign will run until you pause it. You can pause your campaign at any time, however it can take up to 30 days for google to optimize your products and ads.","conversios"); ?></p>
287
  </div>
288
  </div>
289
  <div class="col-12 row">
290
+ <button onclick="showLoader()" type="submit" class="btn btn-primary btn-success" id="update_campaign" name="update_campaign"><?php _e("Update Smart Shopping Campaign","conversios"); ?></button>
291
  </div>
292
  </form>
293
  <hr>
294
  <form method="post">
295
  <div class="text-left">
296
+ <p style="font-size: 14px;"><?php _e("Please note that campaigns will be created with accounts configured in previous steps.","conversios"); ?></p>
297
+ <p style="font-size: 14px;"><span><?php _e("Google Merchant Center :","conversios"); ?> <?php echo $this->merchantId; ?></span>&nbsp;&nbsp;&nbsp;&nbsp;<span><?php _e("Google Ads Account Id :","conversios"); ?> <?php echo $this->currentCustomerId; ?></span></p>
298
  </div>
299
  </form>
300
  <?php } ?>
includes/setup/class-conversios-dashboard.php CHANGED
@@ -41,11 +41,11 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
41
  $this->TVC_Admin_Helper->update_subscription_details_api_to_db();
42
  }
43
  } else if(isset($_GET['subscription_id']) && $_GET['subscription_id']){
44
- $this->notice = "You tried signing in with different email. Please try again by signing it with the email id that you used to set up the plugin earlier. <a href=\'".$this->TVC_Admin_Helper->get_conversios_site_url()."\' target=\'_blank\'>Reach out to us</a> if you have any difficulty.";
45
  }
46
  $this->is_refresh_token_expire = $this->TVC_Admin_Helper->is_refresh_token_expire();
47
  $this->subscription_data = $this->TVC_Admin_Helper->get_user_subscription_data();
48
- $this->pro_plan_site = $this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=dashboard&utm_campaign=Upsell+at+Conversios';
49
  if(isset($this->subscription_data->plan_id) && !in_array($this->subscription_data->plan_id, array("1"))){
50
  $this->plan_id = $this->subscription_data->plan_id;
51
  }
@@ -55,13 +55,13 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
55
 
56
  if( $this->subscription_id != "" ){
57
  $this->g_mail = get_option('ee_customer_gmail');
58
- $this->ga_traking_type = $this->subscription_data->tracking_option; // UA,GA4,BOTH
59
- $this->ga3_property_id = $this->subscription_data->property_id; // GA3
60
- $this->ga3_ua_analytic_account_id = $this->subscription_data->ua_analytic_account_id;
61
  if($this->is_refresh_token_expire == false){
62
  $this->set_ga3_view_id_and_ga3_currency();
63
  }
64
- $this->ga4_measurement_id = $this->subscription_data->measurement_id; //GA4 ID
65
  }else{
66
  wp_redirect("admin.php?page=conversios_onboarding");
67
  exit;
@@ -86,22 +86,22 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
86
  public function set_ga3_view_id_and_ga3_currency(){
87
  //$this->view_id = get_option('ee_ga_view_id');
88
  if(isset($this->subscription_data->view_id) && isset($this->subscription_data->analytics_currency) && $this->subscription_data->view_id!="" && $this->subscription_data->analytics_currency!=""){
89
- $this->ga3_view_id = $this->subscription_data->view_id;
90
- $this->ga_currency = $this->subscription_data->analytics_currency;
91
  $this->ga_currency_symbols = $this->TVC_Admin_Helper->get_currency_symbols($this->ga_currency);
92
 
93
  }else{
94
  $data = array(
95
- "subscription_id"=>$this->subscription_id,
96
- "property_id"=>$this->ga3_property_id,
97
- "ua_analytic_account_id"=>$this->ga3_ua_analytic_account_id
98
  );
99
  $api_rs = $this->CustomApi->get_analytics_viewid_currency($data);
100
  if (isset($api_rs->error) && $api_rs->error == '') {
101
  if(isset($api_rs->data) && $api_rs->data != ""){
102
  $data = json_decode($api_rs->data);
103
- $this->ga3_view_id = $data->view_id;
104
- $this->ga_currency =$data->analytics_currency;
105
  $this->ga_currency_symbols = $this->TVC_Admin_Helper->get_currency_symbols($this->ga_currency);
106
  $this->is_need_to_update_api_data_wp_db = true;
107
  }
@@ -131,8 +131,8 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
131
  if(notice != ""){
132
  tvc_helper.tvc_alert("error","Email error",notice);
133
  }
134
- var plan_id = '<?php echo $this->plan_id; ?>';
135
- var g_mail = '<?php echo $this->g_mail; ?>';
136
  var is_refresh_token_expire = '<?php echo $this->is_refresh_token_expire; ?>';
137
  is_refresh_token_expire = (is_refresh_token_expire == "")?false:true;
138
  console.log(is_refresh_token_expire);
@@ -150,17 +150,17 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
150
  end_date = $.trim(date_range[1].replace(/\//g,"-")) || 0;*/
151
  var data = {
152
  action:'get_google_analytics_reports',
153
- subscription_id:'<?php echo $this->subscription_id; ?>',
154
  plan_id:plan_id,
155
- ga_traking_type:'<?php echo $this->ga_traking_type; ?>',
156
- view_id :'<?php echo $this->ga3_view_id; ?>',
157
- ga4_property_id:'<?php echo $this->ga4_property_id; ?>',
158
- ga_currency :'<?php echo $this->ga_currency; ?>',
159
  plugin_url:'<?php echo ENHANCAD_PLUGIN_URL; ?>',
160
  start_date :$.trim(start_date.replace(/\//g,"-")),
161
  end_date :$.trim(end_date.replace(/\//g,"-")),
162
  g_mail:g_mail,
163
- google_ads_id:'<?php echo $this->google_ads_id; ?>',
164
  conversios_nonce:'<?php echo wp_create_nonce( 'conversios_nonce' ); ?>'
165
  };
166
  // Call API
@@ -287,8 +287,8 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
287
  <div class="dashbrdpage-wrap">
288
  <div class="dflex align-items-center mt24 dshbrdtoparea">
289
  <div class="dashtp-left">
290
- <button class="dashtpleft-btn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/download-icon.png'; ?>" alt="" />Download PDF</button>
291
- <button class="dashtpleft-btn <?php echo $this->add_upgrdsbrs_btn_calss('schedule_email'); ?>"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/clock-icon.png'; ?>" alt="" />Schedule Email</button>
292
  </div>
293
  <div class="dashtp-right">
294
 
@@ -303,123 +303,123 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
303
  <?php if($this->plan_id != 1){?>
304
  <div id="reportrange" class="dshtpdaterange" >
305
  <div class="dateclndicn">
306
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/claendar-icon.png'; ?>" alt="" />
307
  </div>
308
  <span class="daterangearea report_range_val"></span>
309
- <div class="careticn"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/caret-down.png'; ?>" alt="" /></div>
310
  </div>
311
  <?php } else{ ?>
312
  <div class="dshtpdaterange <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">
313
  <div class="dateclndicn">
314
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/claendar-icon.png'; ?>" alt="" />
315
  </div>
316
  <span class="daterangearea report_range_val"></span>
317
- <div class="careticn"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/caret-down.png'; ?>" alt="" /></div>
318
  </div>
319
  <?php }?>
320
 
321
  </div>
322
  </div>
323
  <?php if($this->ga_traking_type == "GA4"){?>
324
- <div class="temp_note"><p>The reporting dashboard feature is only available for Google Analytics 3 properties currently. We are working on Google Analytics 4 dashboard, we will update you once it is live.</p></div>
325
  <?php } ?>
326
  <!--- dashboard summary section start -->
327
  <div class="wht-rnd-shdwbx mt24 dashsmry-wrap">
328
  <div class="dashsmry-item">
329
  <div class="dashsmrybx" id="s1_transactionsPerSession">
330
- <div class="dshsmrycattxt dash-smry-title">Conversion Rate</div>
331
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
332
  <div class="updownsmry dash-smry-compare-val">
333
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/green-up.png'; ?>" alt="" />
334
  %
335
  </div>
336
- <div class="dshsmryprdtxt">From Previous Period</div>
337
  </div>
338
  <div class="dashsmrybx" id="s1_transactionRevenue">
339
- <div class="dshsmrycattxt dash-smry-title">Revenue </div>
340
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
341
  <div class="updownsmry dash-smry-compare-val">
342
  %
343
  </div>
344
- <div class="dshsmryprdtxt">From Previous Period</div>
345
  </div>
346
  <div class="dashsmrybx mblsmry3bx" id="s1_transactions">
347
- <div class="dshsmrycattxt dash-smry-title">Total Transactions </div>
348
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
349
  <div class="updownsmry dash-smry-compare-val">
350
  %
351
  </div>
352
- <div class="dshsmryprdtxt">From Previous Period</div>
353
  </div>
354
  <div class="dashsmrybx mblsmry3bx" id="s1_revenuePerTransaction">
355
- <div class="dshsmrycattxt dash-smry-title">Avg. Order Value</div>
356
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
357
  <div class="updownsmry dash-smry-compare-val">
358
  %
359
  </div>
360
- <div class="dshsmryprdtxt">From Previous Period</div>
361
  </div>
362
  <div class="dashsmrybx mblsmry3bx flwdthmblbx" id="s1_productAddsToCart">
363
- <div class="dshsmrycattxt dash-smry-title">Added to Cart</div>
364
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
365
  <div class="updownsmry dash-smry-compare-val">
366
  %
367
  </div>
368
- <div class="dshsmryprdtxt">From Previous Period</div>
369
  </div>
370
  </div>
371
  <div class="dashsmry-item">
372
  <div class="dashsmrybx" id="s1_productRemovesFromCart">
373
- <div class="dshsmrycattxt dash-smry-title">Removed from Cart</div>
374
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
375
  <div class="updownsmry dash-smry-compare-val">
376
  %
377
  </div>
378
- <div class="dshsmryprdtxt">From Previous Period</div>
379
  </div>
380
  <div class="dashsmrybx" id="s1_sessions">
381
- <div class="dshsmrycattxt dash-smry-title">Sessions</div>
382
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
383
  <div class="updownsmry dash-smry-compare-val">
384
  %
385
  </div>
386
- <div class="dshsmryprdtxt">From Previous Period</div>
387
  </div>
388
  <div class="dashsmrybx" id="s1_users">
389
- <div class="dshsmrycattxt dash-smry-title">Total Users</div>
390
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
391
  <div class="updownsmry dash-smry-compare-val">
392
  %
393
  </div>
394
- <div class="dshsmryprdtxt">From Previous Period</div>
395
  </div>
396
  <div class="dashsmrybx" id="s1_newUsers">
397
- <div class="dshsmrycattxt dash-smry-title">New Users</div>
398
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
399
  <div class="updownsmry dash-smry-compare-val">
400
  %
401
  </div>
402
- <div class="dshsmryprdtxt">From Previous Period</div>
403
  </div>
404
  <div class="dashsmrybx" id="s1_productDetailViews">
405
- <div class="dshsmrycattxt dash-smry-title">Product Views</div>
406
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
407
  <div class="updownsmry dash-smry-compare-val">
408
  %
409
  </div>
410
- <div class="dshsmryprdtxt">From Previous Period</div>
411
  </div>
412
 
413
  </div>
414
  <?php /*
415
  <div class="dashsmry-item">
416
  <div class="dashsmrybx" id="s1_transactionShipping">
417
- <div class="dshsmrycattxt dash-smry-title">Shipping</div>
418
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
419
  <div class="updownsmry dash-smry-compare-val">
420
  %
421
  </div>
422
- <div class="dshsmryprdtxt">From Previous Period</div>
423
  </div>
424
  <div class="dashsmrybx" id="s1_transactionTax">
425
  <div class="dshsmrycattxt dash-smry-title">TAX</div>
@@ -427,7 +427,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
427
  <div class="updownsmry dash-smry-compare-val">
428
  %
429
  </div>
430
- <div class="dshsmryprdtxt">From Previous Period</div>
431
  </div>
432
  </div> */?>
433
  </div>
@@ -440,7 +440,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
440
  <div class="col50">
441
  <div class="chartbx ecomfunnchrtbx ecom-funn-chrt-bx">
442
  <div class="chartcntnbx">
443
- <h5>Ecommerce Conversion Funnel</h5>
444
  <div class="chartarea">
445
  <canvas id="ecomfunchart" width="400" height="300"></canvas>
446
  </div>
@@ -448,23 +448,23 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
448
  <div class="ecomchartinfo">
449
  <div class="ecomchrtinfoflex">
450
  <div class="ecomchartinfoitem">
451
- <div class="ecomchartinfolabel">Sessions</div>
452
  <div class="chartpercarrow conversion_s1"></div>
453
  </div>
454
  <div class="ecomchartinfoitem">
455
- <div class="ecomchartinfolabel">Product View</div>
456
  <div class="chartpercarrow conversion_s2"></div>
457
  </div>
458
  <div class="ecomchartinfoitem">
459
- <div class="ecomchartinfolabel">Add to Cart</div>
460
  <div class="chartpercarrow conversion_s3"></div>
461
  </div>
462
  <div class="ecomchartinfoitem">
463
- <div class="ecomchartinfolabel">Checkouts</div>
464
  <div class="chartpercarrow conversion_s4"></div>
465
  </div>
466
  <div class="ecomchartinfoitem">
467
- <div class="ecomchartinfolabel">Order Confirmation</div>
468
  </div>
469
  </div>
470
  </div>
@@ -475,20 +475,20 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
475
  <div class="col50">
476
  <div class="chartbx ecomfunnchrtbx">
477
  <div class="chartcntnbx prochrtftr">
478
- <h5>Ecommerce Conversion Funnel</h5>
479
  <div class="chartarea">
480
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/ecom-chart.jpg'; ?>" alt="" />
481
  </div>
482
  </div>
483
  <div class="prochrtovrbox">
484
  <div class="prochrtcntn">
485
  <div class="prochrttop">
486
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
487
  Locked
488
  </div>
489
- <h5>Conversion Funnel</h5>
490
- <p>This Report will help you visualize drop offs at each stage of your shopping funnel starting from home page to product page, cart page to checkout page and to final order confirmation page. Find out the major drop offs at each stage and take informed data driven decisions to increase the conversions and better marketing ROI.</p>
491
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
492
  </div>
493
  </div>
494
  </div>
@@ -499,7 +499,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
499
  <div class="col50">
500
  <div class="chartbx ecomfunnchrtbx ecom-checkout-funn-chrt-bx">
501
  <div class="chartcntnbx">
502
- <h5>Ecommerce Checkout Funnel</h5>
503
  <div class="chartarea">
504
  <canvas id="ecomcheckoutfunchart" width="400" height="300"></canvas>
505
  </div>
@@ -507,19 +507,19 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
507
  <div class="ecomchartinfo ecomcheckoutfunchartinfo">
508
  <div class="ecomchrtinfoflex">
509
  <div class="ecomchartinfoitem">
510
- <div class="ecomchartinfolabel">Checkout Step 1</div>
511
  <div class="chartpercarrow checkoutfunn_s1"></div>
512
  </div>
513
  <div class="ecomchartinfoitem">
514
- <div class="ecomchartinfolabel">Checkout Step 2</div>
515
  <div class="chartpercarrow checkoutfunn_s2"></div>
516
  </div>
517
  <div class="ecomchartinfoitem">
518
- <div class="ecomchartinfolabel">Checkout Step 3</div>
519
  <div class="chartpercarrow checkoutfunn_s3"></div>
520
  </div>
521
  <div class="ecomchartinfoitem">
522
- <div class="ecomchartinfolabel">Purchase</div>
523
  </div>
524
 
525
  </div>
@@ -532,20 +532,20 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
532
  <div class="col50">
533
  <div class="chartbx ecomfunnchrtbx">
534
  <div class="chartcntnbx prochrtftr">
535
- <h5>Checkout Funnel</h5>
536
  <div class="chartarea">
537
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/ecom-chart.jpg'; ?>" alt="" />
538
  </div>
539
  </div>
540
  <div class="prochrtovrbox">
541
  <div class="prochrtcntn">
542
  <div class="prochrttop">
543
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
544
  Locked
545
  </div>
546
- <h5>Checkout Funnel</h5>
547
- <p>This Report will help you in finding out the performance of your checkout page and leakages at each checkout step. Identify the small areas of improvements and fix them for smooth customer experience on your ecommerce site.</p>
548
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
549
  </div>
550
  </div>
551
  </div>
@@ -561,24 +561,24 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
561
  <div class="mt24 whiteroundedbx dshreport-sec">
562
  <div class="row dsh-reprttop">
563
  <div class="dshrprttp-left">
564
- <h4>Product Performance Report</h4>
565
- <a href="#" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">View all <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'; ?>" alt="" /></a>
566
  </div>
567
  </div>
568
  <div class="dashtablewrp product_performance_report" id="product_performance_report">
569
  <table class="dshreporttble mbl-table" >
570
  <thead>
571
  <tr>
572
- <th class="prdnm-cell">Product Name</th>
573
- <th>Views</th>
574
- <th>Added to Cart</th>
575
- <th>Orders</th>
576
- <th>Qty</th>
577
- <th>Revenue (<?php echo $this->ga_currency_symbols; ?>)</th>
578
- <th>Avg Price (<?php echo $this->ga_currency_symbols; ?>)</th>
579
- <th>Refund Amount (<?php echo $this->ga_currency_symbols; ?>)</th>
580
- <th>Cart to details (%)</th>
581
- <th>Buy to details (%)</th>
582
  </tr>
583
  </thead>
584
  <tbody>
@@ -592,20 +592,20 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
592
  <div class="col">
593
  <div class="chartbx ecomfunnchrtbx">
594
  <div class="chartcntnbx prochrtftr">
595
- <h5>Product Performance Report</h5>
596
  <div class="chartarea">
597
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
598
  </div>
599
  </div>
600
  <div class="prochrtovrbox">
601
  <div class="prochrtcntn">
602
  <div class="prochrttop">
603
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
604
- Locked
605
  </div>
606
- <h5>Product Performance Report</h5>
607
- <p>This report will help you understand how products in your store are performing and based on it you can take informed merchandising decision to further increase your revenue.</p>
608
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
609
  </div>
610
  </div>
611
  </div>
@@ -620,24 +620,24 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
620
  <div class="mt24 whiteroundedbx dshreport-sec">
621
  <div class="row dsh-reprttop">
622
  <div class="dshrprttp-left">
623
- <h4>Source/Medium Performance Report</h4>
624
- <a href="" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">View all <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'; ?>" alt="" /></a>
625
  </div>
626
  </div>
627
  <div class="dashtablewrp medium_performance_report" id="medium_performance_report">
628
  <table class="dshreporttble mbl-table" >
629
  <thead>
630
  <tr>
631
- <th class="prdnm-cell">Source/Medium</th>
632
- <th>Conversion (%)</th>
633
- <th>Revenue (<?php echo $this->ga_currency_symbols; ?>)</th>
634
- <th>Total transactions</th>
635
- <th>Avg Order value (<?php echo $this->ga_currency_symbols; ?>)</th>
636
- <th>Added to carts</th>
637
- <th>removed from cart</th>
638
- <th>Product views</th>
639
- <th>Users</th>
640
- <th>Sessions</th>
641
  </tr>
642
  </thead>
643
  <tbody>
@@ -652,20 +652,20 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
652
  <div class="col">
653
  <div class="chartbx ecomfunnchrtbx">
654
  <div class="chartcntnbx prochrtftr">
655
- <h5>Source/Medium Performance Report</h5>
656
  <div class="chartarea">
657
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
658
  </div>
659
  </div>
660
  <div class="prochrtovrbox">
661
  <div class="prochrtcntn">
662
  <div class="prochrttop">
663
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
664
- Locked
665
  </div>
666
- <h5>Source/Medium Performance Report</h5>
667
- <p>Find out the performance of each of your traffic channels. You can access which campaigns or channels are attributing sales, add to carts, product views etc. You can also see your shopping and checkout behavior funnels for each of the channels and take informed decisions of managing your ad spends for each channel.</p>
668
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
669
  </div>
670
  </div>
671
  </div>
@@ -679,12 +679,12 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
679
  <!--- Shopping and Google Ads Performance section start -->
680
  <?php /* if($this->plan_id != 1){?>
681
  <div class="mt24 whiteroundedbx ggladsperfom-sec">
682
- <h4>Shopping and Google Ads Performance</h4>
683
  <div class="row">
684
  <div class="col50">
685
  <div class="chartbx ggladschrtbx daily-clicks-bx">
686
  <div class="chartcntnbx">
687
- <h5>Clicks</h5>
688
  <div class="chartarea">
689
  <canvas id="dailyClicks" width="400" height="300" class="chartcntainer"></canvas>
690
  </div>
@@ -694,7 +694,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
694
  <div class="col50">
695
  <div class="chartbx ggladschrtbx daily-cost-bx">
696
  <div class="chartcntnbx">
697
- <h5>Cost</h5>
698
  <div class="chartarea">
699
  <canvas id="dailyCost" width="400" height="300" class="chartcntainer"></canvas>
700
  </div>
@@ -705,7 +705,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
705
  <div class="col50">
706
  <div class="chartbx ggladschrtbx daily-conversions-bx">
707
  <div class="chartcntnbx">
708
- <h5>Conversions</h5>
709
  <div class="chartarea">
710
  <canvas id="dailyConversions" width="400" height="300" class="chartcntainer"></canvas>
711
  </div>
@@ -715,7 +715,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
715
  <div class="col50">
716
  <div class="chartbx ggladschrtbx daily-sales-bx">
717
  <div class="chartcntnbx">
718
- <h5>Sales</h5>
719
  <div class="chartarea">
720
  <canvas id="dailySales" width="400" height="300" class="chartcntainer"></canvas>
721
  </div>
@@ -726,12 +726,12 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
726
  </div>
727
  <?php }else{ ?>
728
  <div class="mt24 whiteroundedbx ggladsperfom-sec">
729
- <h4>Shopping and Google Ads Performance</h4>
730
  <div class="row">
731
  <div class="col50">
732
  <div class="chartbx ecomfunnchrtbx">
733
  <div class="chartcntnbx prochrtftr">
734
- <h5>Google Ads Clicks Performance</h5>
735
  <div class="chartarea">
736
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
737
  </div>
@@ -740,11 +740,11 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
740
  <div class="prochrtcntn">
741
  <div class="prochrttop">
742
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
743
- Locked
744
  </div>
745
- <h5>Google Ads Clicks Performance</h5>
746
- <p>This report will help you .</p>
747
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
748
  </div>
749
  </div>
750
  </div>
@@ -752,7 +752,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
752
  <div class="col50">
753
  <div class="chartbx ecomfunnchrtbx">
754
  <div class="chartcntnbx prochrtftr">
755
- <h5>Google Ads Cost Performance</h5>
756
  <div class="chartarea">
757
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
758
  </div>
@@ -761,11 +761,11 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
761
  <div class="prochrtcntn">
762
  <div class="prochrttop">
763
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
764
- Locked
765
  </div>
766
- <h5>Google Ads Cost Performance</h5>
767
- <p>This report will help you understand how products in your store are performing and based on it you can take informed merchandising decision to further increase your revenue.</p>
768
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
769
  </div>
770
  </div>
771
  </div>
@@ -774,7 +774,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
774
  <div class="col50">
775
  <div class="chartbx ecomfunnchrtbx">
776
  <div class="chartcntnbx prochrtftr">
777
- <h5>Google Ads Conversions Performance</h5>
778
  <div class="chartarea">
779
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
780
  </div>
@@ -783,11 +783,11 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
783
  <div class="prochrtcntn">
784
  <div class="prochrttop">
785
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
786
- Locked
787
  </div>
788
- <h5>Google Ads Conversions Performance</h5>
789
- <p>This report will help you </p>
790
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
791
  </div>
792
  </div>
793
  </div>
@@ -795,7 +795,7 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
795
  <div class="col50">
796
  <div class="chartbx ecomfunnchrtbx">
797
  <div class="chartcntnbx prochrtftr">
798
- <h5>Google Ads Sales Performance</h5>
799
  <div class="chartarea">
800
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
801
  </div>
@@ -806,9 +806,9 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
806
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
807
  Locked
808
  </div>
809
- <h5>Google Ads Sales Performance</h5>
810
- <p>This report will help you.</p>
811
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
812
  </div>
813
  </div>
814
  </div>
@@ -824,33 +824,31 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
824
  <div class="mt24 whiteroundedbx dshreport-sec">
825
  <div class="row dsh-reprttop">
826
  <div class="dshrprttp-left">
827
- <h4>Campaign Performance</h4>
828
- <a href="" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">View all <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'; ?>" alt="" /></a>
829
  </div>
830
  </div>
831
  <div class="dashtablewrp campaign_performance_report" id="campaign_performance_report">
832
- <?php if($this->google_ads_id == ""){
833
- ?>
834
- <p>Set up your google ads account from <a href="<?php echo $this->TVC_Admin_Helper->get_onboarding_page_url(); ?>">here</a> in order to access Campaign performance data.</p>
835
- <?php
836
- } ?>
837
- <table class="dshreporttble mbl-table" >
838
- <thead>
839
- <tr>
840
- <th class="prdnm-cell">Campaign Name</th>
841
- <th>Daily Budget</th>
842
- <th>Status</th>
843
- <th>Clicks</th>
844
- <th>Cost</th>
845
- <th>Conversions</th>
846
- <th>Sales</th>
847
- </tr>
848
- </thead>
849
- <tbody>
850
-
851
- </tbody>
852
- </table>
853
-
854
  </div>
855
  </div>
856
  <?php }else{ ?>
@@ -859,20 +857,20 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
859
  <div class="col">
860
  <div class="chartbx ecomfunnchrtbx">
861
  <div class="chartcntnbx prochrtftr">
862
- <h5>Campaign Performance</h5>
863
  <div class="chartarea">
864
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
865
  </div>
866
  </div>
867
  <div class="prochrtovrbox">
868
  <div class="prochrtcntn">
869
  <div class="prochrttop">
870
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
871
  Locked
872
  </div>
873
- <h5>Campaign Performance</h5>
874
- <p>Access your campaign performance data to know how are they performing and take actionable decisions to increase your marketing ROI.</p>
875
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
876
  </div>
877
  </div>
878
  </div>
@@ -887,15 +885,15 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
887
  <div class="sycnprdct-ppcnt">
888
  <div class="ppwhitebg pp-content upgradsbscrptnpp-cntr">
889
  <div class="ppclsbtn absltpsclsbtn clsbtntrgr">
890
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-white.png'; ?>" alt="">
891
  </div>
892
  <div class="upgradsbscrptnpp-hdr">
893
- <h5>Upgrade to Pro..!!</h5>
894
  </div>
895
  <div class="ppmodal-body">
896
- <p>This feature is only available in the paid plan. Please upgrade to get the full range of reports and more.</p>
897
  <div class="ppupgrdbtnwrap">
898
- <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank">Upgrade Now</a>
899
  </div>
900
  </div>
901
  </div>
@@ -906,19 +904,18 @@ if ( ! class_exists( 'Conversios_Dashboard' ) ) {
906
  <div class="sycnprdct-ppcnt">
907
  <div class="ppwhitebg pp-content upgradsbscrptnpp-cntr">
908
  <div class="ppclsbtn absltpsclsbtn clsbtntrgr">
909
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/close-white.png'; ?>" alt="">
910
  </div>
911
  <div class="upgradsbscrptnpp-hdr">
912
- <h5>Upcoming..!!</h5>
913
  </div>
914
  <div class="ppmodal-body">
915
- <p>We are currently working on this feature and we will reach out to you once this is live.</p>
916
- <p>We aim to give you a capability to schedule the reports directly in your inbox whenever you want.</p>
917
  </div>
918
  </div>
919
  </div>
920
  </div>
921
-
922
  </div>
923
  <?php
924
  }
41
  $this->TVC_Admin_Helper->update_subscription_details_api_to_db();
42
  }
43
  } else if(isset($_GET['subscription_id']) && $_GET['subscription_id']){
44
+ $this->notice = __("You tried signing in with different email. Please try again by signing it with the email id that you used to set up the plugin earlier. <a href=\'".$this->TVC_Admin_Helper->get_conversios_site_url()."\' target=\'_blank\'>Reach out to us</a> if you have any difficulty.","conversios");
45
  }
46
  $this->is_refresh_token_expire = $this->TVC_Admin_Helper->is_refresh_token_expire();
47
  $this->subscription_data = $this->TVC_Admin_Helper->get_user_subscription_data();
48
+ $this->pro_plan_site = esc_url($this->TVC_Admin_Helper->get_pro_plan_site().'?utm_source=EE+Plugin+User+Interface&utm_medium=dashboard&utm_campaign=Upsell+at+Conversios');
49
  if(isset($this->subscription_data->plan_id) && !in_array($this->subscription_data->plan_id, array("1"))){
50
  $this->plan_id = $this->subscription_data->plan_id;
51
  }
55
 
56
  if( $this->subscription_id != "" ){
57
  $this->g_mail = get_option('ee_customer_gmail');
58
+ $this->ga_traking_type = esc_attr($this->subscription_data->tracking_option); // UA,GA4,BOTH
59
+ $this->ga3_property_id = esc_attr($this->subscription_data->property_id); // GA3
60
+ $this->ga3_ua_analytic_account_id = esc_attr($this->subscription_data->ua_analytic_account_id);
61
  if($this->is_refresh_token_expire == false){
62
  $this->set_ga3_view_id_and_ga3_currency();
63
  }
64
+ $this->ga4_measurement_id = esc_attr($this->subscription_data->measurement_id); //GA4 ID
65
  }else{
66
  wp_redirect("admin.php?page=conversios_onboarding");
67
  exit;
86
  public function set_ga3_view_id_and_ga3_currency(){
87
  //$this->view_id = get_option('ee_ga_view_id');
88
  if(isset($this->subscription_data->view_id) && isset($this->subscription_data->analytics_currency) && $this->subscription_data->view_id!="" && $this->subscription_data->analytics_currency!=""){
89
+ $this->ga3_view_id = esc_attr($this->subscription_data->view_id);
90
+ $this->ga_currency = esc_attr($this->subscription_data->analytics_currency);
91
  $this->ga_currency_symbols = $this->TVC_Admin_Helper->get_currency_symbols($this->ga_currency);
92
 
93
  }else{
94
  $data = array(
95
+ "subscription_id"=>esc_attr($this->subscription_id),
96
+ "property_id"=>esc_attr($this->ga3_property_id),
97
+ "ua_analytic_account_id"=>esc_attr($this->ga3_ua_analytic_account_id)
98
  );
99
  $api_rs = $this->CustomApi->get_analytics_viewid_currency($data);
100
  if (isset($api_rs->error) && $api_rs->error == '') {
101
  if(isset($api_rs->data) && $api_rs->data != ""){
102
  $data = json_decode($api_rs->data);
103
+ $this->ga3_view_id = esc_attr($data->view_id);
104
+ $this->ga_currency = esc_attr($data->analytics_currency);
105
  $this->ga_currency_symbols = $this->TVC_Admin_Helper->get_currency_symbols($this->ga_currency);
106
  $this->is_need_to_update_api_data_wp_db = true;
107
  }
131
  if(notice != ""){
132
  tvc_helper.tvc_alert("error","Email error",notice);
133
  }
134
+ var plan_id = '<?php echo esc_attr($this->plan_id); ?>';
135
+ var g_mail = '<?php echo esc_attr($this->g_mail); ?>';
136
  var is_refresh_token_expire = '<?php echo $this->is_refresh_token_expire; ?>';
137
  is_refresh_token_expire = (is_refresh_token_expire == "")?false:true;
138
  console.log(is_refresh_token_expire);
150
  end_date = $.trim(date_range[1].replace(/\//g,"-")) || 0;*/
151
  var data = {
152
  action:'get_google_analytics_reports',
153
+ subscription_id:'<?php echo esc_attr($this->subscription_id); ?>',
154
  plan_id:plan_id,
155
+ ga_traking_type:'<?php echo esc_attr($this->ga_traking_type); ?>',
156
+ view_id :'<?php echo esc_attr($this->ga3_view_id); ?>',
157
+ ga4_property_id:'<?php echo esc_attr($this->ga4_property_id); ?>',
158
+ ga_currency :'<?php echo esc_attr($this->ga_currency); ?>',
159
  plugin_url:'<?php echo ENHANCAD_PLUGIN_URL; ?>',
160
  start_date :$.trim(start_date.replace(/\//g,"-")),
161
  end_date :$.trim(end_date.replace(/\//g,"-")),
162
  g_mail:g_mail,
163
+ google_ads_id:'<?php echo esc_attr($this->google_ads_id); ?>',
164
  conversios_nonce:'<?php echo wp_create_nonce( 'conversios_nonce' ); ?>'
165
  };
166
  // Call API
287
  <div class="dashbrdpage-wrap">
288
  <div class="dflex align-items-center mt24 dshbrdtoparea">
289
  <div class="dashtp-left">
290
+ <button class="dashtpleft-btn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/download-icon.png'); ?>" alt="" /><?php _e("Download PDF","conversios"); ?></button>
291
+ <button class="dashtpleft-btn <?php echo $this->add_upgrdsbrs_btn_calss('schedule_email'); ?>"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/clock-icon.png'); ?>" alt="" /><?php _e("Schedule Email","conversios"); ?></button>
292
  </div>
293
  <div class="dashtp-right">
294
 
303
  <?php if($this->plan_id != 1){?>
304
  <div id="reportrange" class="dshtpdaterange" >
305
  <div class="dateclndicn">
306
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/claendar-icon.png'); ?>" alt="" />
307
  </div>
308
  <span class="daterangearea report_range_val"></span>
309
+ <div class="careticn"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/caret-down.png'); ?>" alt="" /></div>
310
  </div>
311
  <?php } else{ ?>
312
  <div class="dshtpdaterange <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">
313
  <div class="dateclndicn">
314
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/claendar-icon.png'); ?>" alt="" />
315
  </div>
316
  <span class="daterangearea report_range_val"></span>
317
+ <div class="careticn"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/caret-down.png'); ?>" alt="" /></div>
318
  </div>
319
  <?php }?>
320
 
321
  </div>
322
  </div>
323
  <?php if($this->ga_traking_type == "GA4"){?>
324
+ <div class="temp_note"><p><?php _e("The reporting dashboard feature is only available for Google Analytics 3 properties currently. We are working on Google Analytics 4 dashboard, we will update you once it is live.","conversios"); ?></p></div>
325
  <?php } ?>
326
  <!--- dashboard summary section start -->
327
  <div class="wht-rnd-shdwbx mt24 dashsmry-wrap">
328
  <div class="dashsmry-item">
329
  <div class="dashsmrybx" id="s1_transactionsPerSession">
330
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Conversion Rate","conversios"); ?></div>
331
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
332
  <div class="updownsmry dash-smry-compare-val">
333
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/green-up.png'); ?>" alt="" />
334
  %
335
  </div>
336
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
337
  </div>
338
  <div class="dashsmrybx" id="s1_transactionRevenue">
339
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Revenue","conversios"); ?></div>
340
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
341
  <div class="updownsmry dash-smry-compare-val">
342
  %
343
  </div>
344
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
345
  </div>
346
  <div class="dashsmrybx mblsmry3bx" id="s1_transactions">
347
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Total Transactions","conversios"); ?></div>
348
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
349
  <div class="updownsmry dash-smry-compare-val">
350
  %
351
  </div>
352
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
353
  </div>
354
  <div class="dashsmrybx mblsmry3bx" id="s1_revenuePerTransaction">
355
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Avg. Order Value","conversios"); ?></div>
356
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
357
  <div class="updownsmry dash-smry-compare-val">
358
  %
359
  </div>
360
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
361
  </div>
362
  <div class="dashsmrybx mblsmry3bx flwdthmblbx" id="s1_productAddsToCart">
363
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Added to Cart","conversios"); ?></div>
364
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
365
  <div class="updownsmry dash-smry-compare-val">
366
  %
367
  </div>
368
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
369
  </div>
370
  </div>
371
  <div class="dashsmry-item">
372
  <div class="dashsmrybx" id="s1_productRemovesFromCart">
373
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Removed from Cart","conversios"); ?></div>
374
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
375
  <div class="updownsmry dash-smry-compare-val">
376
  %
377
  </div>
378
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
379
  </div>
380
  <div class="dashsmrybx" id="s1_sessions">
381
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Sessions","conversios"); ?></div>
382
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
383
  <div class="updownsmry dash-smry-compare-val">
384
  %
385
  </div>
386
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
387
  </div>
388
  <div class="dashsmrybx" id="s1_users">
389
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Total Users","conversios"); ?></div>
390
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
391
  <div class="updownsmry dash-smry-compare-val">
392
  %
393
  </div>
394
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
395
  </div>
396
  <div class="dashsmrybx" id="s1_newUsers">
397
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("New Users","conversios"); ?></div>
398
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
399
  <div class="updownsmry dash-smry-compare-val">
400
  %
401
  </div>
402
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
403
  </div>
404
  <div class="dashsmrybx" id="s1_productDetailViews">
405
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Product Views","conversios"); ?></div>
406
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
407
  <div class="updownsmry dash-smry-compare-val">
408
  %
409
  </div>
410
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
411
  </div>
412
 
413
  </div>
414
  <?php /*
415
  <div class="dashsmry-item">
416
  <div class="dashsmrybx" id="s1_transactionShipping">
417
+ <div class="dshsmrycattxt dash-smry-title"><?php _e("Shipping","conversios"); ?></div>
418
  <div class="dshsmrylrgtxt dash-smry-value">-</div>
419
  <div class="updownsmry dash-smry-compare-val">
420
  %
421
  </div>
422
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
423
  </div>
424
  <div class="dashsmrybx" id="s1_transactionTax">
425
  <div class="dshsmrycattxt dash-smry-title">TAX</div>
427
  <div class="updownsmry dash-smry-compare-val">
428
  %
429
  </div>
430
+ <div class="dshsmryprdtxt"><?php _e("From Previous Period","conversios"); ?></div>
431
  </div>
432
  </div> */?>
433
  </div>
440
  <div class="col50">
441
  <div class="chartbx ecomfunnchrtbx ecom-funn-chrt-bx">
442
  <div class="chartcntnbx">
443
+ <h5><?php _e("Ecommerce Conversion Funnel","conversios"); ?></h5>
444
  <div class="chartarea">
445
  <canvas id="ecomfunchart" width="400" height="300"></canvas>
446
  </div>
448
  <div class="ecomchartinfo">
449
  <div class="ecomchrtinfoflex">
450
  <div class="ecomchartinfoitem">
451
+ <div class="ecomchartinfolabel"><?php _e("Sessions","conversios"); ?></div>
452
  <div class="chartpercarrow conversion_s1"></div>
453
  </div>
454
  <div class="ecomchartinfoitem">
455
+ <div class="ecomchartinfolabel"><?php _e("Product View","conversios"); ?></div>
456
  <div class="chartpercarrow conversion_s2"></div>
457
  </div>
458
  <div class="ecomchartinfoitem">
459
+ <div class="ecomchartinfolabel"><?php _e("Add to Cart","conversios"); ?></div>
460
  <div class="chartpercarrow conversion_s3"></div>
461
  </div>
462
  <div class="ecomchartinfoitem">
463
+ <div class="ecomchartinfolabel"><?php _e("Checkouts","conversios"); ?></div>
464
  <div class="chartpercarrow conversion_s4"></div>
465
  </div>
466
  <div class="ecomchartinfoitem">
467
+ <div class="ecomchartinfolabel"><?php _e("Order Confirmation","conversios"); ?></div>
468
  </div>
469
  </div>
470
  </div>
475
  <div class="col50">
476
  <div class="chartbx ecomfunnchrtbx">
477
  <div class="chartcntnbx prochrtftr">
478
+ <h5><?php _e("Ecommerce Conversion Funnel","conversios"); ?></h5>
479
  <div class="chartarea">
480
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/ecom-chart.jpg'); ?>" alt="" />
481
  </div>
482
  </div>
483
  <div class="prochrtovrbox">
484
  <div class="prochrtcntn">
485
  <div class="prochrttop">
486
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" alt="" />
487
  Locked
488
  </div>
489
+ <h5><?php _e("Conversion Funnel","conversios"); ?></h5>
490
+ <p><?php _e("This Report will help you visualize drop offs at each stage of your shopping funnel starting from home page to product page, cart page to checkout page and to final order confirmation page. Find out the major drop offs at each stage and take informed data driven decisions to increase the conversions and better marketing ROI.","conversios"); ?></p>
491
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
492
  </div>
493
  </div>
494
  </div>
499
  <div class="col50">
500
  <div class="chartbx ecomfunnchrtbx ecom-checkout-funn-chrt-bx">
501
  <div class="chartcntnbx">
502
+ <h5><?php _e("Ecommerce Checkout Funnel","conversios"); ?></h5>
503
  <div class="chartarea">
504
  <canvas id="ecomcheckoutfunchart" width="400" height="300"></canvas>
505
  </div>
507
  <div class="ecomchartinfo ecomcheckoutfunchartinfo">
508
  <div class="ecomchrtinfoflex">
509
  <div class="ecomchartinfoitem">
510
+ <div class="ecomchartinfolabel"><?php _e("Checkout Step 1","conversios"); ?></div>
511
  <div class="chartpercarrow checkoutfunn_s1"></div>
512
  </div>
513
  <div class="ecomchartinfoitem">
514
+ <div class="ecomchartinfolabel"><?php _e("Checkout Step 2","conversios"); ?></div>
515
  <div class="chartpercarrow checkoutfunn_s2"></div>
516
  </div>
517
  <div class="ecomchartinfoitem">
518
+ <div class="ecomchartinfolabel"><?php _e("Checkout Step 3","conversios"); ?></div>
519
  <div class="chartpercarrow checkoutfunn_s3"></div>
520
  </div>
521
  <div class="ecomchartinfoitem">
522
+ <div class="ecomchartinfolabel"><?php _e("Purchase","conversios"); ?></div>
523
  </div>
524
 
525
  </div>
532
  <div class="col50">
533
  <div class="chartbx ecomfunnchrtbx">
534
  <div class="chartcntnbx prochrtftr">
535
+ <h5><?php _e("Checkout Funnel","conversios"); ?></h5>
536
  <div class="chartarea">
537
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/ecom-chart.jpg'); ?>" alt="" />
538
  </div>
539
  </div>
540
  <div class="prochrtovrbox">
541
  <div class="prochrtcntn">
542
  <div class="prochrttop">
543
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" alt="" />
544
  Locked
545
  </div>
546
+ <h5><?php _e("Checkout Funnel","conversios"); ?></h5>
547
+ <p><?php _e("This Report will help you in finding out the performance of your checkout page and leakages at each checkout step. Identify the small areas of improvements and fix them for smooth customer experience on your ecommerce site.","conversios"); ?></p>
548
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
549
  </div>
550
  </div>
551
  </div>
561
  <div class="mt24 whiteroundedbx dshreport-sec">
562
  <div class="row dsh-reprttop">
563
  <div class="dshrprttp-left">
564
+ <h4><?php _e("Product Performance Report","conversios"); ?></h4>
565
+ <a href="#" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">View all <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'); ?>" alt="" /></a>
566
  </div>
567
  </div>
568
  <div class="dashtablewrp product_performance_report" id="product_performance_report">
569
  <table class="dshreporttble mbl-table" >
570
  <thead>
571
  <tr>
572
+ <th class="prdnm-cell"><?php _e("Product Name","conversios"); ?></th>
573
+ <th><?php _e("Views","conversios"); ?></th>
574
+ <th><?php _e("Added to Cart","conversios"); ?></th>
575
+ <th><?php _e("Orders","conversios"); ?></th>
576
+ <th><?php _e("Qty","conversios"); ?></th>
577
+ <th><?php _e("Revenue","conversios"); ?> (<?php echo $this->ga_currency_symbols; ?>)</th>
578
+ <th><?php _e("Avg Price","conversios"); ?> (<?php echo $this->ga_currency_symbols; ?>)</th>
579
+ <th><?php _e("Refund Amount","conversios"); ?> (<?php echo $this->ga_currency_symbols; ?>)</th>
580
+ <th><?php _e("Cart to details (%)","conversios"); ?></th>
581
+ <th><?php _e("Buy to details (%)","conversios"); ?></th>
582
  </tr>
583
  </thead>
584
  <tbody>
592
  <div class="col">
593
  <div class="chartbx ecomfunnchrtbx">
594
  <div class="chartcntnbx prochrtftr">
595
+ <h5><?php _e("Product Performance Report","conversios"); ?></h5>
596
  <div class="chartarea">
597
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'); ?>" alt="" />
598
  </div>
599
  </div>
600
  <div class="prochrtovrbox">
601
  <div class="prochrtcntn">
602
  <div class="prochrttop">
603
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" alt="" />
604
+ <?php _e("Locked","conversios"); ?>
605
  </div>
606
+ <h5><?php _e("Product Performance Report","conversios"); ?></h5>
607
+ <p><?php _e("This report will help you understand how products in your store are performing and based on it you can take informed merchandising decision to further increase your revenue.","conversios"); ?></p>
608
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
609
  </div>
610
  </div>
611
  </div>
620
  <div class="mt24 whiteroundedbx dshreport-sec">
621
  <div class="row dsh-reprttop">
622
  <div class="dshrprttp-left">
623
+ <h4><?php _e("Source/Medium Performance Report","conversios"); ?></h4>
624
+ <a href="" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>"><?php _e("View all","conversios"); ?> <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'); ?>" alt="" /></a>
625
  </div>
626
  </div>
627
  <div class="dashtablewrp medium_performance_report" id="medium_performance_report">
628
  <table class="dshreporttble mbl-table" >
629
  <thead>
630
  <tr>
631
+ <th class="prdnm-cell"><?php _e("Source/Medium","conversios"); ?></th>
632
+ <th><?php _e("Conversion (%)","conversios"); ?></th>
633
+ <th><?php _e("Revenue","conversios"); ?> (<?php echo $this->ga_currency_symbols; ?>)</th>
634
+ <th><?php _e("Total transactions","conversios"); ?></th>
635
+ <th><?php _e("Avg Order value","conversios"); ?> (<?php echo $this->ga_currency_symbols; ?>)</th>
636
+ <th><?php _e("Added to carts","conversios"); ?></th>
637
+ <th><?php _e("removed from cart","conversios"); ?></th>
638
+ <th><?php _e("Product views","conversios"); ?></th>
639
+ <th><?php _e("Users","conversios"); ?></th>
640
+ <th><?php _e("Sessions","conversios"); ?></th>
641
  </tr>
642
  </thead>
643
  <tbody>
652
  <div class="col">
653
  <div class="chartbx ecomfunnchrtbx">
654
  <div class="chartcntnbx prochrtftr">
655
+ <h5><?php _e("Source/Medium Performance Report","conversios"); ?></h5>
656
  <div class="chartarea">
657
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'); ?>" alt="" />
658
  </div>
659
  </div>
660
  <div class="prochrtovrbox">
661
  <div class="prochrtcntn">
662
  <div class="prochrttop">
663
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" alt="" />
664
+ <?php _e("Locked","conversios"); ?>
665
  </div>
666
+ <h5><?php _e("Source/Medium Performance Report","conversios"); ?></h5>
667
+ <p><?php _e("Find out the performance of each of your traffic channels. You can access which campaigns or channels are attributing sales, add to carts, product views etc. You can also see your shopping and checkout behavior funnels for each of the channels and take informed decisions of managing your ad spends for each channel.","conversios"); ?></p>
668
+ <a class="blueupgrdbtn" href="<?php echo esc_url($this->pro_plan_site); ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
669
  </div>
670
  </div>
671
  </div>
679
  <!--- Shopping and Google Ads Performance section start -->
680
  <?php /* if($this->plan_id != 1){?>
681
  <div class="mt24 whiteroundedbx ggladsperfom-sec">
682
+ <h4><?php _e("Shopping and Google Ads Performance","conversios"); ?></h4>
683
  <div class="row">
684
  <div class="col50">
685
  <div class="chartbx ggladschrtbx daily-clicks-bx">
686
  <div class="chartcntnbx">
687
+ <h5><?php _e("Clicks","conversios"); ?></h5>
688
  <div class="chartarea">
689
  <canvas id="dailyClicks" width="400" height="300" class="chartcntainer"></canvas>
690
  </div>
694
  <div class="col50">
695
  <div class="chartbx ggladschrtbx daily-cost-bx">
696
  <div class="chartcntnbx">
697
+ <h5><?php _e("Cost","conversios"); ?></h5>
698
  <div class="chartarea">
699
  <canvas id="dailyCost" width="400" height="300" class="chartcntainer"></canvas>
700
  </div>
705
  <div class="col50">
706
  <div class="chartbx ggladschrtbx daily-conversions-bx">
707
  <div class="chartcntnbx">
708
+ <h5><?php _e("Conversions","conversios"); ?></h5>
709
  <div class="chartarea">
710
  <canvas id="dailyConversions" width="400" height="300" class="chartcntainer"></canvas>
711
  </div>
715
  <div class="col50">
716
  <div class="chartbx ggladschrtbx daily-sales-bx">
717
  <div class="chartcntnbx">
718
+ <h5><?php _e("Sales","conversios"); ?></h5>
719
  <div class="chartarea">
720
  <canvas id="dailySales" width="400" height="300" class="chartcntainer"></canvas>
721
  </div>
726
  </div>
727
  <?php }else{ ?>
728
  <div class="mt24 whiteroundedbx ggladsperfom-sec">
729
+ <h4><?php _e("Shopping and Google Ads Performance","conversios"); ?></h4>
730
  <div class="row">
731
  <div class="col50">
732
  <div class="chartbx ecomfunnchrtbx">
733
  <div class="chartcntnbx prochrtftr">
734
+ <h5><?php _e("Google Ads Clicks Performance","conversios"); ?></h5>
735
  <div class="chartarea">
736
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
737
  </div>
740
  <div class="prochrtcntn">
741
  <div class="prochrttop">
742
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
743
+ <?php _e("Locked","conversios"); ?>
744
  </div>
745
+ <h5><?php _e("Google Ads Clicks Performance","conversios"); ?></h5>
746
+ <p><?php _e("This report will help you .","conversios"); ?></p>
747
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
748
  </div>
749
  </div>
750
  </div>
752
  <div class="col50">
753
  <div class="chartbx ecomfunnchrtbx">
754
  <div class="chartcntnbx prochrtftr">
755
+ <h5><?php _e("Google Ads Cost Performance","conversios"); ?></h5>
756
  <div class="chartarea">
757
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
758
  </div>
761
  <div class="prochrtcntn">
762
  <div class="prochrttop">
763
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
764
+ <?php _e("Locked","conversios"); ?>
765
  </div>
766
+ <h5><?php _e("Google Ads Cost Performance","conversios"); ?></h5>
767
+ <p><?php _e("This report will help you understand how products in your store are performing and based on it you can take informed merchandising decision to further increase your revenue.","conversios"); ?></p>
768
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
769
  </div>
770
  </div>
771
  </div>
774
  <div class="col50">
775
  <div class="chartbx ecomfunnchrtbx">
776
  <div class="chartcntnbx prochrtftr">
777
+ <h5><?php _e("Google Ads Conversions Performance","conversios"); ?></h5>
778
  <div class="chartarea">
779
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
780
  </div>
783
  <div class="prochrtcntn">
784
  <div class="prochrttop">
785
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
786
+ <?php _e("Locked","conversios"); ?>
787
  </div>
788
+ <h5><?php _e("Google Ads Conversions Performance","conversios"); ?></h5>
789
+ <p><?php _e("This report will help you","conversios"); ?> </p>
790
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
791
  </div>
792
  </div>
793
  </div>
795
  <div class="col50">
796
  <div class="chartbx ecomfunnchrtbx">
797
  <div class="chartcntnbx prochrtftr">
798
+ <h5><?php _e("Google Ads Sales Performance","conversios"); ?></h5>
799
  <div class="chartarea">
800
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'; ?>" alt="" />
801
  </div>
806
  <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'; ?>" alt="" />
807
  Locked
808
  </div>
809
+ <h5><?php _e("Google Ads Sales Performance","conversios"); ?></h5>
810
+ <p><?php _e("This report will help you.","conversios"); ?></p>
811
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
812
  </div>
813
  </div>
814
  </div>
824
  <div class="mt24 whiteroundedbx dshreport-sec">
825
  <div class="row dsh-reprttop">
826
  <div class="dshrprttp-left">
827
+ <h4><?php _e("Campaign Performance","conversios"); ?></h4>
828
+ <a href="" class="viewallbtn <?php echo $this->add_upgrdsbrs_btn_calss('download_pdf'); ?>">View all <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/blue-right-arrow.png'); ?>" alt="" /></a>
829
  </div>
830
  </div>
831
  <div class="dashtablewrp campaign_performance_report" id="campaign_performance_report">
832
+ <?php if($this->google_ads_id == ""){
833
+ ?>
834
+ <p><?php _e("Set up your google ads account from","conversios"); ?> <a href="<?php echo $this->TVC_Admin_Helper->get_onboarding_page_url(); ?>">here</a> <?php _e("in order to access Campaign performance data.","conversios"); ?></p>
835
+ <?php
836
+ } ?>
837
+ <table class="dshreporttble mbl-table" >
838
+ <thead>
839
+ <tr>
840
+ <th class="prdnm-cell"><?php _e("Campaign Name","conversios"); ?></th>
841
+ <th><?php _e("Daily Budget","conversios"); ?></th>
842
+ <th><?php _e("Status","conversios"); ?></th>
843
+ <th><?php _e("Clicks","conversios"); ?></th>
844
+ <th><?php _e("Cost","conversios"); ?></th>
845
+ <th><?php _e("Conversions","conversios"); ?></th>
846
+ <th><?php _e("Sales","conversios"); ?></th>
847
+ </tr>
848
+ </thead>
849
+ <tbody>
850
+ </tbody>
851
+ </table>
 
 
852
  </div>
853
  </div>
854
  <?php }else{ ?>
857
  <div class="col">
858
  <div class="chartbx ecomfunnchrtbx">
859
  <div class="chartcntnbx prochrtftr">
860
+ <h5><?php _e("Campaign Performance","conversios"); ?></h5>
861
  <div class="chartarea">
862
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/table-data.jpg'); ?>" alt="" />
863
  </div>
864
  </div>
865
  <div class="prochrtovrbox">
866
  <div class="prochrtcntn">
867
  <div class="prochrttop">
868
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/lock-orange.png'); ?>" alt="" />
869
  Locked
870
  </div>
871
+ <h5><?php _e("Campaign Performance","conversios"); ?></h5>
872
+ <p><?php _e("Access your campaign performance data to know how are they performing and take actionable decisions to increase your marketing ROI.","conversios"); ?></p>
873
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
874
  </div>
875
  </div>
876
  </div>
885
  <div class="sycnprdct-ppcnt">
886
  <div class="ppwhitebg pp-content upgradsbscrptnpp-cntr">
887
  <div class="ppclsbtn absltpsclsbtn clsbtntrgr">
888
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-white.png'); ?>" alt="">
889
  </div>
890
  <div class="upgradsbscrptnpp-hdr">
891
+ <h5><?php _e("Upgrade to Pro..!!","conversios"); ?></h5>
892
  </div>
893
  <div class="ppmodal-body">
894
+ <p><?php _e("This feature is only available in the paid plan. Please upgrade to get the full range of reports and more.","conversios"); ?></p>
895
  <div class="ppupgrdbtnwrap">
896
+ <a class="blueupgrdbtn" href="<?php echo $this->pro_plan_site; ?>" target="_blank"><?php _e("Upgrade Now","conversios"); ?></a>
897
  </div>
898
  </div>
899
  </div>
904
  <div class="sycnprdct-ppcnt">
905
  <div class="ppwhitebg pp-content upgradsbscrptnpp-cntr">
906
  <div class="ppclsbtn absltpsclsbtn clsbtntrgr">
907
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/close-white.png'); ?>" alt="">
908
  </div>
909
  <div class="upgradsbscrptnpp-hdr">
910
+ <h5><?php _e("Upcoming..!!","conversios"); ?></h5>
911
  </div>
912
  <div class="ppmodal-body">
913
+ <p><?php _e("We are currently working on this feature and we will reach out to you once this is live.","conversios"); ?></p>
914
+ <p><?php _e("We aim to give you a capability to schedule the reports directly in your inbox whenever you want.","conversios"); ?></p>
915
  </div>
916
  </div>
917
  </div>
918
  </div>
 
919
  </div>
920
  <?php
921
  }
includes/setup/class-tatvic-category-selector-element.php CHANGED
@@ -1,17 +1,13 @@
1
  <?php
2
-
3
  /**
4
  * TVC Category Selector Element Class.
5
  */
6
-
7
  if ( ! defined( 'ABSPATH' ) ) {
8
  exit;
9
  }
10
 
11
  if ( ! class_exists( 'Tatvic_Category_Selector_Element' ) ) :
12
-
13
  class Tatvic_Category_Selector_Element {
14
-
15
  /**
16
  * Returns the code for a single row meant for the category mapping table.
17
  *
@@ -30,12 +26,12 @@ if ( ! class_exists( 'Tatvic_Category_Selector_Element' ) ) :
30
  return '<div class="row">
31
  <div class="col-6">
32
  <div class="form-group shop-category">
33
- <label class="form-label-control">' . $category->name .' <small>('.$category->count. ')</small> '.$level_indicator .'</label>
34
  </div>
35
  </div>
36
  <div class="col-6 align-self-center">
37
  <div class="form-group">
38
- <div id="feed-category-' . $category->term_id . '"></div>' .$mode_column . '
39
  </div>
40
  </div>
41
  </div>';
@@ -54,42 +50,40 @@ if ( ! class_exists( 'Tatvic_Category_Selector_Element' ) ) :
54
  $display = $start_visible ? 'initial' : 'none';
55
  $ident = '-1' !== $id ? $identifier . '-' . $id : $identifier;
56
  $category_levels = apply_filters( 'tvc_category_selector_level', 6 );
 
57
  if(isset($ee_prod_mapped_cats[$id]['id']) && isset($ee_prod_mapped_cats[$id]['name']) && $ee_prod_mapped_cats[$id]['id'] && $ee_prod_mapped_cats[$id]['name']){
58
 
59
- $cat_id = $ee_prod_mapped_cats[$id]['id'];
60
- $cat_name = $ee_prod_mapped_cats[$id]['name'];
61
- $html_code = '<div id="category-selector-' . $ident . '" style="display:' . $display . '">
62
  <div id="selected-categories">
63
  <input type="hidden" name="category-'.$id.'" id="category-'.$id.'" value="'.$cat_id.'">
64
  <input type="hidden" name="category-name-'.$id.'" id="category-name-'.$id.'" value="'.$cat_name.'">
65
  </div>
66
- <label id="label-'.$ident.'_0">'.$cat_name.'</label><span class="change_prodct_feed_cat" data-cat-id="'.$id.'" data-id="'.$ident.'_0">Edit</span>
67
- <select class="form-control" style="display:none;" id="' . $ident . '_0" catId="'.$id.'" onchange="selectSubCategory(this)"></select>';
68
 
69
  for ( $i = 1; $i < $category_levels; $i ++ ) {
70
- $html_code .= '<select class="" id="' . $ident . '_' . $i . '" value="0" catId="'.$id.'" style="display:none;" onchange="selectSubCategory(this)"></select>';
71
  }
72
  }else{
73
- $html_code = '<div id="category-selector-' . $ident . '" style="display:' . $display . '">
74
  <div id="selected-categories">
75
  <input type="hidden" name="category-'.$id.'" id="category-'.$id.'" value="">
76
  <input type="hidden" name="category-name-'.$id.'" id="category-name-'.$id.'" value="">
77
  </div>
78
- <select class="form-control" id="' . $ident . '_0" catId="'.$id.'" onchange="selectSubCategory(this)"></select>';
79
 
80
  for ( $i = 1; $i < $category_levels; $i ++ ) {
81
- $html_code .= '<select class="" id="' . $ident . '_' . $i . '" value="0" catId="'.$id.'" style="display:none;" onchange="selectSubCategory(this)"></select>';
82
  }
83
 
84
  }
85
  /*if (!class_exists('ShoppingApi')) {
86
  require_once(__DIR__ . '/ShoppingApi.php');
87
- }*/
88
-
89
-
90
 
91
  $html_code .= '</div>';
92
-
93
  return $html_code;
94
  }
95
 
@@ -103,12 +97,10 @@ if ( ! class_exists( 'Tatvic_Category_Selector_Element' ) ) :
103
  private static function category_description_data_item( $category_id ) {
104
  $category_description = '' !== category_description( $category_id ) ? category_description( $category_id ) : '—';
105
 
106
- $html_code = '<span aria-hidden="true">' . $category_description . '</span>';
107
 
108
  return $html_code;
109
  }
110
  }
111
-
112
  // end of TVC_Category_Selector_Element class
113
-
114
- endif;
1
  <?php
 
2
  /**
3
  * TVC Category Selector Element Class.
4
  */
 
5
  if ( ! defined( 'ABSPATH' ) ) {
6
  exit;
7
  }
8
 
9
  if ( ! class_exists( 'Tatvic_Category_Selector_Element' ) ) :
 
10
  class Tatvic_Category_Selector_Element {
 
11
  /**
12
  * Returns the code for a single row meant for the category mapping table.
13
  *
26
  return '<div class="row">
27
  <div class="col-6">
28
  <div class="form-group shop-category">
29
+ <label class="form-label-control">' . esc_attr($category->name) .' <small>('.esc_attr($category->count). ')</small> '.esc_attr($level_indicator) .'</label>
30
  </div>
31
  </div>
32
  <div class="col-6 align-self-center">
33
  <div class="form-group">
34
+ <div id="feed-category-' . esc_attr($category->term_id) . '"></div>' .$mode_column . '
35
  </div>
36
  </div>
37
  </div>';
50
  $display = $start_visible ? 'initial' : 'none';
51
  $ident = '-1' !== $id ? $identifier . '-' . $id : $identifier;
52
  $category_levels = apply_filters( 'tvc_category_selector_level', 6 );
53
+ $id = esc_attr($id);
54
  if(isset($ee_prod_mapped_cats[$id]['id']) && isset($ee_prod_mapped_cats[$id]['name']) && $ee_prod_mapped_cats[$id]['id'] && $ee_prod_mapped_cats[$id]['name']){
55
 
56
+ $cat_id = esc_attr($ee_prod_mapped_cats[$id]['id']);
57
+ $cat_name = esc_attr($ee_prod_mapped_cats[$id]['name']);
58
+ $html_code = '<div id="category-selector-' . esc_attr($ident) . '" style="display:' . esc_attr($display) . '">
59
  <div id="selected-categories">
60
  <input type="hidden" name="category-'.$id.'" id="category-'.$id.'" value="'.$cat_id.'">
61
  <input type="hidden" name="category-name-'.$id.'" id="category-name-'.$id.'" value="'.$cat_name.'">
62
  </div>
63
+ <label id="label-'.esc_attr($ident).'_0">'.$cat_name.'</label><span class="change_prodct_feed_cat" data-cat-id="'.$id.'" data-id="'.esc_attr($ident).'_0">Edit</span>
64
+ <select class="form-control" style="display:none;" id="' . esc_attr($ident) . '_0" catId="'.$id.'" onchange="selectSubCategory(this)"></select>';
65
 
66
  for ( $i = 1; $i < $category_levels; $i ++ ) {
67
+ $html_code .= '<select class="" id="' . esc_attr($ident) . '_' . $i . '" value="0" catId="'.$id.'" style="display:none;" onchange="selectSubCategory(this)"></select>';
68
  }
69
  }else{
70
+ $html_code = '<div id="category-selector-' . esc_attr($ident) . '" style="display:' . esc_attr($display) . '">
71
  <div id="selected-categories">
72
  <input type="hidden" name="category-'.$id.'" id="category-'.$id.'" value="">
73
  <input type="hidden" name="category-name-'.$id.'" id="category-name-'.$id.'" value="">
74
  </div>
75
+ <select class="form-control" id="' . esc_attr($ident) . '_0" catId="'.$id.'" onchange="selectSubCategory(this)"></select>';
76
 
77
  for ( $i = 1; $i < $category_levels; $i ++ ) {
78
+ $html_code .= '<select class="" id="' . esc_attr($ident) . '_' . $i . '" value="0" catId="'.$id.'" style="display:none;" onchange="selectSubCategory(this)"></select>';
79
  }
80
 
81
  }
82
  /*if (!class_exists('ShoppingApi')) {
83
  require_once(__DIR__ . '/ShoppingApi.php');
84
+ }*/
 
 
85
 
86
  $html_code .= '</div>';
 
87
  return $html_code;
88
  }
89
 
97
  private static function category_description_data_item( $category_id ) {
98
  $category_description = '' !== category_description( $category_id ) ? category_description( $category_id ) : '—';
99
 
100
+ $html_code = '<span aria-hidden="true">' . esc_attr($category_description) . '</span>';
101
 
102
  return $html_code;
103
  }
104
  }
 
105
  // end of TVC_Category_Selector_Element class
106
+ endif;
 
includes/setup/class-tvc-product-sync-helper.php CHANGED
@@ -27,8 +27,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
27
  public function includes(){
28
  if (!class_exists('Tatvic_Category_Wrapper')) {
29
  require_once(__DIR__ . '/tatvic-category-wrapper.php');
30
- }
31
-
32
  }
33
  /*
34
  * careate table batch wise for product sync
@@ -37,23 +36,19 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
37
  global $wpdb;
38
  $tablename = $wpdb->prefix ."ee_product_sync_profile";
39
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
40
- if ( $wpdb->get_var( $query ) === $tablename ) {
41
-
42
  }else{
43
- $sql_create = "CREATE TABLE ".$tablename." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `profile_title` VARCHAR(100) NULL , `g_cat_id` INT(10) NULL , `g_attribute_mapping` LONGTEXT NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) );";
44
- if(maybe_create_table( $tablename, $sql_create )){
45
-
46
  }
47
  }
48
 
49
  $tablename = $wpdb->prefix ."ee_prouct_pre_sync_data";
50
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
51
- if ( $wpdb->get_var( $query ) === $tablename ) {
52
-
53
  }else{
54
- $sql_create = "CREATE TABLE ".$tablename." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `w_product_id` BIGINT(20) NOT NULL , `w_cat_id` INT(10) NOT NULL , `g_cat_id` INT(10) NOT NULL , `product_sync_profile_id` INT(10) NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) );";
55
- if(maybe_create_table( $tablename, $sql_create )){
56
-
57
  }
58
  }
59
  }
@@ -96,10 +91,10 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
96
  }
97
  }
98
  if(empty($sync_profile_data)){
99
- return array("error"=>true,"message"=>"No product sync profiles find.");
100
  }
101
  if(empty($products)){
102
- return array("error"=>true,"message"=>"Products not found.");
103
  }
104
  foreach ($products as $postkey => $postvalue) {
105
  $product_ids[] = $postvalue->w_product_id;
@@ -109,10 +104,10 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
109
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
110
 
111
  $product = array(
112
- 'offer_id'=>$postvalue->w_product_id,
113
  'channel'=>'online',
114
  'link'=>get_permalink($postvalue->w_product_id),
115
- 'google_product_category'=>$postvalue->g_cat_id
116
  );
117
 
118
  $temp_product=array();
@@ -123,7 +118,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
123
  $formArray = json_decode($g_attribute_mapping, true);
124
  }
125
  if(empty($formArray)){
126
- return array("error"=>true,"message"=>"Product sync profile not found.");
127
  }
128
  //$formArray = json_decode($postvalue->g_attribute_mapping, true);
129
  foreach ($fixed_att_select_list as $fixed_key) {
@@ -189,6 +184,8 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
189
  $product[$key]['value'] = $postmeta_var->_price;
190
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
191
  $product[$key]['value'] = $postmeta_var->_sale_price;
 
 
192
  }
193
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
194
  $product[$key]['currency'] = $tvc_currency;
@@ -200,6 +197,8 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
200
  $product[$key]['value'] = $postmeta_var->$value;
201
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
202
  $product[$key]['value'] = $postmeta_var->_sale_price;
 
 
203
  }
204
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
205
  $product[$key]['currency'] = $tvc_currency;
@@ -220,7 +219,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
220
  }
221
  }
222
  $item = [
223
- 'merchant_id' => $merchantId,
224
  'batch_id' => ++$batchId,
225
  'method' => 'insert',
226
  'product' => $product
@@ -282,7 +281,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
282
  }
283
  }
284
  $item = [
285
- 'merchant_id' => $merchantId,
286
  'batch_id' => ++$batchId,
287
  'method' => 'insert',
288
  'product' => $product
@@ -305,15 +304,15 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
305
  //$count = 0;
306
  $pre_last_sync_product_id = $last_sync_product_id;
307
  if( $product_count > 0 ){
308
- $tvc_currency = $this->TVC_Admin_Helper->get_woo_currency();
309
- $merchantId = $this->merchantId;
310
- $customerId = $this->currentCustomerId;
311
- $accountId = $this->accountId;
312
- $subscriptionId = $this->subscriptionId;
313
- $last_sync_product_id =( $last_sync_product_id > 0)?$last_sync_product_id:0;
314
  global $wpdb;
315
  $tablename = $wpdb->prefix .'ee_prouct_pre_sync_data';
316
- $sql = "select * from ".$tablename." where id > ".$last_sync_product_id." LIMIT ".$product_batch_size;
317
  $products = $wpdb->get_results($sql, OBJECT);
318
  $entries = [];
319
  if(!empty($products)){
@@ -321,9 +320,9 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
321
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
322
  // call product sync API
323
  $data = [
324
- 'merchant_id' => $accountId,
325
- 'account_id' => $merchantId,
326
- 'subscription_id' => $subscriptionId,
327
  'entries' => $p_map_attribute['items']
328
  ];
329
  $response = $CustomApi->products_sync($data);
@@ -361,36 +360,36 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
361
  <div class="modal-content">
362
  <div class="modal-body">
363
  <button type="button" class="close tvc-popup-close" data-dismiss="modal"> &times; </button>
364
- <h5>Map your product attributes</h5>
365
- <p>Google Merchant Center uses attributes to format your product information for Shopping Ads. Map your product attributes to the Merchant Center product attributes below. You can also edit each product’s individual attributes after you sync your products. Not all fields below are marked required, however based on your shop's categories and your country you might map a few optional attributes as well. See the full guide <a target="_blank" href="https://support.google.com/merchants/answer/7052112">here</a>.
366
  </p>
367
  <div class="wizard-section campaign-wizard">
368
  <div class="wizard-content">
369
- <input type="hidden" name="merchant_id" id="merchant_id" value="<?php echo $this->merchantId; ?>">
370
  <form class="tab-wizard wizard- wizard" id="productSync" method="POST">
371
- <h5><span class="wiz-title">Category Mapping</span></h5>
372
  <section>
373
  <div class="card-wrapper">
374
  <div class="row">
375
  <div class="col-6">
376
- <h6 class="heading-tbl"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/woocommerce.svg'; ?>" alt="WooCommerce"/>Commerce Category</h6>
377
  </div>
378
  <div class="col-6">
379
- <h6 class="heading-tbl gmc-image-heading"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/google-shopping.svg'; ?>" alt="google-shopping"/>Google Merchant Center Category</h6>
380
  </div>
381
  </div><?php echo $category_wrapper; ?>
382
  </div>
383
  </section>
384
  <!-- Step 2 -->
385
- <h5><span class="wiz-title">Product Attribution Mapping</span></h5>
386
  <section>
387
  <div class="card-wrapper">
388
  <div class="row">
389
  <div class="col-6">
390
- <h6 class="heading-tbl gmc-image-heading"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/google-shopping.svg'; ?>" alt="google-shopping"/>Google Merchant center product attributes</h6>
391
  </div>
392
  <div class="col-6">
393
- <h6 class="heading-tbl"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/woocommerce.svg'; ?>" alt="WooCommerce"/>Commerce product attributes</h6>
394
  </div>
395
  </div>
396
  <?php
@@ -404,7 +403,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
404
  <span class="td-head">' . $attribute["field"] . " " . (isset($attribute["required"]) && $attribute["required"] == 1 ? '<span style="color: red;"> *</span>' : "") . '
405
  <div class="tvc-tooltip">
406
  <span class="tvc-tooltiptext tvc-tooltip-right">'.(isset($attribute["desc"])? $attribute["desc"]:"") .'</span>
407
- <img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/informationI.svg" alt=""/>
408
  </div>
409
  </span>
410
  </div>
@@ -419,16 +418,16 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
419
  }else if($attribute["field"]=='shipping'){
420
  //$name, $class_id, string $label=null, $sel_val = null, bool $require = false
421
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
422
- echo $this->TVC_Admin_Helper->tvc_text($attribute["field"], 'number', '', 'Add shipping flat rate', $sel_val, $require);
423
  }else if($attribute["field"]=='tax'){
424
  //$name, $class_id, string $label=null, $sel_val = null, bool $require = false
425
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
426
  echo $this->TVC_Admin_Helper->tvc_text($attribute["field"], 'number', '', 'Add TAX flat (%)', $sel_val, $require);
427
  }else if($attribute["field"]=='content_language'){
428
- echo $this->TVC_Admin_Helper->tvc_language_select($attribute["field"], 'content_language', 'Please Select Attribute', 'en',$require);
429
  }else if($attribute["field"]=='target_country'){
430
  //$name, $class_id, bool $require = false
431
- echo $this->TVC_Admin_Helper->tvc_countries_select($attribute["field"], 'target_country', 'Please Select Attribute', $require);
432
  }else{
433
  if(isset($attribute['fixed_options']) && $attribute['fixed_options'] !=""){
434
  $tvc_select_option_t = explode(",", $attribute['fixed_options']);
@@ -437,11 +436,11 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
437
  $tvc_select_option[]['field'] = $o_val;
438
  }
439
  $sel_val = $sel_val_def;
440
- $this->TVC_Admin_Helper->tvc_select($attribute["field"],$attribute["field"],'Please Select Attribute', $sel_val, $require, $tvc_select_option);
441
  }else{
442
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
443
  //$name, $class_id, $label="Please Select", $sel_val, $require, $option_list
444
- $this->TVC_Admin_Helper->tvc_select($attribute["field"],$attribute["field"],'Please Select Attribute', $sel_val, $require, $tvc_select_option);
445
  }
446
  }
447
  echo '</div>
@@ -459,7 +458,7 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
459
  </div>
460
  </div>
461
  <div class="progress-bar-wapper">
462
- <span class="tvc-sync-message">Initializing...</span>
463
  <div class="progress tvc-sync-progress-db">
464
  <div class="progress-bar progress-bar-striped progress-bar-animated tvc-sync-progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
465
  </div>
@@ -535,10 +534,10 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
535
  $('.progress-bar-wapper').addClass('open');
536
  var data = {
537
  action:'tvcajax_product_sync_bantch_wise',
538
- merchant_id:'<?php echo $this->merchantId; ?>',
539
- account_id:'<?php echo $this->accountId; ?>',
540
- customer_id: '<?php echo $this->currentCustomerId; ?>',
541
- subscription_id: '<?php echo $this->subscriptionId; ?>',
542
  tvc_data: jQuery("#productSync").serialize(),
543
  sync_progressive_data:sync_progressive_data
544
  }
@@ -608,9 +607,6 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
608
  tvc_helper.tvc_alert("error","",response.api_rs.message);
609
  }
610
  }, 2000);
611
- setTimeout(function(){
612
- //window.location.replace("<?php echo $this->site_url.'sync_product_page'; ?>");
613
- }, 7000);
614
  }
615
  }else{
616
  tvc_helper.tvc_alert("error","",response.message);
@@ -618,44 +614,9 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
618
  window.location.replace("<?php echo $this->site_url.'sync_product_page'; ?>");
619
  }, 2000);
620
  }
621
- //console.log(response);
622
  }
623
- });
624
- /*var merchantId = '<?php echo $this->merchantId; ?>';
625
- var accountId = '<?php echo $this->accountId; ?>';
626
- var customerId = '<?php echo $this->currentCustomerId; ?>';
627
- var subscriptionId = '<?php echo $this->subscriptionId; ?>';
628
- var formData = jQuery("#productSync").serialize();
629
- jQuery.post(
630
- myAjaxNonces.ajaxurl,
631
- {
632
- action: "tvcajax-product-syncup",
633
- merchantId: merchantId,
634
- customerId: customerId,
635
- accountId: accountId,
636
- subscriptionId: subscriptionId,
637
- data: formData,
638
- productSyncupNonce: myAjaxNonces.productSyncupNonce
639
- },
640
- function( response ) {
641
- jQuery("#feed-spinner").css("display", "none");
642
- //console.log(response);
643
- var rsp = JSON.parse(response);
644
- if (rsp.status == "success") {
645
- $('#syncProduct').modal('hide');
646
- var message = "Your products have been synced in your merchant center account. It takes up to 30 minutes to reflect the product data in merchant center. As soon as they are updated, they will be shown in the \"Product Sync\" dashboard.";
647
- if (rsp.skipProducts > 0) {
648
- message = message + "\n Because of pricing issues, " + rsp.skipProducts + " products did not sync.";
649
- }
650
- tvc_helper.tvc_alert("success","",message);
651
- setTimeout(function(){
652
- window.location.replace("<?php echo $this->site_url.'sync_product_page'; ?>");
653
- }, 7000);
654
- } else {
655
- tvc_helper.tvc_alert("error","",rsp.message);
656
- }
657
- }
658
- );*/
659
  }
660
 
661
  $(document).on("show.bs.modal", "#syncProduct", function (e) {
@@ -667,8 +628,8 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
667
  });
668
 
669
  function selectCategory() {
670
- var country_id = "<?php echo $this->country; ?>";
671
- var customer_id = '<?php echo $this->currentCustomerId?>';
672
  var parent = "";
673
  jQuery.post(
674
  tvc_ajax_url,
@@ -710,8 +671,8 @@ if ( ! class_exists( 'TVCProductSyncHelper' ) ) {
710
  removeChildCategory(selectId);
711
  selectChildCategoryValue(wooCategoryId);
712
  if (GmcParent != undefined) {
713
- var country_id = "<?php echo $this->country; ?>";
714
- var customer_id = '<?php echo $this->currentCustomerId?>';
715
  jQuery.post(
716
  tvc_ajax_url,
717
  {
27
  public function includes(){
28
  if (!class_exists('Tatvic_Category_Wrapper')) {
29
  require_once(__DIR__ . '/tatvic-category-wrapper.php');
30
+ }
 
31
  }
32
  /*
33
  * careate table batch wise for product sync
36
  global $wpdb;
37
  $tablename = $wpdb->prefix ."ee_product_sync_profile";
38
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
39
+ if ( $wpdb->get_var( $query ) === $tablename ) {
 
40
  }else{
41
+ $sql_create = "CREATE TABLE ".esc_sql($tablename)." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `profile_title` VARCHAR(100) NULL , `g_cat_id` INT(10) NULL , `g_attribute_mapping` LONGTEXT NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) );";
42
+ if(maybe_create_table( $tablename, $sql_create )){
 
43
  }
44
  }
45
 
46
  $tablename = $wpdb->prefix ."ee_prouct_pre_sync_data";
47
  $query = $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $tablename ) );
48
+ if ( $wpdb->get_var( $query ) === $tablename ) {
 
49
  }else{
50
+ $sql_create = "CREATE TABLE ".esc_sql($tablename)." ( `id` BIGINT(20) NOT NULL AUTO_INCREMENT , `w_product_id` BIGINT(20) NOT NULL , `w_cat_id` INT(10) NOT NULL , `g_cat_id` INT(10) NOT NULL , `product_sync_profile_id` INT(10) NOT NULL , `update_date` DATE NOT NULL , `status` INT(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) );";
51
+ if(maybe_create_table( $tablename, $sql_create )){
 
52
  }
53
  }
54
  }
91
  }
92
  }
93
  if(empty($sync_profile_data)){
94
+ return array("error"=>true,"message"=>__("No product sync profiles find.","conversios"));
95
  }
96
  if(empty($products)){
97
+ return array("error"=>true,"message"=>__("Products not found.","conversios"));
98
  }
99
  foreach ($products as $postkey => $postvalue) {
100
  $product_ids[] = $postvalue->w_product_id;
104
  $postObj = (object) array_merge((array) get_post($postvalue->w_product_id), (array) $postmeta);
105
 
106
  $product = array(
107
+ 'offer_id'=>esc_attr($postvalue->w_product_id),
108
  'channel'=>'online',
109
  'link'=>get_permalink($postvalue->w_product_id),
110
+ 'google_product_category'=>esc_attr($postvalue->g_cat_id)
111
  );
112
 
113
  $temp_product=array();
118
  $formArray = json_decode($g_attribute_mapping, true);
119
  }
120
  if(empty($formArray)){
121
+ return array("error"=>true,"message"=>__("Product sync profile not found.","conversios"));
122
  }
123
  //$formArray = json_decode($postvalue->g_attribute_mapping, true);
124
  foreach ($fixed_att_select_list as $fixed_key) {
184
  $product[$key]['value'] = $postmeta_var->_price;
185
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
186
  $product[$key]['value'] = $postmeta_var->_sale_price;
187
+ }else{
188
+ unset($product[$key]);
189
  }
190
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
191
  $product[$key]['currency'] = $tvc_currency;
197
  $product[$key]['value'] = $postmeta_var->$value;
198
  }else if(isset($postmeta_var->_sale_price) && $postmeta_var->_sale_price && $postmeta_var->_sale_price >0 ){
199
  $product[$key]['value'] = $postmeta_var->_sale_price;
200
+ }else{
201
+ unset($product[$key]);
202
  }
203
  if(isset($product[$key]['value']) && $product[$key]['value'] >0){
204
  $product[$key]['currency'] = $tvc_currency;
219
  }
220
  }
221
  $item = [
222
+ 'merchant_id' => esc_attr($merchantId),
223
  'batch_id' => ++$batchId,
224
  'method' => 'insert',
225
  'product' => $product
281
  }
282
  }
283
  $item = [
284
+ 'merchant_id' => esc_attr($merchantId),
285
  'batch_id' => ++$batchId,
286
  'method' => 'insert',
287
  'product' => $product
304
  //$count = 0;
305
  $pre_last_sync_product_id = $last_sync_product_id;
306
  if( $product_count > 0 ){
307
+ $tvc_currency = esc_attr($this->TVC_Admin_Helper->get_woo_currency());
308
+ $merchantId = esc_attr($this->merchantId);
309
+ $customerId = esc_attr($this->currentCustomerId);
310
+ $accountId = esc_attr($this->accountId);
311
+ $subscriptionId = esc_attr($this->subscriptionId);
312
+ $last_sync_product_id =esc_attr(( $last_sync_product_id > 0)?$last_sync_product_id:0);
313
  global $wpdb;
314
  $tablename = $wpdb->prefix .'ee_prouct_pre_sync_data';
315
+ $sql = "select * from ".esc_sql($tablename)." where id > ".esc_sql($last_sync_product_id)." LIMIT ".$product_batch_size;
316
  $products = $wpdb->get_results($sql, OBJECT);
317
  $entries = [];
318
  if(!empty($products)){
320
  if(!empty($p_map_attribute) && isset($p_map_attribute['items']) && !empty($p_map_attribute['items'])){
321
  // call product sync API
322
  $data = [
323
+ 'merchant_id' => esc_attr($accountId),
324
+ 'account_id' => esc_attr($merchantId),
325
+ 'subscription_id' => esc_attr($subscriptionId),
326
  'entries' => $p_map_attribute['items']
327
  ];
328
  $response = $CustomApi->products_sync($data);
360
  <div class="modal-content">
361
  <div class="modal-body">
362
  <button type="button" class="close tvc-popup-close" data-dismiss="modal"> &times; </button>
363
+ <h5><?php _e("Map your product attributes","conversios"); ?></h5>
364
+ <p><?php _e("Google Merchant Center uses attributes to format your product information for Shopping Ads. Map your product attributes to the Merchant Center product attributes below. You can also edit each product’s individual attributes after you sync your products. Not all fields below are marked required, however based on your shop's categories and your country you might map a few optional attributes as well. See the full guide","conversios"); ?> <a target="_blank" href="<?php esc_url("https://support.google.com/merchants/answer/7052112"); ?>"><?php _e("here","conversios"); ?></a>.
365
  </p>
366
  <div class="wizard-section campaign-wizard">
367
  <div class="wizard-content">
368
+ <input type="hidden" name="merchant_id" id="merchant_id" value="<?php echo esc_attr($this->merchantId); ?>">
369
  <form class="tab-wizard wizard- wizard" id="productSync" method="POST">
370
+ <h5><span class="wiz-title"><?php _e("Category Mapping","conversios"); ?></span></h5>
371
  <section>
372
  <div class="card-wrapper">
373
  <div class="row">
374
  <div class="col-6">
375
+ <h6 class="heading-tbl"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/woocommerce.svg'); ?>" alt="WooCommerce"/><?php _e("Commerce Category","conversios"); ?></h6>
376
  </div>
377
  <div class="col-6">
378
+ <h6 class="heading-tbl gmc-image-heading"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/google-shopping.svg'); ?>" alt="google-shopping"/><?php _e("Google Merchant Center Category","conversios"); ?></h6>
379
  </div>
380
  </div><?php echo $category_wrapper; ?>
381
  </div>
382
  </section>
383
  <!-- Step 2 -->
384
+ <h5><span class="wiz-title"><?php _e("Product Attribution Mapping","conversios"); ?></span></h5>
385
  <section>
386
  <div class="card-wrapper">
387
  <div class="row">
388
  <div class="col-6">
389
+ <h6 class="heading-tbl gmc-image-heading"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/google-shopping.svg'); ?>" alt="google-shopping"/><?php _e("Google Merchant center product attributes","conversios"); ?></h6>
390
  </div>
391
  <div class="col-6">
392
+ <h6 class="heading-tbl"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/woocommerce.svg'); ?>" alt="WooCommerce"/><?php _e("Commerce product attributes","conversios"); ?></h6>
393
  </div>
394
  </div>
395
  <?php
403
  <span class="td-head">' . $attribute["field"] . " " . (isset($attribute["required"]) && $attribute["required"] == 1 ? '<span style="color: red;"> *</span>' : "") . '
404
  <div class="tvc-tooltip">
405
  <span class="tvc-tooltiptext tvc-tooltip-right">'.(isset($attribute["desc"])? $attribute["desc"]:"") .'</span>
406
+ <img src="'. esc_url(ENHANCAD_PLUGIN_URL."/admin/images/icon/informationI.svg").'" alt=""/>
407
  </div>
408
  </span>
409
  </div>
418
  }else if($attribute["field"]=='shipping'){
419
  //$name, $class_id, string $label=null, $sel_val = null, bool $require = false
420
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
421
+ echo $this->TVC_Admin_Helper->tvc_text($attribute["field"], 'number', '', __('Add shipping flat rate','conversios'), $sel_val, $require);
422
  }else if($attribute["field"]=='tax'){
423
  //$name, $class_id, string $label=null, $sel_val = null, bool $require = false
424
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
425
  echo $this->TVC_Admin_Helper->tvc_text($attribute["field"], 'number', '', 'Add TAX flat (%)', $sel_val, $require);
426
  }else if($attribute["field"]=='content_language'){
427
+ echo $this->TVC_Admin_Helper->tvc_language_select($attribute["field"], 'content_language', __('Please Select Attribute','conversios'), 'en',$require);
428
  }else if($attribute["field"]=='target_country'){
429
  //$name, $class_id, bool $require = false
430
+ echo $this->TVC_Admin_Helper->tvc_countries_select($attribute["field"], 'target_country', __('Please Select Attribute','conversios'), $require);
431
  }else{
432
  if(isset($attribute['fixed_options']) && $attribute['fixed_options'] !=""){
433
  $tvc_select_option_t = explode(",", $attribute['fixed_options']);
436
  $tvc_select_option[]['field'] = $o_val;
437
  }
438
  $sel_val = $sel_val_def;
439
+ $this->TVC_Admin_Helper->tvc_select($attribute["field"],$attribute["field"],__('Please Select Attribute','conversios'), $sel_val, $require, $tvc_select_option);
440
  }else{
441
  $sel_val = (isset($ee_mapped_attrs[$attribute["field"]]))?$ee_mapped_attrs[$attribute["field"]]:$sel_val_def;
442
  //$name, $class_id, $label="Please Select", $sel_val, $require, $option_list
443
+ $this->TVC_Admin_Helper->tvc_select($attribute["field"],$attribute["field"],__('Please Select Attribute','conversios'), $sel_val, $require, $tvc_select_option);
444
  }
445
  }
446
  echo '</div>
458
  </div>
459
  </div>
460
  <div class="progress-bar-wapper">
461
+ <span class="tvc-sync-message"><?php _e("Initializing...","conversios"); ?></span>
462
  <div class="progress tvc-sync-progress-db">
463
  <div class="progress-bar progress-bar-striped progress-bar-animated tvc-sync-progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">0%</div>
464
  </div>
534
  $('.progress-bar-wapper').addClass('open');
535
  var data = {
536
  action:'tvcajax_product_sync_bantch_wise',
537
+ merchant_id:'<?php echo esc_attr($this->merchantId); ?>',
538
+ account_id:'<?php echo esc_attr($this->accountId); ?>',
539
+ customer_id: '<?php echo esc_attr($this->currentCustomerId); ?>',
540
+ subscription_id: '<?php echo esc_attr($this->subscriptionId); ?>',
541
  tvc_data: jQuery("#productSync").serialize(),
542
  sync_progressive_data:sync_progressive_data
543
  }
607
  tvc_helper.tvc_alert("error","",response.api_rs.message);
608
  }
609
  }, 2000);
 
 
 
610
  }
611
  }else{
612
  tvc_helper.tvc_alert("error","",response.message);
614
  window.location.replace("<?php echo $this->site_url.'sync_product_page'; ?>");
615
  }, 2000);
616
  }
617
+
618
  }
619
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
620
  }
621
 
622
  $(document).on("show.bs.modal", "#syncProduct", function (e) {
628
  });
629
 
630
  function selectCategory() {
631
+ var country_id = "<?php echo esc_attr($this->country); ?>";
632
+ var customer_id = '<?php echo esc_attr($this->currentCustomerId); ?>';
633
  var parent = "";
634
  jQuery.post(
635
  tvc_ajax_url,
671
  removeChildCategory(selectId);
672
  selectChildCategoryValue(wooCategoryId);
673
  if (GmcParent != undefined) {
674
+ var country_id = "<?php echo esc_attr($this->country); ?>";
675
+ var customer_id = '<?php echo esc_attr($this->currentCustomerId); ?>';
676
  jQuery.post(
677
  tvc_ajax_url,
678
  {
includes/setup/google-ads.php CHANGED
@@ -23,23 +23,23 @@ class GoogleAds {
23
  $googleDetail = $this->google_detail;
24
  $googleDetail_setting = $this->google_detail['setting'];
25
  if(isset($_POST['remarketing_tags'])){
26
- update_option('ads_ert', $_POST['remarketing_tags']);
27
- $googleDetail_setting->remarketing_tags = $_POST['remarketing_tags'];
28
  }else{
29
  update_option('ads_ert', 0);
30
  $googleDetail_setting->remarketing_tags = 0;
31
  }
32
  if(isset($_POST['dynamic_remarketing_tags'])){
33
- update_option('ads_edrt', $_POST['dynamic_remarketing_tags']);
34
- $googleDetail_setting->dynamic_remarketing_tags = $_POST['dynamic_remarketing_tags'];
35
  }else{
36
  update_option('ads_edrt', 0);
37
  $googleDetail_setting->dynamic_remarketing_tags = 0;
38
  }
39
  if($this->plan_id != 1){
40
  if(isset($_POST['google_ads_conversion_tracking'])){
41
- update_option('google_ads_conversion_tracking', $_POST['google_ads_conversion_tracking']);
42
- $googleDetail_setting->google_ads_conversion_tracking = $_POST['google_ads_conversion_tracking'];
43
  $this->TVC_Admin_Helper->update_conversion_send_to();
44
  }else{
45
  update_option('google_ads_conversion_tracking', 0);
@@ -47,14 +47,14 @@ class GoogleAds {
47
  }
48
  }
49
  if(isset($_POST['link_google_analytics_with_google_ads'])){
50
- $googleDetail_setting->link_google_analytics_with_google_ads = $_POST['link_google_analytics_with_google_ads'];
51
  }else{
52
  $googleDetail_setting->link_google_analytics_with_google_ads = 0;
53
  }
54
  $googleDetail['setting'] =$googleDetail_setting;
55
  $this->TVC_Admin_Helper->set_ee_options_data($googleDetail);
56
  $class = 'alert-message tvc-alert-success';
57
- $message = esc_html__('Your tracking options have been saved.');
58
  }
59
 
60
  $googleDetail = [];
@@ -77,18 +77,18 @@ class GoogleAds {
77
  <div class="google-account-analytics">
78
  <div class="row mb-3">
79
  <div class="col-6 col-md-6 col-lg-6">
80
- <h2 class="ga-title">Connected Google Ads account:</h2>
81
  </div>
82
  <div class="col-6 col-md-6 col-lg-6 text-right">
83
  <div class="acc-num">
84
  <p class="ga-text">
85
- <?php echo ((isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') ? $googleDetail->google_ads_id : '<span>Get started</span>'); ?>
86
  </p>
87
  <?php
88
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
89
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
90
  } else {
91
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
92
  }?>
93
  </div>
94
  </div>
@@ -96,35 +96,35 @@ class GoogleAds {
96
  </div>
97
  <div class="row mb-3">
98
  <div class="col-6 col-md-6 col-lg-6">
99
- <h2 class="ga-title">Linked Google Analytics Account:</h2>
100
  </div>
101
  <div class="col-6 col-md-6 col-lg-6 text-right">
102
  <div class="acc-num">
103
  <p class="ga-text">
104
- <?php echo (isset($googleDetail->property_id) && $googleDetail->property_id != '' ? $googleDetail->property_id : '<span>Get started</span>');?>
105
  </p>
106
  <?php
107
  if(isset($googleDetail->property_id) && $googleDetail->property_id != ''){
108
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
109
  }else{
110
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
111
  } ?>
112
  </div>
113
  </div>
114
  </div>
115
  <div class="row mb-3">
116
  <div class="col-6 col-md-6 col-lg-6">
117
- <h2 class="ga-title">Linked Google Merchant Center Account:</h2>
118
  </div>
119
  <div class="col-6 col-md-6 col-lg-6 text-right">
120
  <div class="acc-num">
121
- <p class="ga-text"><?php echo (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '' ? $googleDetail->google_merchant_center_id : '<span>Get started</span>'); ?>
122
  </p>
123
  <?php
124
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') {
125
- echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
126
  } else {
127
- echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
128
  } ?>
129
  </div>
130
  </div>
@@ -135,16 +135,16 @@ class GoogleAds {
135
  <div class="col-md-12">
136
  <div class="form-group">
137
  <div class="tvc-custom-control tvc-custom-checkbox">
138
- <input type="checkbox" class="tvc-custom-control-input" id="customCheck1" name="remarketing_tags" value="1" <?php echo ($googleDetail->remarketing_tags == 1) ? 'checked="checked"' : ''; ?> >
139
- <label class="custom-control-label" for="customCheck1">Enable remarketing tags</label>
140
  </div>
141
  </div>
142
  </div>
143
  <div class="col-md-12">
144
  <div class="form-group">
145
  <div class="tvc-custom-control tvc-custom-checkbox">
146
- <input type="checkbox" class="tvc-custom-control-input" id="customCheck2" name="dynamic_remarketing_tags" value="1" <?php echo ($googleDetail->dynamic_remarketing_tags == 1) ? 'checked="checked"' : ''; ?>>
147
- <label class="custom-control-label" for="customCheck2">Enable dynamic remarketing tags</label>
148
  </div>
149
  </div>
150
  </div>
@@ -152,8 +152,8 @@ class GoogleAds {
152
  <div class="col-md-12">
153
  <div class="form-group">
154
  <div class="tvc-custom-control tvc-custom-checkbox">
155
- <input type="checkbox" class="tvc-custom-control-input" id="google_ads_conversion_tracking" name="google_ads_conversion_tracking" value="1" <?php echo ($googleDetail->google_ads_conversion_tracking == 1) ? 'checked="checked"' : ''; ?>>
156
- <label class="custom-control-label" for="google_ads_conversion_tracking">Enable Google Ads conversion tracking</label>
157
  </div>
158
  </div>
159
  </div>
@@ -161,22 +161,22 @@ class GoogleAds {
161
  <div class="col-md-12">
162
  <div class="form-group">
163
  <div class="tvc-custom-control tvc-custom-checkbox">
164
- <input type="checkbox" class="tvc-custom-control-input" id="customCheck3" name="link_google_analytics_with_google_ads" value="1" <?php echo ($googleDetail->link_google_analytics_with_google_ads == 1) ? 'checked="checked"' : ''; ?> >
165
- <label class="custom-control-label" for="customCheck3">Link Google analytics with google ads</label>
166
  </div>
167
  </div>
168
  </div>
169
  </div>
170
  <?php
171
  }else{
172
- $icon_img ='<img src="'.ENHANCAD_PLUGIN_URL.'/admin/images/config-success.svg" alt="configuration success" class="config-success">';
173
  ?>
174
- <h2 class="ga-title">Connect Google Ads account to enable below features.</h2>
175
  <br>
176
  <ul>
177
- <li><?php echo $icon_img;?>Enable remarketing tags</li>
178
- <li><?php echo $icon_img;?>Enable dynamic remarketing tags</li>
179
- <li><?php echo $icon_img;?>Link Google analytics with google ads</li>
180
  </ul>
181
  <?php
182
  } ?>
@@ -184,7 +184,7 @@ class GoogleAds {
184
  <?php
185
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') { ?>
186
  <div class="text-left">
187
- <button type="submit" id="google-add" class="btn btn-primary btn-success" name="google-add">Save</button>
188
  </div>
189
  <?php } ?>
190
  </form>
@@ -196,7 +196,7 @@ class GoogleAds {
196
  </div>
197
  </div>
198
  </div>
199
- <?php echo get_connect_google_popup_html();
200
  }
201
  }
202
  ?>
23
  $googleDetail = $this->google_detail;
24
  $googleDetail_setting = $this->google_detail['setting'];
25
  if(isset($_POST['remarketing_tags'])){
26
+ update_option('ads_ert', sanitize_text_field($_POST['remarketing_tags']) );
27
+ $googleDetail_setting->remarketing_tags = sanitize_text_field($_POST['remarketing_tags']);
28
  }else{
29
  update_option('ads_ert', 0);
30
  $googleDetail_setting->remarketing_tags = 0;
31
  }
32
  if(isset($_POST['dynamic_remarketing_tags'])){
33
+ update_option('ads_edrt', sanitize_text_field($_POST['dynamic_remarketing_tags']) );
34
+ $googleDetail_setting->dynamic_remarketing_tags = sanitize_text_field($_POST['dynamic_remarketing_tags']);
35
  }else{
36
  update_option('ads_edrt', 0);
37
  $googleDetail_setting->dynamic_remarketing_tags = 0;
38
  }
39
  if($this->plan_id != 1){
40
  if(isset($_POST['google_ads_conversion_tracking'])){
41
+ update_option('google_ads_conversion_tracking', sanitize_text_field($_POST['google_ads_conversion_tracking']) );
42
+ $googleDetail_setting->google_ads_conversion_tracking = sanitize_text_field($_POST['google_ads_conversion_tracking']);
43
  $this->TVC_Admin_Helper->update_conversion_send_to();
44
  }else{
45
  update_option('google_ads_conversion_tracking', 0);
47
  }
48
  }
49
  if(isset($_POST['link_google_analytics_with_google_ads'])){
50
+ $googleDetail_setting->link_google_analytics_with_google_ads = sanitize_text_field($_POST['link_google_analytics_with_google_ads']);
51
  }else{
52
  $googleDetail_setting->link_google_analytics_with_google_ads = 0;
53
  }
54
  $googleDetail['setting'] =$googleDetail_setting;
55
  $this->TVC_Admin_Helper->set_ee_options_data($googleDetail);
56
  $class = 'alert-message tvc-alert-success';
57
+ $message = esc_html__("Your tracking options have been saved.","conversios");
58
  }
59
 
60
  $googleDetail = [];
77
  <div class="google-account-analytics">
78
  <div class="row mb-3">
79
  <div class="col-6 col-md-6 col-lg-6">
80
+ <h2 class="ga-title"><?php _e("Connected Google Ads account:","conversios"); ?></h2>
81
  </div>
82
  <div class="col-6 col-md-6 col-lg-6 text-right">
83
  <div class="acc-num">
84
  <p class="ga-text">
85
+ <?php echo (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') ? $googleDetail->google_ads_id : __('<span>Get started</span>','conversios'); ?>
86
  </p>
87
  <?php
88
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
89
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
90
  } else {
91
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
92
  }?>
93
  </div>
94
  </div>
96
  </div>
97
  <div class="row mb-3">
98
  <div class="col-6 col-md-6 col-lg-6">
99
+ <h2 class="ga-title"><?php _e("Linked Google Analytics Account:","conversios"); ?></h2>
100
  </div>
101
  <div class="col-6 col-md-6 col-lg-6 text-right">
102
  <div class="acc-num">
103
  <p class="ga-text">
104
+ <?php echo isset($googleDetail->property_id) && $googleDetail->property_id != '' ? $googleDetail->property_id : __('<span>Get started</span>','conversios');?>
105
  </p>
106
  <?php
107
  if(isset($googleDetail->property_id) && $googleDetail->property_id != ''){
108
+ echo '<p class="ga-text text-right"><a href="' . esc_url($this->url) . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
109
  }else{
110
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
111
  } ?>
112
  </div>
113
  </div>
114
  </div>
115
  <div class="row mb-3">
116
  <div class="col-6 col-md-6 col-lg-6">
117
+ <h2 class="ga-title"><?php _e("Linked Google Merchant Center Account:","conversios"); ?></h2>
118
  </div>
119
  <div class="col-6 col-md-6 col-lg-6 text-right">
120
  <div class="acc-num">
121
+ <p class="ga-text"><?php echo isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '' ? $googleDetail->google_merchant_center_id : __('<span>Get started</span>','conversios'); ?>
122
  </p>
123
  <?php
124
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') {
125
+ echo '<p class="ga-text text-right"><a target="_blank" href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
126
  } else {
127
+ echo '<p class="ga-text text-right"><a href="#" class="text-underline" data-toggle="modal" data-target="#tvc_google_connect"><img src="'.esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
128
  } ?>
129
  </div>
130
  </div>
135
  <div class="col-md-12">
136
  <div class="form-group">
137
  <div class="tvc-custom-control tvc-custom-checkbox">
138
+ <input type="checkbox" class="tvc-custom-control-input" id="customCheck1" name="remarketing_tags" value="1" <?php echo (esc_attr($googleDetail->remarketing_tags) == 1) ? 'checked="checked"' : ''; ?> >
139
+ <label class="custom-control-label" for="customCheck1"><?php _e("Enable remarketing tags","conversios"); ?></label>
140
  </div>
141
  </div>
142
  </div>
143
  <div class="col-md-12">
144
  <div class="form-group">
145
  <div class="tvc-custom-control tvc-custom-checkbox">
146
+ <input type="checkbox" class="tvc-custom-control-input" id="customCheck2" name="dynamic_remarketing_tags" value="1" <?php echo (esc_attr($googleDetail->dynamic_remarketing_tags) == 1) ? 'checked="checked"' : ''; ?>>
147
+ <label class="custom-control-label" for="customCheck2"><?php _e("Enable dynamic remarketing tags","conversios"); ?></label>
148
  </div>
149
  </div>
150
  </div>
152
  <div class="col-md-12">
153
  <div class="form-group">
154
  <div class="tvc-custom-control tvc-custom-checkbox">
155
+ <input type="checkbox" class="tvc-custom-control-input" id="google_ads_conversion_tracking" name="google_ads_conversion_tracking" value="1" <?php echo (esc_attr($googleDetail->google_ads_conversion_tracking) == 1) ? 'checked="checked"' : ''; ?>>
156
+ <label class="custom-control-label" for="google_ads_conversion_tracking"><?php _e("Enable Google Ads conversion tracking","conversios"); ?></label>
157
  </div>
158
  </div>
159
  </div>
161
  <div class="col-md-12">
162
  <div class="form-group">
163
  <div class="tvc-custom-control tvc-custom-checkbox">
164
+ <input type="checkbox" class="tvc-custom-control-input" id="customCheck3" name="link_google_analytics_with_google_ads" value="1" <?php echo (esc_attr($googleDetail->link_google_analytics_with_google_ads) == 1) ? 'checked="checked"' : ''; ?> >
165
+ <label class="custom-control-label" for="customCheck3"><?php _e("Link Google analytics with google ads","conversios"); ?></label>
166
  </div>
167
  </div>
168
  </div>
169
  </div>
170
  <?php
171
  }else{
172
+ $icon_img ='<img src="'.esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/config-success.svg').'" alt="configuration success" class="config-success">';
173
  ?>
174
+ <h2 class="ga-title"><?php _e("Connect Google Ads account to enable below features.","conversios"); ?></h2>
175
  <br>
176
  <ul>
177
+ <li><?php echo $icon_img;?><?php _e("Enable remarketing tags","conversios"); ?></li>
178
+ <li><?php echo $icon_img;?><?php _e("Enable dynamic remarketing tags","conversios"); ?></li>
179
+ <li><?php echo $icon_img;?><?php _e("Link Google analytics with google ads","conversios"); ?></li>
180
  </ul>
181
  <?php
182
  } ?>
184
  <?php
185
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') { ?>
186
  <div class="text-left">
187
+ <button type="submit" id="google-add" class="btn btn-primary btn-success" name="google-add"><?php _e("Save","conversios"); ?></button>
188
  </div>
189
  <?php } ?>
190
  </form>
196
  </div>
197
  </div>
198
  </div>
199
+ <?php
200
  }
201
  }
202
  ?>
includes/setup/google-shopping-feed-gaa-config.php CHANGED
@@ -55,7 +55,7 @@ class GAAConfiguration {
55
  <div class="col-md-6 col-lg-8 edit-section">
56
  <div class="edit-header-section">
57
  <script>
58
- var back_img = '<img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'; ?>" alt="back"/>';
59
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
60
  </script>
61
  </div>
@@ -66,32 +66,32 @@ class GAAConfiguration {
66
  <div class="google-account-analytics" id="gaa-config">
67
  <div class="row mb-3">
68
  <div class="col-6 col-md-6 col-lg-6">
69
- <h2 class="ga-title">Connected Google Merchant center account:</h2>
70
  </div>
71
  <div class="col-6 col-md-6 col-lg-6 text-right">
72
  <div class="acc-num">
73
- <p class="ga-text"><?php echo ((isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') ? $googleDetail->google_merchant_center_id : '<span>Get started</span>'); ?></p>
74
  <?php
75
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != ''){
76
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
77
  }else{
78
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
79
  }?>
80
  </div>
81
  </div>
82
  </div>
83
  <div class="row mb-3">
84
  <div class="col-6 col-md-6 col-lg-6">
85
- <h2 class="ga-title">Linked Google Ads Account:</h2>
86
  </div>
87
  <div class="col-6 col-md-6 col-lg-6 text-right">
88
  <div class="acc-num">
89
- <p class="ga-text"><?php echo (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '' ? $googleDetail->google_ads_id : '<span>Get started</span>');?></p>
90
  <?php
91
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
92
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg" alt="refresh"/></a></p>';
93
  } else {
94
- echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg" alt="connect account"/></a></p>';
95
  } ?>
96
  </div>
97
  </div>
@@ -100,35 +100,35 @@ class GAAConfiguration {
100
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') {?>
101
  <div class="row mb-3">
102
  <div class="col-6 col-md-4">
103
- <h2 class="ga-title">Sync Products:</h2>
104
  </div>
105
  <div class="col-6 col-md-4">
106
- <button id="tvc_btn_product_sync" type="button" class="btn btn-primary btn-success" data-toggle="modal" data-target="#syncProduct">Sync New Products</button>
107
  </div>
108
  </div>
109
  <div class="row mb-3">
110
  <div class="col-6 col-md-4">
111
- <h2 class="ga-title">Smart Shopping Campaigns:</h2>
112
  </div>
113
  <div class="col-6 col-md-6">
114
- <a href="admin.php?page=conversios-google-shopping-feed&tab=add_campaign_page" class="btn btn-primary btn-success">Create Smart Shopping Campaign</a>
115
  </div>
116
  </div>
117
  <?php }else{ ?>
118
  <div class="row mb-3">
119
  <div class="col-6 col-md-4">
120
- <h2 class="ga-title">Sync Products:</h2>
121
  </div>
122
- <div class="col-6 col-md-4">
123
- <button type="button" class="btn btn-primary btn-success" data-toggle="modal" data-target="#tvc_google_connect">Sync New Products</button>
124
  </div>
125
  </div>
126
  <div class="row mb-3">
127
  <div class="col-6 col-md-4">
128
- <h2 class="ga-title">Smart Shopping Campaigns:</h2>
129
  </div>
130
  <div class="col-6 col-md-6">
131
- <a href="#" class="btn btn-primary btn-success" data-toggle="modal" data-target="#tvc_google_connect">Create Smart Shopping Campaign</a>
132
  </div>
133
  </div>
134
  <?php } ?>
@@ -145,8 +145,6 @@ class GAAConfiguration {
145
  <?php
146
  // add product sync popup
147
  echo $this->TVCProductSyncHelper->tvc_product_sync_popup_html();
148
- //add connect popup
149
- echo get_connect_google_popup_html()
150
  ?>
151
  <?php
152
  $is_need_to_domain_claim = false;
@@ -156,7 +154,7 @@ if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merc
156
  <script type="text/javascript">
157
  $(document).ready(function() {
158
  $(document).on("click", "#tvc_btn_product_sync", function(event){
159
- var is_need_to_domain_claim = "<?php echo $is_need_to_domain_claim; ?>";
160
  if(is_need_to_domain_claim == 1 || is_need_to_domain_claim == true){
161
  event.preventDefault();
162
  jQuery.post(tvc_ajax_url,{
55
  <div class="col-md-6 col-lg-8 edit-section">
56
  <div class="edit-header-section">
57
  <script>
58
+ var back_img = '<img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'); ?>" alt="back"/>';
59
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
60
  </script>
61
  </div>
66
  <div class="google-account-analytics" id="gaa-config">
67
  <div class="row mb-3">
68
  <div class="col-6 col-md-6 col-lg-6">
69
+ <h2 class="ga-title"><?php _e("Connected Google Merchant center account:","conversios"); ?></h2>
70
  </div>
71
  <div class="col-6 col-md-6 col-lg-6 text-right">
72
  <div class="acc-num">
73
+ <p class="ga-text"><?php echo ((isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') ? $googleDetail->google_merchant_center_id : __('<span>Get started</span>','conversios')); ?></p>
74
  <?php
75
  if(isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != ''){
76
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'.esc_url( ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
77
  }else{
78
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
79
  }?>
80
  </div>
81
  </div>
82
  </div>
83
  <div class="row mb-3">
84
  <div class="col-6 col-md-6 col-lg-6">
85
+ <h2 class="ga-title"><?php _e("Linked Google Ads Account:","conversios"); ?></h2>
86
  </div>
87
  <div class="col-6 col-md-6 col-lg-6 text-right">
88
  <div class="acc-num">
89
+ <p class="ga-text"><?php echo (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '' ? $googleDetail->google_ads_id : __('<span>Get started</span>','conversios'));?></p>
90
  <?php
91
  if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != '') {
92
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/refresh.svg').'" alt="refresh"/></a></p>';
93
  } else {
94
+ echo '<p class="ga-text text-right"><a href="' . $this->url . '" class="text-underline"><img src="'. esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/add.svg').'" alt="connect account"/></a></p>';
95
  } ?>
96
  </div>
97
  </div>
100
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != '') {?>
101
  <div class="row mb-3">
102
  <div class="col-6 col-md-4">
103
+ <h2 class="ga-title"><?php _e("Sync Products:","conversios"); ?></h2>
104
  </div>
105
  <div class="col-6 col-md-4">
106
+ <button id="tvc_btn_product_sync" type="button" class="btn btn-primary btn-success" data-toggle="modal" data-target="#syncProduct"><?php _e("Sync New Products","conversios"); ?></button>
107
  </div>
108
  </div>
109
  <div class="row mb-3">
110
  <div class="col-6 col-md-4">
111
+ <h2 class="ga-title"><?php _e("Smart Shopping Campaigns:","conversios"); ?></h2>
112
  </div>
113
  <div class="col-6 col-md-6">
114
+ <a href="admin.php?page=conversios-google-shopping-feed&tab=add_campaign_page" class="btn btn-primary btn-success"><?php _e("Create Smart Shopping Campaign","conversios"); ?></a>
115
  </div>
116
  </div>
117
  <?php }else{ ?>
118
  <div class="row mb-3">
119
  <div class="col-6 col-md-4">
120
+ <h2 class="ga-title"><?php _e("Sync Products:","conversios"); ?></h2>
121
  </div>
122
+ <div class="col-6 col-md-4">
123
+ <a href="<?php echo $this->url; ?>" class="btn btn-primary btn-success"><?php _e("Sync New Products","conversios"); ?></a>
124
  </div>
125
  </div>
126
  <div class="row mb-3">
127
  <div class="col-6 col-md-4">
128
+ <h2 class="ga-title"><?php _e("Smart Shopping Campaigns:","conversios"); ?></h2>
129
  </div>
130
  <div class="col-6 col-md-6">
131
+ <a href="<?php echo $this->url; ?>" class="btn btn-primary btn-success"><?php _e("Create Smart Shopping Campaign","conversios"); ?></a>
132
  </div>
133
  </div>
134
  <?php } ?>
145
  <?php
146
  // add product sync popup
147
  echo $this->TVCProductSyncHelper->tvc_product_sync_popup_html();
 
 
148
  ?>
149
  <?php
150
  $is_need_to_domain_claim = false;
154
  <script type="text/javascript">
155
  $(document).ready(function() {
156
  $(document).on("click", "#tvc_btn_product_sync", function(event){
157
+ var is_need_to_domain_claim = "<?php echo esc_attr($is_need_to_domain_claim); ?>";
158
  if(is_need_to_domain_claim == 1 || is_need_to_domain_claim == true){
159
  event.preventDefault();
160
  jQuery.post(tvc_ajax_url,{
includes/setup/google-shopping-feed-shopping-campaigns.php CHANGED
@@ -56,10 +56,12 @@ class CampaignsConfiguration
56
  }
57
  }
58
 
59
- $date_range_type = isset($_POST['customRadio']) ? $_POST['customRadio'] : 1;
60
- $days = (isset($_POST['days']) && $_POST['days'] != '') ? $_POST['days'] : 7;
61
  $from_date = (isset($_POST['from_date']) && $_POST['from_date'] != '') ? $_POST['from_date'] : "";
62
  $to_date = (isset($_POST['to_date']) && $_POST['to_date'] != '') ? $_POST['to_date'] : "";
 
 
63
  $campaigns_list = [];
64
  $categories = [];
65
  $campaign_performance = [];
@@ -97,23 +99,23 @@ class CampaignsConfiguration
97
  // Count account performance
98
  if (!empty($account_performance->dailyConversions)) {
99
  foreach($account_performance->dailyConversions as $key => $dailyConversion){
100
- $totalConversion = $totalConversion + $dailyConversion->conversions;
101
  }
102
  }
103
  if (!empty($account_performance->dailySales)) {
104
  foreach ($account_performance->dailySales as $key => $dailySale) {
105
- $totalSale = $totalSale + $dailySale->sales;
106
  }
107
  }
108
  if (!empty($account_performance->dailyCost)) {
109
  foreach ($account_performance->dailyCost as $key => $dailyCostData) {
110
- $totalCost = $totalCost + $dailyCostData->costs;
111
  }
112
  }
113
 
114
  if (!empty($account_performance->dailyClicks)) {
115
  foreach ($account_performance->dailyClicks as $key => $dailyClick) {
116
- $totalClick = $totalClick + $dailyClick->clicks;
117
  }
118
  }
119
  //Campaign Performance
@@ -153,7 +155,7 @@ class CampaignsConfiguration
153
  }
154
  $plan_id = 1;
155
  if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
156
- $plan_id = $googleDetail->plan_id;
157
  }
158
  ?>
159
  <div class="tab-content">
@@ -164,7 +166,7 @@ class CampaignsConfiguration
164
  <div class="edit-section">
165
  <div class="edit-header-section">
166
  <script>
167
- var back_img = '<img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'; ?>" alt="back"/>';
168
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
169
  </script>
170
  </div>
@@ -180,18 +182,18 @@ class CampaignsConfiguration
180
  <input type="hidden" id="customRange2" name="customRadio" value="2" class="custom-control-input" checked="checked">
181
  <div class="campaigns">
182
  <div class="d-flex justify-content-between align-items-center">
183
- <h3 class="title mb-0">Smart Shopping Campaigns</h3>
184
  <div class="campaing-date">
185
  <div class="input-group input-daterange">
186
  <input type="text" class="form-control" id="from_date" name="from_date" value="<?php echo $this->from_date; ?>">
187
  <div class="input-group-addon text px-3">to</div>
188
  <input type="text" class="form-control" id="to_date" name="to_date" value="<?php echo $this->to_date; ?>">
189
- <label class="mt-2 mb-2 error-msg float-left hidden" id="errorMessage">Please select both from and to date</label>
190
  </div>
191
  </div>
192
  <div class="create-campaign-btn">
193
- <button type="button" class="btn btn-outline-primary" onclick="validateAll()" id="select_range" name="select_range">Submit</button>
194
- <a href="<?php echo $this->site_url.'add_campaign_page';?>" class="btn btn-outline-primary">Create a New Campaign</a>
195
  </div>
196
  </div>
197
  </div>
@@ -199,29 +201,29 @@ class CampaignsConfiguration
199
  <div class="account-performance">
200
  <div class="row">
201
  <div class="col-md-12">
202
- <h3 class="title">Account Performance</h3>
203
  </div>
204
  <div class="col-md-6 col-lg-3">
205
  <div class="chart">
206
- <h4 class="sub-title">Daily Clicks</h4>
207
  <canvas id="dailyClick" width="240" height="180"></canvas>
208
  </div>
209
  </div>
210
  <div class="col-md-6 col-lg-3">
211
  <div class="chart">
212
- <h4 class="sub-title">Daily Cost</h4>
213
  <canvas id="dailyCost" width="240" height="180"></canvas>
214
  </div>
215
  </div>
216
  <div class="col-md-6 col-lg-3">
217
  <div class="chart">
218
- <h4 class="sub-title">Daily Conversions</h4>
219
  <canvas id="dailyConversions" width="240" height="180"></canvas>
220
  </div>
221
  </div>
222
  <div class="col-md-6 col-lg-3">
223
  <div class="chart">
224
- <h4 class="sub-title">Daily Sales</h4>
225
  <canvas id="dailySales" width="240" height="180"></canvas>
226
  </div>
227
  </div>
@@ -231,19 +233,19 @@ class CampaignsConfiguration
231
  <div class="account-performance">
232
  <div class="row">
233
  <div class="col-lg-8">
234
- <h3 class="title">Campaign Performance</h3>
235
  <div class="table-section">
236
  <table id="campaingPerformance" class="table dt-responsive nowrap" style="width:100%">
237
  <thead>
238
  <tr>
239
  <th>Campaign</th>
240
- <th width="100">Daily Budget</th>
241
- <th class="text-center">Active</th>
242
- <th class="text-center">Clicks</th>
243
- <th class="text-center">Cost</th>
244
- <th class="text-center">Conversions</th>
245
- <th class="text-center">Sales</th>
246
- <th class="text-center">Action</th>
247
  </tr>
248
  </thead>
249
  <tbody>
@@ -253,20 +255,20 @@ class CampaignsConfiguration
253
  $checked = $campaign_performance[$i]->active == 0 ? '' : 'checked';
254
  if ($campaign_performance[$i]->active != 2) {?>
255
  <tr>
256
- <td><a href="<?php echo $this->site_url.'shopping_campaigns_page&id='.$campaign_performance[$i]->compaignId; ?>" class="text-underline"><?php echo $campaign_performance[$i]->compaignName; ?></a></td>
257
- <td><?php echo $this->currency_symbol.$campaign_performance[$i]->dailyBudget; ?></td>
258
  <td class="text-center">
259
  <div class="custom-control custom-switch">
260
- <input type="checkbox" class="custom-control-input" id="customSwitch<?php echo $i; ?>" <?php echo $checked; ?> onchange="updateCampaignStatus('<?php echo $this->merchantId; ?>','<?php echo $this->currentCustomerId; ?>','<?php echo $campaign_performance[$i]->compaignId; ?>','<?php echo $campaign_performance[$i]->dailyBudget; ?>','<?php echo $campaign_performance[$i]->budgetId; ?>','<?php echo$i; ?>')">
261
  <label class="custom-control-label" for="customSwitch<?php echo $i; ?>"></label>
262
  </div>
263
  </td>
264
- <td class="text-center"><?php echo $campaign_performance[$i]->clicks; ?></td>
265
- <td class="text-center"><?php echo $campaign_performance[$i]->cost; ?></td>
266
- <td class="text-center"><?php echo $campaign_performance[$i]->conversions; ?></td>
267
- <td class="text-center"><?php echo $campaign_performance[$i]->sales; ?></td>
268
- <input type="hidden" value="<?php echo $campaign_performance[$i]->compaignName; ?>" id="campaign_name_<?php echo $i; ?>" />
269
- <td><a href="<?php echo $this->site_url.'add_campaign_page&edit='.$campaign_performance[$i]->compaignId; ?>">Edit</a> | <a href="#" onclick="deleteCampaign('<?php echo $this->merchantId; ?>','<?php echo $this->currentCustomerId; ?>','<?php echo $campaign_performance[$i]->compaignId; ?>','<?php echo $i; ?>')">Delete</a></td>
270
  </tr>
271
  <?php
272
  }
@@ -281,15 +283,15 @@ class CampaignsConfiguration
281
  <div class="card">
282
  <div class="card-body">
283
  <div class="account-img">
284
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/undraw_update_uxn2.svg'; ?>" alt=""/>
285
  </div>
286
  <div class="pro-content">
287
  <h3 class="userName">Hello <?php echo get_bloginfo(); ?>!</h3>
288
- <p>Explore <a target="_blank" href="<?php echo $this->TVC_Admin_Helper->get_pro_plan_site(); ?>" class="font-weight-bold">Pro account</a> with Premium features.</p>
289
  </div>
290
  </div>
291
  <div class="card-footer">
292
- <a target="_blank" href="<?php echo $this->TVC_Admin_Helper->get_pro_plan_site().'pricings'; ?>"><button class="btn btn-primary">Learn more</button></a>
293
  </div>
294
  </div>
295
  </div>
@@ -302,28 +304,28 @@ class CampaignsConfiguration
302
  <div class="account-performance">
303
  <div class="row">
304
  <div class="col-lg-6">
305
- <h3 class="title">Product Performance :</h3>
306
  <div class="table-section">
307
  <table id="productPerformance" class="table dt-responsive nowrap" style="width:100%">
308
  <thead>
309
  <tr>
310
  <th></th>
311
- <th>Product</th>
312
- <th class="text-center">Clicks</th>
313
- <th class="text-center">Cost</th>
314
- <th class="text-center">Conversions</th>
315
- <th class="text-center">Sales</th>
316
  </tr>
317
  </thead>
318
  <tbody>
319
  <?php for ($i = 0; $i < count($product_performance); $i++) { ?>
320
  <tr>
321
- <td class="product-image"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/sneaker.jpg'; ?>" alt=""/></td>
322
- <td><?php echo $product_performance[$i]->product; ?></td>
323
- <td class="text-center"><?php echo $product_performance[$i]->clicks; ?></td>
324
- <td class="text-center"><?php echo $product_performance[$i]->cost; ?></td>
325
- <td class="text-center"><?php echo $product_performance[$i]->conversions; ?></td>
326
- <td class="text-center"><?php echo $product_performance[$i]->sales; ?></td>
327
  </tr>
328
  <?php } ?>
329
  </tbody>
@@ -335,30 +337,30 @@ class CampaignsConfiguration
335
  <div class="account-performance">
336
  <div class="row">
337
  <div class="col-lg-6">
338
- <h3 class="title">Product Partition Performance</h3>
339
  <div class="table-section">
340
  <table id="productPerformance" class="table dt-responsive nowrap" style="width:100%">
341
  <thead>
342
  <tr>
343
- <th>Campaign</th>
344
- <th class="text-center">Product Dimension</th>
345
- <th class="text-center">Product Dimension Value</th>
346
- <th class="text-center">Clicks</th>
347
- <th class="text-center">Cost</th>
348
- <th class="text-center">Conversions</th>
349
- <th class="text-center">Sales</th>
350
  </tr>
351
  </thead>
352
  <tbody>
353
  <?php for ($i = 0; $i < count($product_partition_performance); $i++) { ?>
354
  <tr>
355
- <td><a href="" class="text-underline"><?php echo $product_partition_performance[$i]->compaignName; ?></a></td>
356
- <td class="text-center"><?php echo $product_partition_performance[$i]->productDimention; ?></td>
357
- <td class="text-center"><?php echo $product_partition_performance[$i]->productDimentionValue; ?></td>
358
- <td class="text-center"><?php echo $product_partition_performance[$i]->clicks; ?></td>
359
- <td class="text-center"><?php echo $product_partition_performance[$i]->cost; ?></td>
360
- <td class="text-center"><?php echo $product_partition_performance[$i]->conversions; ?></td>
361
- <td class="text-center"><?php echo $product_partition_performance[$i]->sales; ?></td>
362
  </tr>
363
  <?php } ?>
364
  </tbody>
@@ -378,7 +380,7 @@ class CampaignsConfiguration
378
  </div>
379
  <script type="text/javascript">
380
  $(document).ready(function() {
381
- $(".select2").select2();
382
  });
383
 
384
  var ctx = document.getElementById('dailyClick').getContext('2d');
@@ -483,8 +485,8 @@ class CampaignsConfiguration
483
  var values = [];
484
  if(dailyClicksData.length > 0 ){
485
  dailyConversionsData.forEach(conversionsData => {
486
- labels.push(conversionsData.date);
487
- values.push(conversionsData.conversions);
488
  })
489
  }
490
 
@@ -642,7 +644,7 @@ class CampaignsConfiguration
642
  },
643
  function( response ) {
644
  jQuery("#feed-spinner").css("display", "none");
645
- console.log(response);
646
  var rsp = JSON.parse(response)
647
  if (rsp.status == "success") {
648
  var message = campaign_name + " is deleted successfully";
@@ -650,7 +652,7 @@ class CampaignsConfiguration
650
  window.location.href = "<?php echo $this->site_url.'shopping_campaigns_page';?>";
651
  } else {
652
  var message = rsp.message;
653
- alert(message);
654
  }
655
  }
656
  );
@@ -675,7 +677,7 @@ class CampaignsConfiguration
675
  },
676
  function( response ) {
677
  jQuery("#feed-spinner").css("display", "none");
678
- console.log(response);
679
  var rsp = JSON.parse(response)
680
  if(rsp.status == "success"){
681
  var message = campaign_name + " status updated successfully";
56
  }
57
  }
58
 
59
+ $date_range_type = sanitize_text_field((isset($_POST['customRadio'])) ? $_POST['customRadio'] : 1);
60
+ $days = sanitize_text_field((isset($_POST['days']) && $_POST['days'] != '') ? $_POST['days'] : 7);
61
  $from_date = (isset($_POST['from_date']) && $_POST['from_date'] != '') ? $_POST['from_date'] : "";
62
  $to_date = (isset($_POST['to_date']) && $_POST['to_date'] != '') ? $_POST['to_date'] : "";
63
+ $from_date = sanitize_text_field($from_date);
64
+ $to_date = sanitize_text_field($to_date);
65
  $campaigns_list = [];
66
  $categories = [];
67
  $campaign_performance = [];
99
  // Count account performance
100
  if (!empty($account_performance->dailyConversions)) {
101
  foreach($account_performance->dailyConversions as $key => $dailyConversion){
102
+ $totalConversion = $totalConversion + esc_attr($dailyConversion->conversions);
103
  }
104
  }
105
  if (!empty($account_performance->dailySales)) {
106
  foreach ($account_performance->dailySales as $key => $dailySale) {
107
+ $totalSale = $totalSale + esc_attr($dailySale->sales);
108
  }
109
  }
110
  if (!empty($account_performance->dailyCost)) {
111
  foreach ($account_performance->dailyCost as $key => $dailyCostData) {
112
+ $totalCost = $totalCost + esc_attr($dailyCostData->costs);
113
  }
114
  }
115
 
116
  if (!empty($account_performance->dailyClicks)) {
117
  foreach ($account_performance->dailyClicks as $key => $dailyClick) {
118
+ $totalClick = $totalClick + esc_attr($dailyClick->clicks);
119
  }
120
  }
121
  //Campaign Performance
155
  }
156
  $plan_id = 1;
157
  if(isset($googleDetail->plan_id) && !in_array($googleDetail->plan_id, array("1"))){
158
+ $plan_id = esc_attr($googleDetail->plan_id);
159
  }
160
  ?>
161
  <div class="tab-content">
166
  <div class="edit-section">
167
  <div class="edit-header-section">
168
  <script>
169
+ var back_img = '<img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'); ?>" alt="back"/>';
170
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
171
  </script>
172
  </div>
182
  <input type="hidden" id="customRange2" name="customRadio" value="2" class="custom-control-input" checked="checked">
183
  <div class="campaigns">
184
  <div class="d-flex justify-content-between align-items-center">
185
+ <h3 class="title mb-0"><?php _e("Smart Shopping Campaigns","conversios"); ?></h3>
186
  <div class="campaing-date">
187
  <div class="input-group input-daterange">
188
  <input type="text" class="form-control" id="from_date" name="from_date" value="<?php echo $this->from_date; ?>">
189
  <div class="input-group-addon text px-3">to</div>
190
  <input type="text" class="form-control" id="to_date" name="to_date" value="<?php echo $this->to_date; ?>">
191
+ <label class="mt-2 mb-2 error-msg float-left hidden" id="errorMessage"><?php _e("Please select both from and to date","conversios"); ?></label>
192
  </div>
193
  </div>
194
  <div class="create-campaign-btn">
195
+ <button type="button" class="btn btn-outline-primary" onclick="validateAll()" id="select_range" name="select_range"><?php _e("Submit","conversios"); ?></button>
196
+ <a href="<?php echo $this->site_url.'add_campaign_page';?>" class="btn btn-outline-primary"><?php _e("Create a New Campaign","conversios"); ?></a>
197
  </div>
198
  </div>
199
  </div>
201
  <div class="account-performance">
202
  <div class="row">
203
  <div class="col-md-12">
204
+ <h3 class="title"><?php _e("Account Performance","conversios"); ?></h3>
205
  </div>
206
  <div class="col-md-6 col-lg-3">
207
  <div class="chart">
208
+ <h4 class="sub-title"><?php _e("Daily Clicks","conversios"); ?></h4>
209
  <canvas id="dailyClick" width="240" height="180"></canvas>
210
  </div>
211
  </div>
212
  <div class="col-md-6 col-lg-3">
213
  <div class="chart">
214
+ <h4 class="sub-title"><?php _e("Daily Cost","conversios"); ?></h4>
215
  <canvas id="dailyCost" width="240" height="180"></canvas>
216
  </div>
217
  </div>
218
  <div class="col-md-6 col-lg-3">
219
  <div class="chart">
220
+ <h4 class="sub-title"><?php _e("Daily Conversions","conversios"); ?></h4>
221
  <canvas id="dailyConversions" width="240" height="180"></canvas>
222
  </div>
223
  </div>
224
  <div class="col-md-6 col-lg-3">
225
  <div class="chart">
226
+ <h4 class="sub-title"><?php _e("Daily Sales","conversios"); ?></h4>
227
  <canvas id="dailySales" width="240" height="180"></canvas>
228
  </div>
229
  </div>
233
  <div class="account-performance">
234
  <div class="row">
235
  <div class="col-lg-8">
236
+ <h3 class="title"><?php _e("Campaign Performance","conversios"); ?></h3>
237
  <div class="table-section">
238
  <table id="campaingPerformance" class="table dt-responsive nowrap" style="width:100%">
239
  <thead>
240
  <tr>
241
  <th>Campaign</th>
242
+ <th width="100"><?php _e("Daily Budget","conversios"); ?></th>
243
+ <th class="text-center"><?php _e("Active","conversios"); ?></th>
244
+ <th class="text-center"><?php _e("Clicks","conversios"); ?></th>
245
+ <th class="text-center"><?php _e("Cost","conversios"); ?></th>
246
+ <th class="text-center"><?php _e("Conversions","conversios"); ?></th>
247
+ <th class="text-center"><?php _e("Sales","conversios"); ?></th>
248
+ <th class="text-center"><?php _e("Action","conversios"); ?></th>
249
  </tr>
250
  </thead>
251
  <tbody>
255
  $checked = $campaign_performance[$i]->active == 0 ? '' : 'checked';
256
  if ($campaign_performance[$i]->active != 2) {?>
257
  <tr>
258
+ <td><a href="<?php echo $this->site_url.'shopping_campaigns_page&id='.$campaign_performance[$i]->compaignId; ?>" class="text-underline"><?php echo esc_attr($campaign_performance[$i]->compaignName); ?></a></td>
259
+ <td><?php echo esc_attr($this->currency_symbol.$campaign_performance[$i]->dailyBudget); ?></td>
260
  <td class="text-center">
261
  <div class="custom-control custom-switch">
262
+ <input type="checkbox" class="custom-control-input" id="customSwitch<?php echo $i; ?>" <?php echo $checked; ?> onchange="updateCampaignStatus('<?php echo esc_attr($this->merchantId); ?>','<?php echo esc_attr($this->currentCustomerId); ?>','<?php echo esc_attr($campaign_performance[$i]->compaignId); ?>','<?php echo esc_attr($campaign_performance[$i]->dailyBudget); ?>','<?php echo esc_attr($campaign_performance[$i]->budgetId); ?>','<?php echo $i; ?>')">
263
  <label class="custom-control-label" for="customSwitch<?php echo $i; ?>"></label>
264
  </div>
265
  </td>
266
+ <td class="text-center"><?php echo esc_attr($campaign_performance[$i]->clicks); ?></td>
267
+ <td class="text-center"><?php echo esc_attr($campaign_performance[$i]->cost); ?></td>
268
+ <td class="text-center"><?php echo esc_attr($campaign_performance[$i]->conversions); ?></td>
269
+ <td class="text-center"><?php echo esc_attr($campaign_performance[$i]->sales); ?></td>
270
+ <input type="hidden" value="<?php echo esc_attr($campaign_performance[$i]->compaignName); ?>" id="campaign_name_<?php echo $i; ?>" />
271
+ <td><a href="<?php echo esc_url($this->site_url.'add_campaign_page&edit='.$campaign_performance[$i]->compaignId); ?>"><?php _e("Edit","conversios"); ?></a> | <a href="#" onclick="deleteCampaign('<?php echo $this->merchantId; ?>','<?php echo esc_attr($this->currentCustomerId); ?>','<?php echo esc_attr($campaign_performance[$i]->compaignId); ?>','<?php echo $i; ?>')"><?php _e("Delete","conversios"); ?></a></td>
272
  </tr>
273
  <?php
274
  }
283
  <div class="card">
284
  <div class="card-body">
285
  <div class="account-img">
286
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/undraw_update_uxn2.svg'); ?>" alt=""/>
287
  </div>
288
  <div class="pro-content">
289
  <h3 class="userName">Hello <?php echo get_bloginfo(); ?>!</h3>
290
+ <p>Explore <a target="_blank" href="<?php echo esc_url($this->TVC_Admin_Helper->get_pro_plan_site()); ?>" class="font-weight-bold"><?php _e("Pro account","conversios"); ?></a> <?php _e("with Premium features.","conversios"); ?></p>
291
  </div>
292
  </div>
293
  <div class="card-footer">
294
+ <a target="_blank" href="<?php echo esc_url($this->TVC_Admin_Helper->get_pro_plan_site().'pricings'); ?>"><button class="btn btn-primary"><?php _e("Learn more","conversios"); ?></button></a>
295
  </div>
296
  </div>
297
  </div>
304
  <div class="account-performance">
305
  <div class="row">
306
  <div class="col-lg-6">
307
+ <h3 class="title"><?php _e("Product Performance :","conversios"); ?></h3>
308
  <div class="table-section">
309
  <table id="productPerformance" class="table dt-responsive nowrap" style="width:100%">
310
  <thead>
311
  <tr>
312
  <th></th>
313
+ <th><?php _e("Product","conversios"); ?></th>
314
+ <th class="text-center"><?php _e("Clicks","conversios"); ?></th>
315
+ <th class="text-center"><?php _e("Cost","conversios"); ?></th>
316
+ <th class="text-center"><?php _e("Conversions","conversios"); ?></th>
317
+ <th class="text-center"><?php _e("Sales","conversios"); ?></th>
318
  </tr>
319
  </thead>
320
  <tbody>
321
  <?php for ($i = 0; $i < count($product_performance); $i++) { ?>
322
  <tr>
323
+ <td class="product-image"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/sneaker.jpg'); ?>" alt=""/></td>
324
+ <td><?php echo esc_attr($product_performance[$i]->product); ?></td>
325
+ <td class="text-center"><?php echo esc_attr($product_performance[$i]->clicks); ?></td>
326
+ <td class="text-center"><?php echo esc_attr($product_performance[$i]->cost); ?></td>
327
+ <td class="text-center"><?php echo esc_attr($product_performance[$i]->conversions); ?></td>
328
+ <td class="text-center"><?php echo esc_attr($product_performance[$i]->sales); ?></td>
329
  </tr>
330
  <?php } ?>
331
  </tbody>
337
  <div class="account-performance">
338
  <div class="row">
339
  <div class="col-lg-6">
340
+ <h3 class="title"><?php _e("Product Partition Performance","conversios"); ?></h3>
341
  <div class="table-section">
342
  <table id="productPerformance" class="table dt-responsive nowrap" style="width:100%">
343
  <thead>
344
  <tr>
345
+ <th><?php _e("Campaign","conversios"); ?></th>
346
+ <th class="text-center"><?php _e("Product Dimension","conversios"); ?></th>
347
+ <th class="text-center"><?php _e("Product Dimension Value","conversios"); ?></th>
348
+ <th class="text-center"><?php _e("Clicks","conversios"); ?></th>
349
+ <th class="text-center"><?php _e("Cost","conversios"); ?></th>
350
+ <th class="text-center"><?php _e("Conversions","conversios"); ?></th>
351
+ <th class="text-center"><?php _e("Sales","conversios"); ?></th>
352
  </tr>
353
  </thead>
354
  <tbody>
355
  <?php for ($i = 0; $i < count($product_partition_performance); $i++) { ?>
356
  <tr>
357
+ <td><a href="" class="text-underline"><?php echo esc_attr($product_partition_performance[$i]->compaignName); ?></a></td>
358
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->productDimention); ?></td>
359
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->productDimentionValue); ?></td>
360
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->clicks); ?></td>
361
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->cost); ?></td>
362
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->conversions); ?></td>
363
+ <td class="text-center"><?php echo esc_attr($product_partition_performance[$i]->sales); ?></td>
364
  </tr>
365
  <?php } ?>
366
  </tbody>
380
  </div>
381
  <script type="text/javascript">
382
  $(document).ready(function() {
383
+ $(".select2").select2();
384
  });
385
 
386
  var ctx = document.getElementById('dailyClick').getContext('2d');
485
  var values = [];
486
  if(dailyClicksData.length > 0 ){
487
  dailyConversionsData.forEach(conversionsData => {
488
+ labels.push(conversionsData.date);
489
+ values.push(conversionsData.conversions);
490
  })
491
  }
492
 
644
  },
645
  function( response ) {
646
  jQuery("#feed-spinner").css("display", "none");
647
+ //console.log(response);
648
  var rsp = JSON.parse(response)
649
  if (rsp.status == "success") {
650
  var message = campaign_name + " is deleted successfully";
652
  window.location.href = "<?php echo $this->site_url.'shopping_campaigns_page';?>";
653
  } else {
654
  var message = rsp.message;
655
+ alert(message);
656
  }
657
  }
658
  );
677
  },
678
  function( response ) {
679
  jQuery("#feed-spinner").css("display", "none");
680
+ //console.log(response);
681
  var rsp = JSON.parse(response)
682
  if(rsp.status == "success"){
683
  var message = campaign_name + " status updated successfully";
includes/setup/google-shopping-feed-sync-product.php CHANGED
@@ -30,13 +30,13 @@ public function create_form(){
30
  if(isset($_GET['welcome_msg']) && $_GET['welcome_msg'] == true){
31
  $this->TVC_Admin_Helper->call_domain_claim();
32
  $class = 'notice notice-success';
33
- $message = esc_html__('Everthing is now set up. One more step - Sync your WooCommerce products into your Merchant Center and reach out to millions of shopper across Google.');
34
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
35
  ?>
36
  <script>
37
  $(document).ready(function() {
38
  var msg="<?php echo $message;?>"
39
- tvc_helper.tvc_alert("success","Congratulation..!",msg,true);
40
  });
41
  </script>
42
  <?php
@@ -79,7 +79,7 @@ public function create_form(){
79
  <div class="col-md-6 col-lg-8 edit-section">
80
  <div class="edit-header-section">
81
  <script>
82
- var back_img = '<img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'; ?>" alt="back"/>';
83
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
84
  </script>
85
  </div>
@@ -88,10 +88,10 @@ public function create_form(){
88
  <div class="tvc-api-sunc">
89
  <span>
90
  <?php if($last_api_sync_up){
91
- echo "Details last synced at ".$last_api_sync_up;
92
  }else{
93
  echo "Refresh sync up";
94
- }?></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'; ?>">
95
  </div>
96
  <?php } ?>
97
  <?php echo get_google_shopping_tabs_html($this->site_url,(isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:""); ?>
@@ -101,50 +101,50 @@ public function create_form(){
101
  <div class="row">
102
  <div class="col-12">
103
  <div class="d-flex justify-content-between ">
104
- <p class="mb-0 align-self-center product-title">Products in your Merchant Center account</p>
105
- <button id="tvc_btn_product_sync" class="btn btn-outline-primary align-self-center" data-toggle="modal" data-target="#syncProduct">Sync New Products</button>
106
  </div>
107
  </div>
108
  </div>
109
  <?php
110
- $sync_product_total = (property_exists($syncProductStat,"total")) ? $syncProductStat->total : "0";
111
- $sync_product_approved = (property_exists($syncProductStat,"approved")) ? $syncProductStat->approved : "0";
112
- $sync_product_disapproved = (property_exists($syncProductStat,"disapproved")) ? $syncProductStat->disapproved : "0";
113
- $sync_product_pending = (property_exists($syncProductStat,"pending")) ? $syncProductStat->pending : "0"; ?>
114
  <div class="product-card">
115
  <div class="row row-cols-5">
116
  <div class="col">
117
  <div class="card">
118
  <h3 class="pro-count"><?php
119
- echo (($woo_product) ? $woo_product : "0"); ?></h3>
120
- <p class="pro-title">Total Products</p>
121
  </div>
122
  </div>
123
  <div class="col">
124
  <div class="card">
125
  <h3 class="pro-count"><?php
126
  echo $sync_product_total ; ?></h3>
127
- <p class="pro-title">Sync Products</p>
128
  </div>
129
  </div>
130
  <div class="col">
131
  <div class="card pending">
132
  <h3 class="pro-count">
133
  <?php echo $sync_product_pending;?></h3>
134
- <p class="pro-title">Pending Review</p>
135
  </div>
136
  </div>
137
  <div class="col">
138
  <div class="card approved">
139
  <h3 class="pro-count"><?php echo $sync_product_approved;?></h3>
140
- <p class="pro-title">Approved</p>
141
  </div>
142
  </div>
143
  <div class="col">
144
  <div class="card disapproved">
145
  <h3 class="pro-count"><?php
146
  echo $sync_product_disapproved; ?></h3>
147
- <p class="pro-title">Disapproved</p>
148
  </div>
149
  </div>
150
  </div>
@@ -157,9 +157,9 @@ public function create_form(){
157
  <thead>
158
  <tr>
159
  <th></th>
160
- <th style="vertical-align: top;">Product</th>
161
- <th style="vertical-align: top;">Google status</th>
162
- <th style="vertical-align: top;">Issues</th>
163
  </tr>
164
  </thead>
165
  <tbody>
@@ -167,9 +167,9 @@ public function create_form(){
167
  if (isset($syncProductList) && count($syncProductList) > 0) {
168
  foreach ($syncProductList as $skey => $sValue) {
169
  echo '<tr><td class="product-image">
170
- <img src="'.$sValue->image_link.'" alt=""/></td>
171
- <td>'.$sValue->name.'</td>
172
- <td>'.$sValue->google_status.'</td>
173
  <td>';
174
  $p_issues = json_decode($sValue->issues);
175
  if (count($p_issues) > 0) {
@@ -180,14 +180,14 @@ public function create_form(){
180
  }
181
  ($key == 3) ? $str .= "..." : "";
182
  }
183
- echo $str;
184
  } else {
185
  echo "---";
186
  }
187
  echo '</td></tr>';
188
  }
189
  }else{
190
- echo '<tr><td colspan="4">Record not found</td></tr>';
191
  } ?>
192
  </tbody>
193
  </table>
@@ -245,7 +245,7 @@ function call_tvc_api_sync_up(){
245
  $("#tvc_msg").remove();
246
  $("#refresh_api").css("visibility","hidden");
247
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
248
- tvc_helper.tvc_alert("error","Attention !","Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.");
249
  jQuery.post(tvc_ajax_url,{
250
  action: "tvc_call_api_sync"
251
  },function( response ){
30
  if(isset($_GET['welcome_msg']) && $_GET['welcome_msg'] == true){
31
  $this->TVC_Admin_Helper->call_domain_claim();
32
  $class = 'notice notice-success';
33
+ $message = esc_html__("Everthing is now set up. One more step - Sync your WooCommerce products into your Merchant Center and reach out to millions of shopper across Google.","conversios");
34
  printf('<div class="%1$s"><p>%2$s</p></div>', esc_attr($class), esc_html($message));
35
  ?>
36
  <script>
37
  $(document).ready(function() {
38
  var msg="<?php echo $message;?>"
39
+ tvc_helper.tvc_alert("success", "<?php _e("Congratulation..!","conversios"); ?>", msg, true);
40
  });
41
  </script>
42
  <?php
79
  <div class="col-md-6 col-lg-8 edit-section">
80
  <div class="edit-header-section">
81
  <script>
82
+ var back_img = '<img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/left-angle-arrow.svg'); ?>" alt="back"/>';
83
  document.write('<a href="' + document.referrer + '" class="back-btn">'+back_img+'<span>Back</span></a>');
84
  </script>
85
  </div>
88
  <div class="tvc-api-sunc">
89
  <span>
90
  <?php if($last_api_sync_up){
91
+ echo __("Details last synced at","conversios").$last_api_sync_up;
92
  }else{
93
  echo "Refresh sync up";
94
+ }?></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'); ?>">
95
  </div>
96
  <?php } ?>
97
  <?php echo get_google_shopping_tabs_html($this->site_url,(isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:""); ?>
101
  <div class="row">
102
  <div class="col-12">
103
  <div class="d-flex justify-content-between ">
104
+ <p class="mb-0 align-self-center product-title"><?php _e("Products in your Merchant Center account","conversios"); ?></p>
105
+ <button id="tvc_btn_product_sync" class="btn btn-outline-primary align-self-center" data-toggle="modal" data-target="#syncProduct"><?php _e("Sync New Products","conversios"); ?></button>
106
  </div>
107
  </div>
108
  </div>
109
  <?php
110
+ $sync_product_total = esc_attr((property_exists($syncProductStat,"total")) ? $syncProductStat->total : "0");
111
+ $sync_product_approved = esc_attr((property_exists($syncProductStat,"approved")) ? $syncProductStat->approved : "0");
112
+ $sync_product_disapproved = esc_attr((property_exists($syncProductStat,"disapproved")) ? $syncProductStat->disapproved : "0");
113
+ $sync_product_pending = esc_attr((property_exists($syncProductStat,"pending")) ? $syncProductStat->pending : "0"); ?>
114
  <div class="product-card">
115
  <div class="row row-cols-5">
116
  <div class="col">
117
  <div class="card">
118
  <h3 class="pro-count"><?php
119
+ echo esc_attr(($woo_product) ? $woo_product : "0"); ?></h3>
120
+ <p class="pro-title"><?php _e("Total Products","conversios"); ?></p>
121
  </div>
122
  </div>
123
  <div class="col">
124
  <div class="card">
125
  <h3 class="pro-count"><?php
126
  echo $sync_product_total ; ?></h3>
127
+ <p class="pro-title"><?php _e("Sync Products","conversios"); ?></p>
128
  </div>
129
  </div>
130
  <div class="col">
131
  <div class="card pending">
132
  <h3 class="pro-count">
133
  <?php echo $sync_product_pending;?></h3>
134
+ <p class="pro-title"><?php _e("Pending Review","conversios"); ?></p>
135
  </div>
136
  </div>
137
  <div class="col">
138
  <div class="card approved">
139
  <h3 class="pro-count"><?php echo $sync_product_approved;?></h3>
140
+ <p class="pro-title"><?php _e("Approved","conversios"); ?></p>
141
  </div>
142
  </div>
143
  <div class="col">
144
  <div class="card disapproved">
145
  <h3 class="pro-count"><?php
146
  echo $sync_product_disapproved; ?></h3>
147
+ <p class="pro-title"><?php _e("Disapproved","conversios"); ?></p>
148
  </div>
149
  </div>
150
  </div>
157
  <thead>
158
  <tr>
159
  <th></th>
160
+ <th style="vertical-align: top;"><?php _e("Product","conversios"); ?></th>
161
+ <th style="vertical-align: top;"><?php _e("Google status","conversios"); ?></th>
162
+ <th style="vertical-align: top;"><?php _e("Issues","conversios"); ?></th>
163
  </tr>
164
  </thead>
165
  <tbody>
167
  if (isset($syncProductList) && count($syncProductList) > 0) {
168
  foreach ($syncProductList as $skey => $sValue) {
169
  echo '<tr><td class="product-image">
170
+ <img src="'.esc_url($sValue->image_link).'" alt=""/></td>
171
+ <td>'.esc_attr($sValue->name).'</td>
172
+ <td>'.esc_attr($sValue->google_status).'</td>
173
  <td>';
174
  $p_issues = json_decode($sValue->issues);
175
  if (count($p_issues) > 0) {
180
  }
181
  ($key == 3) ? $str .= "..." : "";
182
  }
183
+ echo sanitize_text_field($str);
184
  } else {
185
  echo "---";
186
  }
187
  echo '</td></tr>';
188
  }
189
  }else{
190
+ echo '<tr><td colspan="4">'.__("Record not found","conversios").'</td></tr>';
191
  } ?>
192
  </tbody>
193
  </table>
245
  $("#tvc_msg").remove();
246
  $("#refresh_api").css("visibility","hidden");
247
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
248
+ tvc_helper.tvc_alert("error","<?php _e("Attention !","conversios"); ?>", "<?php _e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
249
  jQuery.post(tvc_ajax_url,{
250
  action: "tvc_call_api_sync"
251
  },function( response ){
includes/setup/google-shopping-feed.php CHANGED
@@ -17,7 +17,7 @@ class GoogleShoppingFeed {
17
  <span class="text">'.$title.'</span>
18
  </div>
19
  <div class="col-5 col-md-4 align-self-center text-right">
20
- <span class="text"><strong>'. $val.'</strong></span>
21
  </div>
22
  </div>
23
  </li>';
@@ -134,10 +134,10 @@ class GoogleShoppingFeed {
134
  <div class="tvc-api-sunc">
135
  <span>
136
  <?php if($last_api_sync_up){
137
- echo "Details last synced at ".$last_api_sync_up;
138
  }else{
139
- echo "Refresh sync up";
140
- }?></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'; ?>">
141
  </div>
142
  <?php } ?>
143
  <?php
@@ -151,12 +151,12 @@ class GoogleShoppingFeed {
151
  $next_sync = date($date_formate,strtotime($next_sync));
152
  ?>
153
  <div class="product-auto-sync-details">
154
- <strong>Last auto product sync details</strong>
155
  <table>
156
- <tr><th>Last sync</th><th>Sync product</th><th>Status</th><th>Upcoming sync</th></tr>
157
  <tr>
158
  <td><?php echo $create_sync;?></td>
159
- <td><?php echo (isset($last_auto_sync['total_sync_product']))?$last_auto_sync['total_sync_product']:"";?></td>
160
  <td><?php echo $status_text[$status]; ?></td>
161
  <td><?php echo $next_sync;?></td>
162
  </tr>
@@ -170,12 +170,12 @@ class GoogleShoppingFeed {
170
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
171
  <div class="card configure-card">
172
  <div class="card-header">
173
- <h4 class="confg-title">Configuration</h4>
174
  </div>
175
  <div class="card-body">
176
  <ul class="list-unstyled"><?php
177
- $is_domain_claim = (isset($googleDetail->is_domain_claim))?$googleDetail->is_domain_claim:"";
178
- $is_site_verified = (isset($googleDetail->is_site_verified))?$googleDetail->is_site_verified:"";
179
  echo $this->configuration_list_html("Google merchant center",(isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:"");
180
  if($is_site_verified ==1){
181
  echo $this->configuration_list_html("Site Verified",$is_site_verified);
@@ -192,30 +192,30 @@ class GoogleShoppingFeed {
192
  </ul>
193
  </div>
194
  <div class="card-footer">
195
- <a href="<?php echo $this->site_url.'gaa_config_page'; ?>" class="btn btn-primary" id="configuration">Edit</a>
196
  </div>
197
  </div>
198
  </div>
199
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
200
  <div class="card">
201
  <div class="card-header">
202
- <h4 class="confg-title">Product Sync</h4>
203
  </div>
204
  <div class="card-body">
205
  <ul class="list-unstyled">
206
  <?php
207
- echo $this->add_list_html("Active products in WooCommerce",$totalActiveWooProduct)
208
- .$this->add_list_html("Total synced products in Merchant center", $sync_product_total)
209
- .$this->add_list_html("Approved", $sync_product_approved)
210
- .$this->add_list_html("Disapproved", $sync_product_disapproved)
211
- .$this->add_list_html("Pending", $sync_product_pending);
212
  ?>
213
  </ul>
214
  </div>
215
  <?php
216
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != "") {?>
217
  <div class="card-footer">
218
- <a href="<?php echo $this->site_url.'sync_product_page'; ?>" class="btn btn-primary" id="product-sync">Edit</a>
219
  </div>
220
  <?php } ?>
221
  </div>
@@ -223,22 +223,22 @@ class GoogleShoppingFeed {
223
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
224
  <div class="card">
225
  <div class="card-header">
226
- <h4 class="confg-title">Smart Shopping Campaigns</h4>
227
  </div>
228
  <div class="card-body">
229
  <ul class="list-unstyled">
230
  <?php
231
- echo $this->add_list_html("Total campaign",$totalCampaigns)
232
- .$this->add_list_html("Active campaigns",$campaignActive)
233
- .$this->add_list_html("Cost",$campaignCost)
234
- .$this->add_list_html("Click",$campaignClicks)
235
- .$this->add_list_html("Conversion%",$campaignConversions)
236
- .$this->add_list_html("Sales",$campaignSales); ?>
237
  </ul>
238
  </div>
239
  <?php if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != "") { ?>
240
  <div class="card-footer">
241
- <a href="<?php echo $this->site_url.'shopping_campaigns_page'; ?>" id="smart-shopping-campaigns" class="btn btn-primary">Edit</a>
242
  </div>
243
  <?php }?>
244
  </div>
@@ -301,7 +301,7 @@ class GoogleShoppingFeed {
301
  $("#tvc_msg").remove();
302
  $("#refresh_api").css("visibility","hidden");
303
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
304
- tvc_helper.tvc_alert("error","Attention !","Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.");
305
  jQuery.post(tvc_ajax_url,{
306
  action: "tvc_call_api_sync"
307
  },function( response ){
17
  <span class="text">'.$title.'</span>
18
  </div>
19
  <div class="col-5 col-md-4 align-self-center text-right">
20
+ <span class="text"><strong>'. esc_attr($val).'</strong></span>
21
  </div>
22
  </div>
23
  </li>';
134
  <div class="tvc-api-sunc">
135
  <span>
136
  <?php if($last_api_sync_up){
137
+ echo __("Details last synced at ","conversios").$last_api_sync_up;
138
  }else{
139
+ echo __("Refresh sync up","conversios");
140
+ }?></span><img id="refresh_api" onclick="call_tvc_api_sync_up();" src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/refresh.png'); ?>">
141
  </div>
142
  <?php } ?>
143
  <?php
151
  $next_sync = date($date_formate,strtotime($next_sync));
152
  ?>
153
  <div class="product-auto-sync-details">
154
+ <strong><?php _e("Last auto product sync details","conversios"); ?></strong>
155
  <table>
156
+ <tr><th><?php _e("Last sync","conversios"); ?></th><th><?php _e("Sync product","conversios"); ?></th><th><?php _e("Status","conversios"); ?></th><th><?php _e("Upcoming sync","conversios"); ?></th></tr>
157
  <tr>
158
  <td><?php echo $create_sync;?></td>
159
+ <td><?php echo (isset($last_auto_sync['total_sync_product']))?$last_auto_sync['total_sync_product']:"";?></td>
160
  <td><?php echo $status_text[$status]; ?></td>
161
  <td><?php echo $next_sync;?></td>
162
  </tr>
170
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
171
  <div class="card configure-card">
172
  <div class="card-header">
173
+ <h4 class="confg-title"><?php _e("Configuration","conversios"); ?></h4>
174
  </div>
175
  <div class="card-body">
176
  <ul class="list-unstyled"><?php
177
+ $is_domain_claim = esc_attr((isset($googleDetail->is_domain_claim))?$googleDetail->is_domain_claim:"");
178
+ $is_site_verified = esc_attr((isset($googleDetail->is_site_verified))?$googleDetail->is_site_verified:"");
179
  echo $this->configuration_list_html("Google merchant center",(isset($googleDetail->google_merchant_center_id))?$googleDetail->google_merchant_center_id:"");
180
  if($is_site_verified ==1){
181
  echo $this->configuration_list_html("Site Verified",$is_site_verified);
192
  </ul>
193
  </div>
194
  <div class="card-footer">
195
+ <a href="<?php echo $this->site_url.'gaa_config_page'; ?>" class="btn btn-primary" id="configuration"><?php _e("Edit","conversios"); ?></a>
196
  </div>
197
  </div>
198
  </div>
199
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
200
  <div class="card">
201
  <div class="card-header">
202
+ <h4 class="confg-title"><?php _e("Product Sync","conversios"); ?></h4>
203
  </div>
204
  <div class="card-body">
205
  <ul class="list-unstyled">
206
  <?php
207
+ echo $this->add_list_html(__("Active products in WooCommerce","conversios"),$totalActiveWooProduct)
208
+ .$this->add_list_html(__("Total synced products in Merchant center","conversios"), $sync_product_total)
209
+ .$this->add_list_html(__("Approved","conversios"), $sync_product_approved)
210
+ .$this->add_list_html(__("Disapproved","conversios"), $sync_product_disapproved)
211
+ .$this->add_list_html(__("Pending","conversios"), $sync_product_pending);
212
  ?>
213
  </ul>
214
  </div>
215
  <?php
216
  if (isset($googleDetail->google_merchant_center_id) && $googleDetail->google_merchant_center_id != "") {?>
217
  <div class="card-footer">
218
+ <a href="<?php echo esc_url($this->site_url.'sync_product_page'); ?>" class="btn btn-primary" id="product-sync"><?php _e("Edit","conversios"); ?></a>
219
  </div>
220
  <?php } ?>
221
  </div>
223
  <div class="col-md-12 col-lg-4 mb-3 mb-lg-0">
224
  <div class="card">
225
  <div class="card-header">
226
+ <h4 class="confg-title"><?php _e("Smart Shopping Campaigns","conversios"); ?></h4>
227
  </div>
228
  <div class="card-body">
229
  <ul class="list-unstyled">
230
  <?php
231
+ echo $this->add_list_html(__("Total campaign","conversios"),$totalCampaigns)
232
+ .$this->add_list_html(__("Active campaigns","conversios"),$campaignActive)
233
+ .$this->add_list_html(__("Cost","conversios"),$campaignCost)
234
+ .$this->add_list_html(__("Click","conversios"),$campaignClicks)
235
+ .$this->add_list_html(__("Conversion%","conversios"),$campaignConversions)
236
+ .$this->add_list_html(__("Sales","conversios"),$campaignSales); ?>
237
  </ul>
238
  </div>
239
  <?php if (isset($googleDetail->google_ads_id) && $googleDetail->google_ads_id != "") { ?>
240
  <div class="card-footer">
241
+ <a href="<?php echo $this->site_url.'shopping_campaigns_page'; ?>" id="smart-shopping-campaigns" class="btn btn-primary"><?php _e("Edit","conversios"); ?></a>
242
  </div>
243
  <?php }?>
244
  </div>
301
  $("#tvc_msg").remove();
302
  $("#refresh_api").css("visibility","hidden");
303
  $(tvs_this).after('<div class="tvc-nb-spinner" id="tvc-nb-spinner"></div>');
304
+ tvc_helper.tvc_alert("error","<?php _e("Attention !","conversios"); ?>","<?php _e("Sync up is in the process do not refresh the page. it may take few minutes, if GMC product sync count is large.","conversios"); ?>");
305
  jQuery.post(tvc_ajax_url,{
306
  action: "tvc_call_api_sync"
307
  },function( response ){
includes/setup/help-html.php CHANGED
@@ -1,45 +1,19 @@
1
  <?php
2
- function get_connect_google_popup_html(){
3
- $TVC_Admin_Helper = new TVC_Admin_Helper();
4
- return '<div class="modal fade popup-modal overlay" id="tvc_google_connect" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
5
- <div class="modal-dialog modal-dialog-centered">
6
- <div class="modal-content">
7
- <div class="modal-body">
8
- <h5 class="modal-title" id="staticBackdropLabel">Connect Tatvic with your website</h5>
9
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
10
- <span aria-hidden="true">&times;</span>
11
- </button>
12
- <br>
13
- <p> By continuing from here, you will be redirected to Tatvic’s website to configure your google analytics, google ads and google merchant center accounts.</p>
14
-
15
- <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
16
- </div>
17
- <div class="modal-footer">
18
- <a class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_onboarding_page_url().'" style="text-transform:none; margin: 0 auto;">
19
- <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
20
- </a>
21
- </div>
22
- </div>
23
- </div>
24
- </div>';
25
- }
26
  function get_connect_google_popup_html_to_active_licence(){
27
  $TVC_Admin_Helper = new TVC_Admin_Helper();
28
  return '<div class="modal fade popup-modal overlay" id="tvc_google_connect_active_licence">
29
  <div class="modal-dialog modal-dialog-centered">
30
  <div class="modal-content">
31
  <div class="modal-body">
32
- <h5 class="modal-title" id="staticBackdropLabel">Connect Tatvic with your website to active licence key</h5>
33
  <button type="button" id="tvc_google_connect_active_licence_close" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
34
  </button>
35
- <br>
36
- <p> By continuing from here, you will be redirected to Tatvic’s website to configure your google analytics, google ads and google merchant center accounts.</p>
37
-
38
- <p>Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.</p>
39
  </div>
40
  <div class="modal-footer">
41
- <a class="ee-oauth-container btn darken-4 white black-text" href="'. $TVC_Admin_Helper->get_onboarding_page_url().'" style="text-transform:none; margin: 0 auto;">
42
- <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.svg.png" />Sign In With Google</p>
43
  </a>
44
  </div>
45
  </div>
@@ -48,9 +22,9 @@ function get_connect_google_popup_html_to_active_licence(){
48
  }
49
  function info_htnml($validation){
50
  if($validation == true){
51
- return '<img src="'.ENHANCAD_PLUGIN_URL.'/admin/images/config-success.svg" alt="configuration success" class="config-success">';
52
  }else{
53
- return '<img src="'.ENHANCAD_PLUGIN_URL.'/admin/images/exclaimation.png" alt="configuration success" class="config-fail">';
54
  }
55
  }
56
  function get_google_shopping_tabs_html($site_url, $google_merchant_center_id){
@@ -85,7 +59,7 @@ function get_google_shopping_tabs_html($site_url, $google_merchant_center_id){
85
  </li>
86
  <li class="nav-item" role="presentation">
87
  <div class="tvc-tooltip nav-link '.(($tab=="sync_product_page")?"active":"").'" '.$site_url_p_target.'>
88
- <a href="'.$site_url_p.'sync_product_page" id="smart-shopping-campaigns">Product Sync</a>'. $google_shopping_p_sync_msg
89
  .((isset($setting_status['google_shopping_p_sync']) )?info_htnml($setting_status['google_shopping_p_sync']):"").'
90
  </div>
91
  </li>
@@ -103,25 +77,25 @@ function get_tvc_google_ads_help_html(){
103
  <div class="right-content">
104
  <div class="content-section">
105
  <div class="content-icon">
106
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'; ?>" alt="information"/>
107
  </div>
108
  <h4 class="content-heading">Help Center:</h4>
109
  <section class="tvc-help-slider">
110
  <?php if($TVC_Admin_Helper->is_ga_property() == false){?>
111
  <div>
112
- In order to configure your Google Ads account, you need to sign in with the associated Google account. Click on "Get started" <img src="<?php echo ENHANCAD_PLUGIN_URL."/admin/images/icon/add.svg"; ?>" alt="connect account"/> icon to set up the plugin.
113
  </div>
114
  <div>
115
- Once you select or create a new google ads account, your account will be enabled for the following:
116
  <ol>
117
- <li>Remarketing and dynamic remarketing tags for all the major eCommerce events on your website (Optional)</li>
118
- <li>Your google ads account will be linked with the previously selected google analytics account (Optional)</li>
119
- <li>Your google ads account will be linked with google merchant center account in the next step so that you can start running google shopping campaigns(Optional)</li>
120
  </ol>
121
  </div>
122
  <?php }else{ ?>
123
  <div>
124
- You can update or change the google ads account anytime by clicking on <img src="<?php echo ENHANCAD_PLUGIN_URL."/admin/images/icon/refresh.svg"; ?>" alt="refresh"/> icon.
125
  </div>
126
  <?php }?>
127
 
@@ -130,11 +104,11 @@ function get_tvc_google_ads_help_html(){
130
  <nav>
131
  <ul class="pagination justify-content-center">
132
  <li class="page-item page-prev h-page-prev">
133
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
134
  </li>
135
  <li class="page-item"><span class="paging_info" id="paging_info">1</span></li>
136
  <li class="page-item page-next h-page-next">
137
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
138
  </li>
139
  </ul>
140
  </nav>
@@ -155,30 +129,30 @@ function get_tvc_google_ads_help_html(){
155
  <div class="right-content">
156
  <div class="content-section">
157
  <div class="content-icon">
158
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'; ?>" alt="information"/>
159
  </div>
160
  <h4 class="content-heading">Business Value:</h4>
161
  <section class="tvc-b-value-slider">
162
- <div>With dynamic remarketing tags, you will be able to show ads to your past site visitors with specific product information that is tailored to your customer’s previous site visits.</div>
163
- <div>This plugin enables dynamic remarketing tags for crucial eCommerce events like product list views, product detail page views, add to cart and final purchase event.</div>
164
- <div>Dynamic remarketing along with the product feeds in your merchant center account will enable you for smart shopping campaigns which is very essential for any eCommerce business globally. <a target="_blank" href="https://support.google.com/google-ads/answer/3124536?hl=en">Learn More</a>
165
  </div>
166
  </section>
167
  </div>
168
  <nav>
169
  <ul class="pagination justify-content-center">
170
  <li class="page-item page-prev b-page-prev">
171
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
172
  </li>
173
  <li class="page-item"><span class="paging_info" id="b-paging-info">1</span></li>
174
  <li class="page-item page-next b-page-next">
175
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
176
  </li>
177
  </ul>
178
  </nav>
179
  </div>
180
  <div class="tvc-footer-links">
181
- <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
182
  </div>
183
  <script>
184
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
@@ -201,24 +175,24 @@ function get_tvc_help_html(){
201
  <div class="right-content">
202
  <div class="content-section">
203
  <div class="content-icon">
204
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'; ?>" alt="information"/>
205
  </div>
206
- <h4 class="content-heading">Help Center:</h4>
207
  <section class="tvc-help-slider">
208
- <div>Set up your Google Merchant Center Account and make your WooCommerce shop and products available to millions of shoppers across Google.</div>
209
- <div>Our plugin will help you automate everything you need to make your products available to interested customers across Google.</div>
210
- <div>Follow <a target="_blank" href="https://support.google.com/merchants/answer/6363310?hl=en&ref_topic=3163841">merchant center guidelines for site requirements</a> in order to avoid account suspension issues.
211
  </div>
212
  </section>
213
  </div>
214
  <nav>
215
  <ul class="pagination justify-content-center">
216
  <li class="page-item page-prev h-page-prev">
217
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
218
  </li>
219
  <li class="page-item"><span class="paging_info" id="paging_info">1</span></li>
220
  <li class="page-item page-next h-page-next">
221
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
222
  </li>
223
  </ul>
224
  </nav>
@@ -239,29 +213,29 @@ function get_tvc_help_html(){
239
  <div class="right-content">
240
  <div class="content-section">
241
  <div class="content-icon">
242
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'; ?>" alt="information"/>
243
  </div>
244
- <h4 class="content-heading">Business Value:</h4>
245
  <section class="tvc-b-value-slider">
246
- <div>Opt your product data into programmes, like surfaces across Google, Shopping ads, local inventory ads and Shopping Actions, to highlight your products to shoppers across Google.</div>
247
- <div>Your store’s products will be eligible to get featured under the shopping tab when anyone searches for products that match your store’s product attributes.</div>
248
- <div>Reach out to customers leaving your store by running smart shopping campaigns based on their past site behavior. <a target="_blank" href="https://www.google.com/intl/en_in/retail/?fmp=1&utm_id=bkws&mcsubid=in-en-ha-g-mc-bkws">Learn More</a></div>
249
  </section>
250
  </div>
251
  <nav>
252
  <ul class="pagination justify-content-center">
253
  <li class="page-item page-prev b-page-prev">
254
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
255
  </li>
256
  <li class="page-item"><span class="paging_info" id="b-paging-info">1</span></li>
257
  <li class="page-item page-next b-page-next">
258
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
259
  </li>
260
  </ul>
261
  </nav>
262
  </div>
263
  <div class="tvc-footer-links">
264
- <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
265
  </div>
266
  <script>
267
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
@@ -285,25 +259,25 @@ function get_tvc_google_ga_sidebar(){
285
  <div class="right-content">
286
  <div class="content-section">
287
  <div class="content-icon">
288
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'; ?>" alt="information"/>
289
  </div>
290
- <h4 class="content-heading">Help Center:</h4>
291
  <section class="tvc-help-slider">
292
  <?php if($TVC_Admin_Helper->is_ga_property() == false){?>
293
  <div>
294
- In order to configure your Google Analytics account, you need to sign in with the associated Google account. Click on "Get started" <img src="<?php echo ENHANCAD_PLUGIN_URL."/admin/images/icon/add.svg"; ?>" alt="connect account"/> icon to set up the plugin.
295
  </div>
296
  <div>
297
- Once you sign in with an associated google account, you will be asked to select a google analytics account from the drop down.
298
  </div>
299
  <div>
300
- If you have already added the gtag.js snippet manually, YOU MUST uncheck the “add gtag.js”.
301
  </div>
302
  <?php
303
  }else{
304
  ?>
305
  <div>
306
- You can update or change the google analytics account anytime by clicking on <img src="<?php echo ENHANCAD_PLUGIN_URL."/admin/images/icon/refresh.svg"; ?>" alt="refresh"/> icon.
307
  </div>
308
  <?php
309
  }?>
@@ -312,11 +286,11 @@ function get_tvc_google_ga_sidebar(){
312
  <nav>
313
  <ul class="pagination justify-content-center">
314
  <li class="page-item page-prev h-page-prev help-ga-prev">
315
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
316
  </li>
317
  <li class="page-item"><span class="paging_info" id="help_ga_paging_info">1</span></li>
318
  <li class="page-item page-next h-page-next help-ga-next">
319
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
320
  </li>
321
  </ul>
322
  </nav>
@@ -335,34 +309,34 @@ function get_tvc_google_ga_sidebar(){
335
  <div class="right-content">
336
  <div class="content-section">
337
  <div class="content-icon">
338
- <img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'; ?>" alt="information"/>
339
  </div>
340
- <h4 class="content-heading">Business Value:</h4>
341
  <section class="tvc-b-value-slider">
342
  <div>
343
- <p>Once you set up google analytics account, your website will be tagged for all the important eCommerce events in google analytics and you will be able to start taking data driven decisions in order to scale your eCommerce business faster. Some of the important data points are:</p>
344
  <ol>
345
- <li>What exactly is your site’s conversion rate?</li>
346
- <li>What is the exact drop at each stage in your eCommerce funnel? For example, 100 people are coming to your website, how many users are seeing any product detail page, how many are adding products to cart, how many are abandoning cart etc.</li>
347
  </ol>
348
  </div>
349
- <div>What all are your star products and what all are just consuming the space in your website?</div>
350
  </section>
351
  </div>
352
  <nav>
353
  <ul class="pagination justify-content-center">
354
  <li class="page-item page-prev b-page-prev value-ga-prev">
355
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
356
  </li>
357
  <li class="page-item"><span class="paging_info" id="value_ga_paging_info">1</span></li>
358
  <li class="page-item page-next b-page-next value-ga-next">
359
- <span class="page-link"><img src="<?php echo ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'; ?>" alt=""/></span>
360
  </li>
361
  </ul>
362
  </nav>
363
  </div>
364
  <div class="tvc-footer-links">
365
- <a target="_blank" href="https://conversios.io/help-center/Installation-Manual.pdf" tabindex="0">Installation manual</a> | <a target="_blank" href="https://conversios.io/help-center/Google-shopping-Guide.pdf" tabindex="0">Google shopping guide</a> | <a target="_blank" href="https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/" tabindex="0">FAQ</a>
366
  </div>
367
  <script>
368
  $(".tvc-b-value-slider").slick({
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  function get_connect_google_popup_html_to_active_licence(){
3
  $TVC_Admin_Helper = new TVC_Admin_Helper();
4
  return '<div class="modal fade popup-modal overlay" id="tvc_google_connect_active_licence">
5
  <div class="modal-dialog modal-dialog-centered">
6
  <div class="modal-content">
7
  <div class="modal-body">
8
+ <h5 class="modal-title" id="staticBackdropLabel">'.__("Connect Tatvic with your website to active licence key", "conversios").'</h5>
9
  <button type="button" id="tvc_google_connect_active_licence_close" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
10
  </button>
11
+ <br>
12
+ <p>'.__("Make sure you sign in with the google account that has all privileges to access google analytics, google ads and google merchant center account.", "conversios").'</p>
 
 
13
  </div>
14
  <div class="modal-footer">
15
+ <a class="ee-oauth-container btn darken-4 white black-text" href="'. esc_url($TVC_Admin_Helper->get_onboarding_page_url()).'" style="text-transform:none; margin: 0 auto;">
16
+ <p style="font-size: inherit; margin-top:5px;"><img width="20px" style="margin-right:8px" alt="Google sign-in" src="'.esc_url(ENHANCAD_PLUGIN_URL."/admin/images/g-logo.png").'" />'.__("Sign In With Google", "conversios").'</p>
17
  </a>
18
  </div>
19
  </div>
22
  }
23
  function info_htnml($validation){
24
  if($validation == true){
25
+ return '<img src="'.esc_url(ENHANCAD_PLUGIN_URL."/admin/images/config-success.svg").'" alt="configuration success" class="config-success">';
26
  }else{
27
+ return '<img src="'.esc_url(ENHANCAD_PLUGIN_URL."/admin/images/exclaimation.png").'" alt="configuration success" class="config-fail">';
28
  }
29
  }
30
  function get_google_shopping_tabs_html($site_url, $google_merchant_center_id){
59
  </li>
60
  <li class="nav-item" role="presentation">
61
  <div class="tvc-tooltip nav-link '.(($tab=="sync_product_page")?"active":"").'" '.$site_url_p_target.'>
62
+ <a href="'.$site_url_p.'sync_product_page" id="smart-shopping-campaigns">Product Sync</a>'. $google_shopping_p_sync_msg
63
  .((isset($setting_status['google_shopping_p_sync']) )?info_htnml($setting_status['google_shopping_p_sync']):"").'
64
  </div>
65
  </li>
77
  <div class="right-content">
78
  <div class="content-section">
79
  <div class="content-icon">
80
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'); ?>" alt="information"/>
81
  </div>
82
  <h4 class="content-heading">Help Center:</h4>
83
  <section class="tvc-help-slider">
84
  <?php if($TVC_Admin_Helper->is_ga_property() == false){?>
85
  <div>
86
+ <?php _e('In order to configure your Google Ads account, you need to sign in with the associated Google account. Click on "Get started"','conversios'); ?> <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL."/admin/images/icon/add.svg"); ?>" alt="connect account"/> <?php _e("icon to set up the plugin.","conversios"); ?>
87
  </div>
88
  <div>
89
+ <?php _e("Once you select or create a new google ads account, your account will be enabled for the following:","conversios"); ?>
90
  <ol>
91
+ <li><?php _e("Remarketing and dynamic remarketing tags for all the major eCommerce events on your website (Optional)","conversios"); ?></li>
92
+ <li><?php _e("Your google ads account will be linked with the previously selected google analytics account (Optional)","conversios"); ?></li>
93
+ <li><?php _e("Your google ads account will be linked with google merchant center account in the next step so that you can start running google shopping campaigns(Optional)","conversios"); ?></li>
94
  </ol>
95
  </div>
96
  <?php }else{ ?>
97
  <div>
98
+ <?php _e("You can update or change the google ads account anytime by clicking on","conversios"); ?> <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL."/admin/images/icon/refresh.svg"); ?>" alt="refresh"/> icon.
99
  </div>
100
  <?php }?>
101
 
104
  <nav>
105
  <ul class="pagination justify-content-center">
106
  <li class="page-item page-prev h-page-prev">
107
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
108
  </li>
109
  <li class="page-item"><span class="paging_info" id="paging_info">1</span></li>
110
  <li class="page-item page-next h-page-next">
111
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
112
  </li>
113
  </ul>
114
  </nav>
129
  <div class="right-content">
130
  <div class="content-section">
131
  <div class="content-icon">
132
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'); ?>" alt="information"/>
133
  </div>
134
  <h4 class="content-heading">Business Value:</h4>
135
  <section class="tvc-b-value-slider">
136
+ <div><?php _e("With dynamic remarketing tags, you will be able to show ads to your past site visitors with specific product information that is tailored to your customer’s previous site visits.","conversios"); ?></div>
137
+ <div><?php _e("This plugin enables dynamic remarketing tags for crucial eCommerce events like product list views, product detail page views, add to cart and final purchase event.","conversios"); ?></div>
138
+ <div><?php _e("Dynamic remarketing along with the product feeds in your merchant center account will enable you for smart shopping campaigns which is very essential for any eCommerce business globally. ","conversios"); ?><a target="_blank" href="https://support.google.com/google-ads/answer/3124536?hl=en"><?php _e("Learn More","conversios"); ?></a>
139
  </div>
140
  </section>
141
  </div>
142
  <nav>
143
  <ul class="pagination justify-content-center">
144
  <li class="page-item page-prev b-page-prev">
145
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
146
  </li>
147
  <li class="page-item"><span class="paging_info" id="b-paging-info">1</span></li>
148
  <li class="page-item page-next b-page-next">
149
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
150
  </li>
151
  </ul>
152
  </nav>
153
  </div>
154
  <div class="tvc-footer-links">
155
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Installation-Manual.pdf"); ?>" tabindex="0"><?php _e("Installation manual","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" tabindex="0"><?php _e("Google shopping guide","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" tabindex="0"><?php _e("FAQ","conversios"); ?></a>
156
  </div>
157
  <script>
158
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
175
  <div class="right-content">
176
  <div class="content-section">
177
  <div class="content-icon">
178
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'); ?>" alt="information"/>
179
  </div>
180
+ <h4 class="content-heading"><?php _e("Help Center:","conversios"); ?></h4>
181
  <section class="tvc-help-slider">
182
+ <div><?php _e("Set up your Google Merchant Center Account and make your WooCommerce shop and products available to millions of shoppers across Google.","conversios"); ?></div>
183
+ <div><?php _e("Our plugin will help you automate everything you need to make your products available to interested customers across Google.","conversios"); ?></div>
184
+ <div>Follow <a target="_blank" href="<?php echo esc_url("https://support.google.com/merchants/answer/6363310?hl=en&ref_topic=3163841"); ?>"><?php _e("merchant center guidelines for site requirements","conversios"); ?></a> <?php _e("in order to avoid account suspension issues.","conversios"); ?>
185
  </div>
186
  </section>
187
  </div>
188
  <nav>
189
  <ul class="pagination justify-content-center">
190
  <li class="page-item page-prev h-page-prev">
191
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
192
  </li>
193
  <li class="page-item"><span class="paging_info" id="paging_info">1</span></li>
194
  <li class="page-item page-next h-page-next">
195
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
196
  </li>
197
  </ul>
198
  </nav>
213
  <div class="right-content">
214
  <div class="content-section">
215
  <div class="content-icon">
216
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'); ?>" alt="information"/>
217
  </div>
218
+ <h4 class="content-heading"><?php _e("Business Value:","conversios"); ?></h4>
219
  <section class="tvc-b-value-slider">
220
+ <div><?php _e("Opt your product data into programmes, like surfaces across Google, Shopping ads, local inventory ads and Shopping Actions, to highlight your products to shoppers across Google.","conversios"); ?></div>
221
+ <div><?php _e(" store’s products will be eligible to get featured under the shopping tab when anyone searches for products that match your store’s product attributes.","conversios"); ?></div>
222
+ <div><?php _e("Reach out to customers leaving your store by running smart shopping campaigns based on their past site behavior.","conversios"); ?><a target="_blank" href="<?php echo esc_url("https://www.google.com/intl/en_in/retail/?fmp=1&utm_id=bkws&mcsubid=in-en-ha-g-mc-bkws"); ?>"><?php _e("Learn More","conversios"); ?></a></div>
223
  </section>
224
  </div>
225
  <nav>
226
  <ul class="pagination justify-content-center">
227
  <li class="page-item page-prev b-page-prev">
228
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
229
  </li>
230
  <li class="page-item"><span class="paging_info" id="b-paging-info">1</span></li>
231
  <li class="page-item page-next b-page-next">
232
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
233
  </li>
234
  </ul>
235
  </nav>
236
  </div>
237
  <div class="tvc-footer-links">
238
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Installation-Manual.pdf"); ?>" tabindex="0"><?php _e("Installation manual","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" tabindex="0"><?php _e("Google shopping guide","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" tabindex="0"><?php _e("FAQ","conversios"); ?></a>
239
  </div>
240
  <script>
241
  //let rtl= "<?php echo (is_rtl())?"true":"false"; ?>";
259
  <div class="right-content">
260
  <div class="content-section">
261
  <div class="content-icon">
262
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/information.svg'); ?>" alt="information"/>
263
  </div>
264
+ <h4 class="content-heading"><?php _e("Help Center:","conversios"); ?></h4>
265
  <section class="tvc-help-slider">
266
  <?php if($TVC_Admin_Helper->is_ga_property() == false){?>
267
  <div>
268
+ <?php _e("In order to configure your Google Analytics account, you need to sign in with the associated Google account. Click on \"Get started\" ","conversios"); ?><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL."/admin/images/icon/add.svg"); ?>" alt="connect account"/> <?php _e("icon to set up the plugin.","conversios"); ?>
269
  </div>
270
  <div>
271
+ <?php _e("Once you sign in with an associated google account, you will be asked to select a google analytics account from the drop down.","conversios"); ?>
272
  </div>
273
  <div>
274
+ <?php _e("If you have already added the gtag.js snippet manually, YOU MUST uncheck the “add gtag.js”","conversios"); ?>
275
  </div>
276
  <?php
277
  }else{
278
  ?>
279
  <div>
280
+ <?php _e("You can update or change the google analytics account anytime by clicking on","conversios"); ?> <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL."/admin/images/icon/refresh.svg"); ?>" alt="refresh"/> icon.
281
  </div>
282
  <?php
283
  }?>
286
  <nav>
287
  <ul class="pagination justify-content-center">
288
  <li class="page-item page-prev h-page-prev help-ga-prev">
289
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
290
  </li>
291
  <li class="page-item"><span class="paging_info" id="help_ga_paging_info">1</span></li>
292
  <li class="page-item page-next h-page-next help-ga-next">
293
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
294
  </li>
295
  </ul>
296
  </nav>
309
  <div class="right-content">
310
  <div class="content-section">
311
  <div class="content-icon">
312
+ <img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/lamp.svg'); ?>" alt="information"/>
313
  </div>
314
+ <h4 class="content-heading"> <?php _e("Business Value:","conversios"); ?></h4>
315
  <section class="tvc-b-value-slider">
316
  <div>
317
+ <p> <?php _e("Once you set up google analytics account, your website will be tagged for all the important eCommerce events in google analytics and you will be able to start taking data driven decisions in order to scale your eCommerce business faster. Some of the important data points are:","conversios"); ?></p>
318
  <ol>
319
+ <li> <?php _e("What exactly is your site’s conversion rate?","conversios"); ?></li>
320
+ <li> <?php _e("What is the exact drop at each stage in your eCommerce funnel? For example, 100 people are coming to your website, how many users are seeing any product detail page, how many are adding products to cart, how many are abandoning cart etc.","conversios"); ?></li>
321
  </ol>
322
  </div>
323
+ <div> <?php _e("What all are your star products and what all are just consuming the space in your website?","conversios"); ?></div>
324
  </section>
325
  </div>
326
  <nav>
327
  <ul class="pagination justify-content-center">
328
  <li class="page-item page-prev b-page-prev value-ga-prev">
329
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
330
  </li>
331
  <li class="page-item"><span class="paging_info" id="value_ga_paging_info">1</span></li>
332
  <li class="page-item page-next b-page-next value-ga-next">
333
+ <span class="page-link"><img src="<?php echo esc_url(ENHANCAD_PLUGIN_URL.'/admin/images/icon/arrow-down-sign-to-navigate.svg'); ?>" alt=""/></span>
334
  </li>
335
  </ul>
336
  </nav>
337
  </div>
338
  <div class="tvc-footer-links">
339
+ <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Installation-Manual.pdf"); ?>" tabindex="0"> <?php _e("Installation manual","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://conversios.io/help-center/Google-shopping-Guide.pdf"); ?>" tabindex="0"> <?php _e("Google shopping guide","conversios"); ?></a> | <a target="_blank" href="<?php echo esc_url("https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/faq/"); ?>" tabindex="0"> <?php _e("FAQ","conversios"); ?></a>
340
  </div>
341
  <script>
342
  $(".tvc-b-value-slider").slick({
includes/setup/tatvic-category-wrapper.php CHANGED
@@ -31,7 +31,7 @@ if ( ! class_exists( 'Tatvic_Category_Wrapper' ) ) :
31
  if (!class_exists('Tatvic_Category_Selector_Element')) {
32
  require_once(__DIR__ . '/class-tatvic-category-selector-element.php');
33
  }
34
- $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
35
  //$ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
36
 
37
  $TCSE_Obj = new Tatvic_Category_Selector_Element();
@@ -54,7 +54,7 @@ if ( ! class_exists( 'Tatvic_Category_Wrapper' ) ) :
54
  }
55
  }
56
  } else {
57
- $html_code .= esc_html__( 'No shop categories found.', 'tvc-product-feed-manager' );
58
  }
59
  return $html_code;
60
  }
@@ -76,5 +76,4 @@ if ( ! class_exists( 'Tatvic_Category_Wrapper' ) ) :
76
  return $array_string;
77
  }
78
  }
79
-
80
- endif;
31
  if (!class_exists('Tatvic_Category_Selector_Element')) {
32
  require_once(__DIR__ . '/class-tatvic-category-selector-element.php');
33
  }
34
+ $ee_prod_mapped_cats = unserialize(get_option('ee_prod_mapped_cats'));
35
  //$ee_prod_mapped_attrs = unserialize(get_option('ee_prod_mapped_attrs'));
36
 
37
  $TCSE_Obj = new Tatvic_Category_Selector_Element();
54
  }
55
  }
56
  } else {
57
+ $html_code .= esc_html__( 'No shop categories found.', 'conversios' );
58
  }
59
  return $html_code;
60
  }
76
  return $array_string;
77
  }
78
  }
79
+ endif;
 
public/class-enhanced-ecommerce-google-analytics-public-pro.php CHANGED
@@ -78,36 +78,33 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
78
  $this->tvc_call_hooks();
79
 
80
  $this->ga_Dname = "auto";
81
- $this->tvc_aga = $this->get_option("tvc_aga");
82
- $this->ga_id = $this->get_option("ga_id");
83
- $this->ga_eeT = $this->get_option("ga_eeT");
84
- $this->enhanced_e_commerce_tracking = $this->get_option("enhanced_e_commerce_tracking");
85
  $this->ga_ST = $this->get_option("ga_ST"); //add_gtag_snippet
86
- $this->add_gtag_snippet = $this->get_option("add_gtag_snippet"); //add_gtag_snippet
87
- $this->gm_id = $this->get_option("gm_id"); //measurement_id
88
- $this->google_ads_id = $this->get_option("google_ads_id");
89
- $this->ga_excT = $this->get_option("ga_excT"); //exception_tracking
90
- $this->exception_tracking = $this->get_option("exception_tracking"); //exception_tracking
91
- $this->ga_elaT = $this->get_option("ga_elaT"); //enhanced_link_attribution_tracking
92
- $this->google_merchant_id = $this->get_option("google_merchant_id");
93
- $this->tracking_option = $this->get_option("tracking_option");
94
- $this->ga_gCkout = $this->get_option("ga_gCkout") == "on" ? true : false; //guest checkout
95
- $this->ga_gUser = $this->get_option("ga_gUser") == "on" ? true : false; //guest checkout
96
- $this->ga_DF = $this->get_option("ga_DF") == "on" ? true : false;
97
- $this->ga_imTh = $this->get_option("ga_Impr") == "" ? 6 : $this->get_option("ga_Impr");
98
- $this->ga_OPTOUT = $this->get_option("ga_OPTOUT") == "on" ? true : false; //Google Analytics Opt Out
99
- $this->ga_PrivacyPolicy = $this->get_option("ga_PrivacyPolicy") == "on" ? true : false;
100
- $this->ga_IPA = $this->get_option("ga_IPA") == "on" ? true : false; //IP Anony.
101
  $this->ads_ert = get_option('ads_ert'); //Enable remarketing tags
102
  $this->ads_edrt = get_option('ads_edrt'); //Enable dynamic remarketing tags
103
- $this->ads_tracking_id = get_option('ads_tracking_id');
104
  $this->google_ads_conversion_tracking = get_option('google_ads_conversion_tracking');
105
  $this->conversio_send_to = get_option('ee_conversio_send_to');
106
 
107
  $remarketing = unserialize(get_option('ee_remarketing_snippets'));
108
  if(!empty($remarketing) && isset($remarketing['snippets']) && $remarketing['snippets']){
109
  $this->remarketing_snippets = base64_decode($remarketing['snippets']);
110
- $this->remarketing_snippet_id = isset($remarketing['id'])?$remarketing['id']:"";
111
  }
112
  if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
113
  // Put your plugin code here
@@ -319,33 +316,33 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
319
  $sub_data = array();
320
  if(isset($google_detail['setting'])){
321
  $googleDetail = $google_detail['setting'];
322
- $sub_data['sub_id'] = isset($googleDetail->id)?$googleDetail->id:"";
323
- $sub_data['cu_id']=isset($googleDetail->customer_id)?$googleDetail->customer_id:"";
324
- $sub_data['pl_id']=isset($googleDetail->plan_id)?$googleDetail->plan_id:"";
325
- $sub_data['ga_tra_option']=isset($googleDetail->tracking_option)?$googleDetail->tracking_option:"";
326
- $sub_data['ga_property_id']=isset($googleDetail->property_id)?$googleDetail->property_id:"";
327
- $sub_data['ga_measurement_id']=isset($googleDetail->measurement_id)?$googleDetail->measurement_id:"";
328
- $sub_data['ga_ads_id']=isset($googleDetail->google_ads_id)?$googleDetail->google_ads_id:"";
329
- $sub_data['ga_gmc_id']=isset($googleDetail->google_merchant_center_id)?$googleDetail->google_merchant_center_id:"";
330
- $sub_data['op_gtag_js']=isset($googleDetail->add_gtag_snippet)?$googleDetail->add_gtag_snippet:"";
331
- $sub_data['op_en_e_t']=isset($googleDetail->enhanced_e_commerce_tracking)?$googleDetail->enhanced_e_commerce_tracking:"";
332
- $sub_data['op_rm_t_t']=isset($googleDetail->remarketing_tags)?$googleDetail->remarketing_tags:"";
333
- $sub_data['op_dy_rm_t_t']=isset($googleDetail->dynamic_remarketing_tags)?$googleDetail->dynamic_remarketing_tags:"";
334
- $sub_data['op_li_ga_wi_ads']=isset($googleDetail->link_google_analytics_with_google_ads)?$googleDetail->link_google_analytics_with_google_ads:"";
335
- $sub_data['gmc_is_product_sync']=isset($googleDetail->is_product_sync)?$googleDetail->is_product_sync:"";
336
- $sub_data['gmc_is_site_verified']=isset($googleDetail->is_site_verified)?$googleDetail->is_site_verified:"";
337
- $sub_data['gmc_is_domain_claim']=isset($googleDetail->is_domain_claim)?$googleDetail->is_domain_claim:"";
338
- $sub_data['gmc_product_count']=isset($googleDetail->product_count)?$googleDetail->product_count:"";
339
  }
340
  $tvc_sMetaData = array(
341
- 'tvc_wcv' => $woocommerce->version,
342
- 'tvc_wpv' => get_bloginfo('version'),
343
  'tvc_eev' => $this->tvc_eeVer,
344
  'tvc_cnf' => array(
345
  't_ee' => $this->ga_eeT,
346
  't_df' => $this->ga_DF,
347
- 't_gUser'=>$this->ga_gUser,
348
- 't_UAen'=>$this->ga_ST,
349
  't_thr' => $this->ga_imTh,
350
  't_IPA' => $this->ga_IPA,
351
  't_OptOut' => $this->ga_OPTOUT,
@@ -362,7 +359,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
362
  * @since4.0.0
363
  */
364
  public function enqueue_scripts() {
365
- wp_enqueue_script($this->plugin_name, ENHANCAD_PLUGIN_URL . '/public/js/tvc-ee-google-analytics.js', array('jquery'), $this->version, false);
366
  }
367
 
368
  /**
@@ -705,18 +702,18 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
705
  "payment_method"=>$order->get_payment_method()
706
  );
707
  $this->wc_version_compare("tvc_td=" . json_encode($orderpage_trans_Array) . ";");
708
- ?>
709
- <script>
710
- window.addEventListener('load', call_thnkyou_page,true);
711
- function call_thnkyou_page(){
712
- tvc_js = new TVC_Enhanced(<?php echo json_encode($this->tvc_options); ?>);
713
- tvc_js.thnkyou_page(<?php echo json_encode($orderpage_prod_Array); ?>, <?php echo json_encode($orderpage_trans_Array); ?>, "+<?php echo $order->get_status(); ?>+", <?php echo time(); ?>);
714
- /*let script = document.createElement('script');
715
  script.addEventListener('load', (event) => {
716
  let tvc_js = new TVC_Enhanced(<?php echo json_encode($tvc_options); ?>);
717
  });
718
  script.src = "<?php echo ENHANCAD_PLUGIN_URL.'/public/js/tvc-ee-google-analytics.js'; ?>";
719
  document.getElementsByTagName('head')[0].appendChild(script);*/
 
 
 
 
 
 
720
  }
721
  </script>
722
  <?php
@@ -1668,60 +1665,57 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
1668
  }
1669
  }
1670
 
1671
- /**
1672
- * Get oredered Items for check out page.
1673
- *
1674
- * @access public
1675
- * @return void
1676
- */
1677
- public function get_ordered_items() {
1678
- global $woocommerce;
1679
- $code = "";
1680
- //get all items added into the cart
1681
- foreach ($woocommerce->cart->cart_contents as $item) {
1682
- //Version Compare
1683
- if ( version_compare($woocommerce->version, "2.7", "<")) {
1684
- $p = get_product($item["product_id"]);
1685
- } else {
1686
- $p = wc_get_product($item["product_id"]);
1687
- }
1688
 
1689
- $category = get_the_terms($item["product_id"], "product_cat");
1690
- $categories = "";
1691
- if ($category) {
1692
- foreach ($category as $term) {
1693
- $categories.=$term->name . ",";
1694
- }
1695
- }
1696
- //remove last comma(,) if multiple categories are there
1697
- $categories = rtrim($categories, ",");
1698
- if(version_compare($woocommerce->version, "2.7", "<")){
1699
- $chkout_json[get_permalink($p->ID)] = array(
1700
- "tvc_id" => esc_html($p->ID),
1701
- "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->ID),
1702
- "tvc_n" => html_entity_decode($p->get_title()),
1703
- "tvc_p" => esc_js($p->get_price()),
1704
- "tvc_c" => $categories,
1705
- "tvc_q" => esc_js($item["quantity"]),
1706
- "isfeatured"=>$p->is_featured()
1707
- );
1708
- }else{
1709
- $chkout_json[get_permalink($p->get_id())] = array(
1710
- "tvc_id" => esc_html($p->get_id()),
1711
- "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->get_id()),
1712
- "tvc_n" => html_entity_decode($p->get_title()),
1713
- "tvc_p" => esc_js($p->get_price()),
1714
- "tvc_c" => $categories,
1715
- "tvc_q" => esc_js($item["quantity"]),
1716
- "isfeatured"=>$p->is_featured()
1717
- );
1718
- }
1719
  }
1720
- //return $code;
1721
- //make product data json on check out page
1722
- $this->wc_version_compare("tvc_ch=" . json_encode($chkout_json) . ";");
1723
  }
1724
-
1725
-
1726
-
1727
- }
 
78
  $this->tvc_call_hooks();
79
 
80
  $this->ga_Dname = "auto";
81
+ $this->ga_id = sanitize_text_field($this->get_option("ga_id"));
82
+ $this->ga_eeT = sanitize_text_field($this->get_option("ga_eeT"));
 
 
83
  $this->ga_ST = $this->get_option("ga_ST"); //add_gtag_snippet
84
+ $this->gm_id = sanitize_text_field($this->get_option("gm_id")); //measurement_id
85
+ $this->google_ads_id = sanitize_text_field($this->get_option("google_ads_id"));
86
+ $this->ga_excT = sanitize_text_field($this->get_option("ga_excT")); //exception_tracking
87
+ $this->exception_tracking = sanitize_text_field($this->get_option("exception_tracking")); //exception_tracking
88
+ $this->ga_elaT = sanitize_text_field($this->get_option("ga_elaT")); //enhanced_link_attribution_tracking
89
+ $this->google_merchant_id = sanitize_text_field($this->get_option("google_merchant_id"));
90
+ $this->tracking_option = sanitize_text_field($this->get_option("tracking_option"));
91
+ $this->ga_gCkout = sanitize_text_field($this->get_option("ga_gCkout") == "on" ? true : false); //guest checkout
92
+ $this->ga_gUser = sanitize_text_field($this->get_option("ga_gUser") == "on" ? true : false); //guest checkout
93
+ $this->ga_DF = sanitize_text_field($this->get_option("ga_DF") == "on" ? true : false);
94
+ $this->ga_imTh = sanitize_text_field($this->get_option("ga_Impr") == "" ? 6 : $this->get_option("ga_Impr"));
95
+ $this->ga_OPTOUT = sanitize_text_field($this->get_option("ga_OPTOUT") == "on" ? true : false); //Google Analytics Opt Out
96
+ $this->ga_PrivacyPolicy = sanitize_text_field($this->get_option("ga_PrivacyPolicy") == "on" ? true : false);
97
+ $this->ga_IPA = sanitize_text_field($this->get_option("ga_IPA") == "on" ? true : false); //IP Anony.
 
98
  $this->ads_ert = get_option('ads_ert'); //Enable remarketing tags
99
  $this->ads_edrt = get_option('ads_edrt'); //Enable dynamic remarketing tags
100
+ $this->ads_tracking_id = sanitize_text_field(get_option('ads_tracking_id'));
101
  $this->google_ads_conversion_tracking = get_option('google_ads_conversion_tracking');
102
  $this->conversio_send_to = get_option('ee_conversio_send_to');
103
 
104
  $remarketing = unserialize(get_option('ee_remarketing_snippets'));
105
  if(!empty($remarketing) && isset($remarketing['snippets']) && $remarketing['snippets']){
106
  $this->remarketing_snippets = base64_decode($remarketing['snippets']);
107
+ $this->remarketing_snippet_id = sanitize_text_field(isset($remarketing['id'])?$remarketing['id']:"");
108
  }
109
  if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
110
  // Put your plugin code here
316
  $sub_data = array();
317
  if(isset($google_detail['setting'])){
318
  $googleDetail = $google_detail['setting'];
319
+ $sub_data['sub_id'] = sanitize_text_field(isset($googleDetail->id)?$googleDetail->id:"");
320
+ $sub_data['cu_id']=sanitize_text_field(isset($googleDetail->customer_id)?$googleDetail->customer_id:"");
321
+ $sub_data['pl_id']=sanitize_text_field(isset($googleDetail->plan_id)?$googleDetail->plan_id:"");
322
+ $sub_data['ga_tra_option']=sanitize_text_field(isset($googleDetail->tracking_option)?$googleDetail->tracking_option:"");
323
+ $sub_data['ga_property_id']=sanitize_text_field(isset($googleDetail->property_id)?$googleDetail->property_id:"");
324
+ $sub_data['ga_measurement_id']=sanitize_text_field(isset($googleDetail->measurement_id)?$googleDetail->measurement_id:"");
325
+ $sub_data['ga_ads_id']=sanitize_text_field(isset($googleDetail->google_ads_id)?$googleDetail->google_ads_id:"");
326
+ $sub_data['ga_gmc_id']=sanitize_text_field(isset($googleDetail->google_merchant_center_id)?$googleDetail->google_merchant_center_id:"");
327
+ $sub_data['op_gtag_js']=sanitize_text_field(isset($googleDetail->add_gtag_snippet)?$googleDetail->add_gtag_snippet:"");
328
+ $sub_data['op_en_e_t']=sanitize_text_field(isset($googleDetail->enhanced_e_commerce_tracking)?$googleDetail->enhanced_e_commerce_tracking:"");
329
+ $sub_data['op_rm_t_t']=sanitize_text_field(isset($googleDetail->remarketing_tags)?$googleDetail->remarketing_tags:"");
330
+ $sub_data['op_dy_rm_t_t']=sanitize_text_field(isset($googleDetail->dynamic_remarketing_tags)?$googleDetail->dynamic_remarketing_tags:"");
331
+ $sub_data['op_li_ga_wi_ads']=sanitize_text_field(isset($googleDetail->link_google_analytics_with_google_ads)?$googleDetail->link_google_analytics_with_google_ads:"");
332
+ $sub_data['gmc_is_product_sync']=sanitize_text_field(isset($googleDetail->is_product_sync)?$googleDetail->is_product_sync:"");
333
+ $sub_data['gmc_is_site_verified']=sanitize_text_field(isset($googleDetail->is_site_verified)?$googleDetail->is_site_verified:"");
334
+ $sub_data['gmc_is_domain_claim']=sanitize_text_field(isset($googleDetail->is_domain_claim)?$googleDetail->is_domain_claim:"");
335
+ $sub_data['gmc_product_count']=sanitize_text_field(isset($googleDetail->product_count)?$googleDetail->product_count:"");
336
  }
337
  $tvc_sMetaData = array(
338
+ 'tvc_wcv' => sanitize_text_field($woocommerce->version),
339
+ 'tvc_wpv' => sanitize_text_field(get_bloginfo('version')),
340
  'tvc_eev' => $this->tvc_eeVer,
341
  'tvc_cnf' => array(
342
  't_ee' => $this->ga_eeT,
343
  't_df' => $this->ga_DF,
344
+ 't_gUser' => $this->ga_gUser,
345
+ 't_UAen' => $this->ga_ST,
346
  't_thr' => $this->ga_imTh,
347
  't_IPA' => $this->ga_IPA,
348
  't_OptOut' => $this->ga_OPTOUT,
359
  * @since4.0.0
360
  */
361
  public function enqueue_scripts() {
362
+ wp_enqueue_script($this->plugin_name, esc_url(ENHANCAD_PLUGIN_URL . '/public/js/tvc-ee-google-analytics.js'), array('jquery'), $this->version, false);
363
  }
364
 
365
  /**
702
  "payment_method"=>$order->get_payment_method()
703
  );
704
  $this->wc_version_compare("tvc_td=" . json_encode($orderpage_trans_Array) . ";");
705
+ /*let script = document.createElement('script');
 
 
 
 
 
 
706
  script.addEventListener('load', (event) => {
707
  let tvc_js = new TVC_Enhanced(<?php echo json_encode($tvc_options); ?>);
708
  });
709
  script.src = "<?php echo ENHANCAD_PLUGIN_URL.'/public/js/tvc-ee-google-analytics.js'; ?>";
710
  document.getElementsByTagName('head')[0].appendChild(script);*/
711
+ ?>
712
+ <script>
713
+ window.addEventListener('load', call_thnkyou_page,true);
714
+ function call_thnkyou_page(){
715
+ tvc_js = new TVC_Enhanced(<?php echo json_encode($this->tvc_options); ?>);
716
+ tvc_js.thnkyou_page(<?php echo json_encode($orderpage_prod_Array); ?>, <?php echo json_encode($orderpage_trans_Array); ?>, "+<?php echo $order->get_status(); ?>+", <?php echo time(); ?>);
717
  }
718
  </script>
719
  <?php
1665
  }
1666
  }
1667
 
1668
+ /**
1669
+ * Get oredered Items for check out page.
1670
+ *
1671
+ * @access public
1672
+ * @return void
1673
+ */
1674
+ public function get_ordered_items(){
1675
+ global $woocommerce;
1676
+ $code = "";
1677
+ //get all items added into the cart
1678
+ foreach ($woocommerce->cart->cart_contents as $item) {
1679
+ //Version Compare
1680
+ if ( version_compare($woocommerce->version, "2.7", "<")) {
1681
+ $p = get_product($item["product_id"]);
1682
+ } else {
1683
+ $p = wc_get_product($item["product_id"]);
1684
+ }
1685
 
1686
+ $category = get_the_terms($item["product_id"], "product_cat");
1687
+ $categories = "";
1688
+ if ($category) {
1689
+ foreach ($category as $term) {
1690
+ $categories.=$term->name . ",";
1691
+ }
1692
+ }
1693
+ //remove last comma(,) if multiple categories are there
1694
+ $categories = rtrim($categories, ",");
1695
+ if(version_compare($woocommerce->version, "2.7", "<")){
1696
+ $chkout_json[get_permalink($p->ID)] = array(
1697
+ "tvc_id" => esc_html($p->ID),
1698
+ "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->ID),
1699
+ "tvc_n" => html_entity_decode($p->get_title()),
1700
+ "tvc_p" => esc_js($p->get_price()),
1701
+ "tvc_c" => $categories,
1702
+ "tvc_q" => esc_js($item["quantity"]),
1703
+ "isfeatured"=>$p->is_featured()
1704
+ );
1705
+ }else{
1706
+ $chkout_json[get_permalink($p->get_id())] = array(
1707
+ "tvc_id" => esc_html($p->get_id()),
1708
+ "tvc_i" => esc_js($p->get_sku() ? $p->get_sku() : $p->get_id()),
1709
+ "tvc_n" => html_entity_decode($p->get_title()),
1710
+ "tvc_p" => esc_js($p->get_price()),
1711
+ "tvc_c" => $categories,
1712
+ "tvc_q" => esc_js($item["quantity"]),
1713
+ "isfeatured"=>$p->is_featured()
1714
+ );
 
1715
  }
 
 
 
1716
  }
1717
+ //return $code;
1718
+ //make product data json on check out page
1719
+ $this->wc_version_compare("tvc_ch=" . json_encode($chkout_json) . ";");
1720
+ }
1721
+ }
public/class-enhanced-ecommerce-google-analytics-public.php CHANGED
@@ -28,11 +28,8 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
28
  * @return void
29
  */
30
  //set plugin version
31
- public $tvc_eeVer = PLUGIN_TVC_VERSION;
32
- /**
33
- * @var mixed $tvc_aga
34
- */
35
- protected $tvc_aga;
36
  /**
37
  * @var mixed $ga_id
38
  */
@@ -73,14 +70,7 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
73
  * @var bool $ga_IPA
74
  */
75
  protected $ga_IPA;
76
- /**
77
- * @var mixed $enhanced_e_commerce_tracking
78
- */
79
- protected $enhanced_e_commerce_tracking;
80
- /**
81
- * @var mixed $add_gtag_snippet
82
- */
83
- protected $add_gtag_snippet;
84
  /**
85
  * @var mixed $gm_id
86
  */
@@ -118,31 +108,26 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
118
  $this->version = $version;
119
  $this->tvc_call_hooks();
120
 
121
- $this->tvc_aga = $this->get_option("tvc_aga");
122
- $this->ga_id = $this->get_option("ga_id");
123
- $this->ga_eeT = $this->get_option("ga_eeT");
124
- $this->enhanced_e_commerce_tracking = $this->get_option("enhanced_e_commerce_tracking");
125
  $this->ga_ST = $this->get_option("ga_ST"); //add_gtag_snippet
126
- $this->add_gtag_snippet = $this->get_option("add_gtag_snippet"); //add_gtag_snippet
127
- $this->gm_id = $this->get_option("gm_id"); //measurement_id
128
- $this->google_ads_id = $this->get_option("google_ads_id");
129
- $this->ga_excT = $this->get_option("ga_excT"); //exception_tracking
130
- $this->exception_tracking = $this->get_option("exception_tracking"); //exception_tracking
131
- $this->ga_elaT = $this->get_option("ga_elaT"); //enhanced_link_attribution_tracking
132
- $this->google_merchant_id = $this->get_option("google_merchant_id");
133
- $this->tracking_option = $this->get_option("tracking_option");
134
- $this->ga_gCkout = $this->get_option("ga_gCkout") == "on" ? true : false; //guest checkout
135
- $this->ga_gUser = $this->get_option("ga_gUser") == "on" ? true : false; //guest checkout
136
- $this->ga_DF = $this->get_option("ga_DF") == "on" ? true : false;
137
- $this->ga_imTh = $this->get_option("ga_Impr") == "" ? 6 : $this->get_option("ga_Impr");
138
- $this->ga_OPTOUT = $this->get_option("ga_OPTOUT") == "on" ? true : false; //Google Analytics Opt Out
139
- $this->ga_PrivacyPolicy = $this->get_option("ga_PrivacyPolicy") == "on" ? true : false;
140
- $this->ga_IPA = $this->get_option("ga_IPA") == "on" ? true : false; //IP Anony.
141
  $this->ads_ert = get_option('ads_ert'); //Enable remarketing tags
142
  $this->ads_edrt = get_option('ads_edrt'); //Enable dynamic remarketing tags
143
- $this->ads_tracking_id = get_option('ads_tracking_id');
144
- $this->ads_ert = get_option('ads_ert');
145
- $this->ads_edrt = get_option('ads_edrt');
146
 
147
  $remarketing = unserialize(get_option('ee_remarketing_snippets'));
148
  if(!empty($remarketing) && isset($remarketing['snippets']) && $remarketing['snippets']){
@@ -210,33 +195,33 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
210
  $sub_data = array();
211
  if(isset($google_detail['setting'])){
212
  $googleDetail = $google_detail['setting'];
213
- $sub_data['sub_id'] = isset($googleDetail->id)?$googleDetail->id:"";
214
- $sub_data['cu_id']=isset($googleDetail->customer_id)?$googleDetail->customer_id:"";
215
- $sub_data['pl_id']=isset($googleDetail->plan_id)?$googleDetail->plan_id:"";
216
- $sub_data['ga_tra_option']=isset($googleDetail->tracking_option)?$googleDetail->tracking_option:"";
217
- $sub_data['ga_property_id']=isset($googleDetail->property_id)?$googleDetail->property_id:"";
218
- $sub_data['ga_measurement_id']=isset($googleDetail->measurement_id)?$googleDetail->measurement_id:"";
219
- $sub_data['ga_ads_id']=isset($googleDetail->google_ads_id)?$googleDetail->google_ads_id:"";
220
- $sub_data['ga_gmc_id']=isset($googleDetail->google_merchant_center_id)?$googleDetail->google_merchant_center_id:"";
221
- $sub_data['op_gtag_js']=isset($googleDetail->add_gtag_snippet)?$googleDetail->add_gtag_snippet:"";
222
- $sub_data['op_en_e_t']=isset($googleDetail->enhanced_e_commerce_tracking)?$googleDetail->enhanced_e_commerce_tracking:"";
223
- $sub_data['op_rm_t_t']=isset($googleDetail->remarketing_tags)?$googleDetail->remarketing_tags:"";
224
- $sub_data['op_dy_rm_t_t']=isset($googleDetail->dynamic_remarketing_tags)?$googleDetail->dynamic_remarketing_tags:"";
225
- $sub_data['op_li_ga_wi_ads']=isset($googleDetail->link_google_analytics_with_google_ads)?$googleDetail->link_google_analytics_with_google_ads:"";
226
- $sub_data['gmc_is_product_sync']=isset($googleDetail->is_product_sync)?$googleDetail->is_product_sync:"";
227
- $sub_data['gmc_is_site_verified']=isset($googleDetail->is_site_verified)?$googleDetail->is_site_verified:"";
228
- $sub_data['gmc_is_domain_claim']=isset($googleDetail->is_domain_claim)?$googleDetail->is_domain_claim:"";
229
- $sub_data['gmc_product_count']=isset($googleDetail->product_count)?$googleDetail->product_count:"";
230
  }
231
  $tvc_sMetaData = array(
232
- 'tvc_wcv' => $woocommerce->version,
233
- 'tvc_wpv' => get_bloginfo('version'),
234
  'tvc_eev' => $this->tvc_eeVer,
235
  'tvc_cnf' => array(
236
  't_ee' => $this->ga_eeT,
237
  't_df' => $this->ga_DF,
238
- 't_gUser'=>$this->ga_gUser,
239
- 't_UAen'=>$this->ga_ST,
240
  't_thr' => $this->ga_imTh,
241
  't_IPA' => $this->ga_IPA,
242
  't_OptOut' => $this->ga_OPTOUT,
@@ -1781,4 +1766,4 @@ class Enhanced_Ecommerce_Google_Analytics_Public {
1781
  //make product data json on check out page
1782
  $this->wc_version_compare("tvc_ch=" . json_encode($chkout_json) . ";");
1783
  }
1784
- }
28
  * @return void
29
  */
30
  //set plugin version
31
+ public $tvc_eeVer = PLUGIN_TVC_VERSION;
32
+
 
 
 
33
  /**
34
  * @var mixed $ga_id
35
  */
70
  * @var bool $ga_IPA
71
  */
72
  protected $ga_IPA;
73
+
 
 
 
 
 
 
 
74
  /**
75
  * @var mixed $gm_id
76
  */
108
  $this->version = $version;
109
  $this->tvc_call_hooks();
110
 
111
+ $this->ga_id = sanitize_text_field($this->get_option("ga_id"));
112
+ $this->ga_eeT = sanitize_text_field($this->get_option("ga_eeT"));
 
 
113
  $this->ga_ST = $this->get_option("ga_ST"); //add_gtag_snippet
114
+ $this->gm_id = sanitize_text_field($this->get_option("gm_id")); //measurement_id
115
+ $this->google_ads_id = sanitize_text_field($this->get_option("google_ads_id"));
116
+ $this->ga_excT = sanitize_text_field($this->get_option("ga_excT")); //exception_tracking
117
+ $this->exception_tracking = sanitize_text_field($this->get_option("exception_tracking")); //exception_tracking
118
+ $this->ga_elaT = sanitize_text_field($this->get_option("ga_elaT")); //enhanced_link_attribution_tracking
119
+ $this->google_merchant_id = sanitize_text_field($this->get_option("google_merchant_id"));
120
+ $this->tracking_option = sanitize_text_field($this->get_option("tracking_option"));
121
+ $this->ga_gCkout = sanitize_text_field($this->get_option("ga_gCkout") == "on" ? true : false); //guest checkout
122
+ $this->ga_gUser = sanitize_text_field($this->get_option("ga_gUser") == "on" ? true : false); //guest checkout
123
+ $this->ga_DF = sanitize_text_field($this->get_option("ga_DF") == "on" ? true : false);
124
+ $this->ga_imTh = sanitize_text_field($this->get_option("ga_Impr") == "" ? 6 : $this->get_option("ga_Impr"));
125
+ $this->ga_OPTOUT = sanitize_text_field($this->get_option("ga_OPTOUT") == "on" ? true : false); //Google Analytics Opt Out
126
+ $this->ga_PrivacyPolicy = sanitize_text_field($this->get_option("ga_PrivacyPolicy") == "on" ? true : false);
127
+ $this->ga_IPA = sanitize_text_field($this->get_option("ga_IPA") == "on" ? true : false); //IP Anony.
 
128
  $this->ads_ert = get_option('ads_ert'); //Enable remarketing tags
129
  $this->ads_edrt = get_option('ads_edrt'); //Enable dynamic remarketing tags
130
+ $this->ads_tracking_id = sanitize_text_field(get_option('ads_tracking_id'));
 
 
131
 
132
  $remarketing = unserialize(get_option('ee_remarketing_snippets'));
133
  if(!empty($remarketing) && isset($remarketing['snippets']) && $remarketing['snippets']){
195
  $sub_data = array();
196
  if(isset($google_detail['setting'])){
197
  $googleDetail = $google_detail['setting'];
198
+ $sub_data['sub_id'] = sanitize_text_field(isset($googleDetail->id)?$googleDetail->id:"");
199
+ $sub_data['cu_id']=sanitize_text_field(isset($googleDetail->customer_id)?$googleDetail->customer_id:"");
200
+ $sub_data['pl_id']=sanitize_text_field(isset($googleDetail->plan_id)?$googleDetail->plan_id:"");
201
+ $sub_data['ga_tra_option']=sanitize_text_field(isset($googleDetail->tracking_option)?$googleDetail->tracking_option:"");
202
+ $sub_data['ga_property_id']=sanitize_text_field(isset($googleDetail->property_id)?$googleDetail->property_id:"");
203
+ $sub_data['ga_measurement_id']=sanitize_text_field(isset($googleDetail->measurement_id)?$googleDetail->measurement_id:"");
204
+ $sub_data['ga_ads_id']=sanitize_text_field(isset($googleDetail->google_ads_id)?$googleDetail->google_ads_id:"");
205
+ $sub_data['ga_gmc_id']= sanitize_text_field(isset($googleDetail->google_merchant_center_id)?$googleDetail->google_merchant_center_id:"");
206
+ $sub_data['op_gtag_js']=sanitize_text_field(isset($googleDetail->add_gtag_snippet)?$googleDetail->add_gtag_snippet:"");
207
+ $sub_data['op_en_e_t']=sanitize_text_field(isset($googleDetail->enhanced_e_commerce_tracking)?$googleDetail->enhanced_e_commerce_tracking:"");
208
+ $sub_data['op_rm_t_t']=sanitize_text_field(isset($googleDetail->remarketing_tags)?$googleDetail->remarketing_tags:"");
209
+ $sub_data['op_dy_rm_t_t']=sanitize_text_field(isset($googleDetail->dynamic_remarketing_tags)?$googleDetail->dynamic_remarketing_tags:"");
210
+ $sub_data['op_li_ga_wi_ads']=sanitize_text_field(isset($googleDetail->link_google_analytics_with_google_ads)?$googleDetail->link_google_analytics_with_google_ads:"");
211
+ $sub_data['gmc_is_product_sync']=sanitize_text_field(isset($googleDetail->is_product_sync)?$googleDetail->is_product_sync:"");
212
+ $sub_data['gmc_is_site_verified']=sanitize_text_field(isset($googleDetail->is_site_verified)?$googleDetail->is_site_verified:"");
213
+ $sub_data['gmc_is_domain_claim']=sanitize_text_field(isset($googleDetail->is_domain_claim)?$googleDetail->is_domain_claim:"");
214
+ $sub_data['gmc_product_count']=sanitize_text_field(isset($googleDetail->product_count)?$googleDetail->product_count:"");
215
  }
216
  $tvc_sMetaData = array(
217
+ 'tvc_wcv' => sanitize_text_field($woocommerce->version),
218
+ 'tvc_wpv' => sanitize_text_field(get_bloginfo('version')),
219
  'tvc_eev' => $this->tvc_eeVer,
220
  'tvc_cnf' => array(
221
  't_ee' => $this->ga_eeT,
222
  't_df' => $this->ga_DF,
223
+ 't_gUser' => $this->ga_gUser,
224
+ 't_UAen' => $this->ga_ST,
225
  't_thr' => $this->ga_imTh,
226
  't_IPA' => $this->ga_IPA,
227
  't_OptOut' => $this->ga_OPTOUT,
1766
  //make product data json on check out page
1767
  $this->wc_version_compare("tvc_ch=" . json_encode($chkout_json) . ";");
1768
  }
1769
+ }
readme.txt CHANGED
@@ -8,8 +8,8 @@ Author: Tatvic
8
  Requires at least: 1.4.1
9
  Tested up to: 5.8.2
10
  Requires PHP: 5.6 or Higher
11
- Stable tag: 4.4.1
12
- Version: 4.4.1
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
@@ -380,6 +380,14 @@ You can resolve the duplication of data by removing the manually implemented GA
380
 
381
  == Changelog ==
382
 
 
 
 
 
 
 
 
 
383
  = 4.4.1 - 15/11/2021 =
384
 
385
  * Earlier, agency owners having multiple Google analytics accounts associated with a single email id used to face issues in loading all the Google analytics accounts on the onboarding screen. We have added load more capability in order to provide smooth user experience
8
  Requires at least: 1.4.1
9
  Tested up to: 5.8.2
10
  Requires PHP: 5.6 or Higher
11
+ Stable tag: 4.5.0
12
+ Version: 4.5.0
13
  License: GPLv3
14
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
15
 
380
 
381
  == Changelog ==
382
 
383
+ = 4.5.0 - 07/12/2021 =
384
+
385
+ * In this release, we have focused on code optimization and performance improvement.
386
+
387
+ * Custom atributes read from JSON file issue got fixed.
388
+
389
+ * Improvements in product feed sync feature.
390
+
391
  = 4.4.1 - 15/11/2021 =
392
 
393
  * Earlier, agency owners having multiple Google analytics accounts associated with a single email id used to face issues in loading all the Google analytics accounts on the onboarding screen. We have added load more capability in order to provide smooth user experience