YITH WooCommerce Catalog Mode - Version 1.0.9

Version Description

  • Fixed: YITH WooCommerce Colors and Labels Variations compatibility
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Catalog Mode
Version 1.0.9
Comparing to
See all releases

Code changes from version 1.0.8 to 1.0.9

assets/images/07-icon.png ADDED
Binary file
assets/images/07.png ADDED
Binary file
class.yith-woocommerce-catalog-mode.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  } // Exit if accessed directly
6
 
@@ -48,7 +48,7 @@ class YITH_WC_Catalog_Mode {
48
  * @author Alberto Ruggiero
49
  */
50
  public function __construct() {
51
- if ( ! function_exists( 'WC' ) ) {
52
  return;
53
  }
54
 
@@ -67,12 +67,12 @@ class YITH_WC_Catalog_Mode {
67
  add_action( 'admin_menu', array( $this, 'add_menu_page' ), 5 );
68
  add_action( 'yith_catalog_mode_premium', array( $this, 'premium_tab' ) );
69
 
70
- if ( get_option( 'ywctm_enable_plugin' ) == 'yes' ){
71
 
72
- if ( $this->check_user_admin_enable() ){
73
 
74
- if ( ! is_admin() || $this->is_quick_view() ) {
75
- if( get_option( 'ywctm_hide_cart_header' ) == 'yes' ){
76
 
77
  $priority = has_action( 'wp_loaded', array( 'WC_Form_Handler', 'add_to_cart_action' ) );
78
  remove_action( 'wp_loaded', array( 'WC_Form_Handler', 'add_to_cart_action' ), $priority );
@@ -104,7 +104,7 @@ class YITH_WC_Catalog_Mode {
104
  */
105
  public function check_user_admin_enable() {
106
 
107
- return !( current_user_can( 'administrator' ) && is_user_logged_in() && get_option( 'ywctm_admin_view' ) == 'no' );
108
 
109
  }
110
 
@@ -117,7 +117,7 @@ class YITH_WC_Catalog_Mode {
117
  */
118
  public function check_hide_cart_checkout_pages() {
119
 
120
- return get_option( 'ywctm_enable_plugin' ) == 'yes' && $this->check_user_admin_enable() && get_option('ywctm_hide_cart_header') == 'yes';
121
 
122
  }
123
 
@@ -130,73 +130,51 @@ class YITH_WC_Catalog_Mode {
130
  */
131
  public function hide_add_to_cart_single( $action = 'woocommerce_single_product_summary' ) {
132
 
133
- global $product;
134
-
135
  $priority = has_action( $action, 'woocommerce_template_single_add_to_cart' );
136
 
137
  if ( $this->check_add_to_cart_single( $priority ) ) {
138
 
139
- $hide_variations = get_option( 'ywctm_hide_variations' );
140
-
141
- if ( isset( $product ) && $product->product_type == 'variable' && ( $hide_variations == 'no' || $hide_variations == '' ) ) {
142
-
143
- $inline_js = "
144
- $( '.single_variation_wrap .variations_button' ).hide();
145
- $( document).on( 'woocommerce_variation_has_changed', function() {
146
- $( '.single_variation_wrap .variations_button' ).hide();
147
- });
148
- ";
149
- } else {
150
 
151
- //remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', $priority );
152
 
153
- $inline_js = "$( 'form.cart button.single_add_to_cart_button' ).hide();";
154
 
155
- if ( !class_exists( 'YITH_YWRAQ_Frontend' ) ) {
156
 
157
- $inline_js .= "$( 'form.cart .quantity' ).hide();";
158
- }
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
 
161
- if( $this->is_quick_view() ) {
162
- add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'hide_add_to_cart_quick_view' ) );
163
- }
164
- else {
165
- wc_enqueue_js( $inline_js );
166
- }
167
 
168
- }
 
 
 
169
 
170
  }
171
 
172
-
173
- /**
174
- * Hide add to cart button in quick view
175
- *
176
- */
177
- public function hide_add_to_cart_quick_view() {
178
- ob_start();
179
- ?>
180
- <style>
181
- form.cart button.single_add_to_cart_button,
182
- .single_variation_wrap .variations_button {
183
- display: none !important;
184
- }
185
- <?php if( ! class_exists( 'YITH_YWRAQ_Frontend' ) ) : ?>
186
- form.cart .quantity {
187
- display: none !important;
188
- }
189
- <?php endif; ?>
190
- </style>
191
- <?php
192
- echo ob_get_clean();
193
- }
194
-
195
  /**
196
  * Check if price is hidden to hide add to cart button
197
  *
198
  * @since 1.0.4
 
199
  * @param $post_id
 
200
  * @author Alberto Ruggiero
201
  * @return bool
202
  */
@@ -207,18 +185,19 @@ class YITH_WC_Catalog_Mode {
207
  if ( get_option( 'ywctm_hide_price' ) == 'yes' ) {
208
 
209
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
210
- $user_logged = is_user_logged_in();
211
 
212
- if ( ! ( ! $ywctm_hide_price_users && $user_logged ) ) {
213
 
214
- $exclude_catalog = get_post_meta( $post_id, '_ywctm_exclude_hide_price', true );
215
- $enable_exclusion = get_option( 'ywctm_exclude_hide_price' );
216
 
217
  if ( $enable_exclusion == '' || $enable_exclusion == 'no' ) {
218
 
219
  $hide = true;
220
 
221
- } else {
 
222
 
223
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
224
 
@@ -232,10 +211,10 @@ class YITH_WC_Catalog_Mode {
232
 
233
  if ( $reverse_criteria == 'yes' ) {
234
 
235
- $hide = ! $hide;
236
 
237
  }
238
-
239
  }
240
 
241
  }
@@ -249,8 +228,10 @@ class YITH_WC_Catalog_Mode {
249
  *
250
  * @since 1.0.2
251
  * @author Alberto Ruggiero
 
252
  * @param $priority
253
  * @param $product_id
 
254
  * @return bool
255
  */
256
  public function check_add_to_cart_single( $priority = true, $product_id = false ) {
@@ -263,18 +244,23 @@ class YITH_WC_Catalog_Mode {
263
 
264
  $hide = true;
265
 
266
- } else {
 
267
 
268
  global $post;
269
 
 
 
 
 
270
  $post_id = ( $product_id ) ? $product_id : $post->ID;
271
 
272
  if ( get_option( 'ywctm_hide_add_to_cart_single' ) == 'yes' ) {
273
 
274
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
275
- $user_logged = is_user_logged_in();
276
 
277
- if ( ! ( ! $ywctm_hide_price_users && $user_logged ) ) {
278
 
279
  $exclude_catalog = get_post_meta( $post_id, '_ywctm_exclude_catalog_mode', true );
280
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
@@ -285,7 +271,8 @@ class YITH_WC_Catalog_Mode {
285
 
286
  $hide = true;
287
 
288
- } else {
 
289
 
290
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
291
 
@@ -304,7 +291,7 @@ class YITH_WC_Catalog_Mode {
304
 
305
  if ( $reverse_criteria == 'yes' ) {
306
 
307
- $hide = ! $hide;
308
 
309
  }
310
 
@@ -326,8 +313,10 @@ class YITH_WC_Catalog_Mode {
326
  *
327
  * @since 1.0.5
328
  * @author Alberto Ruggiero
 
329
  * @param $passed
330
  * @param $product_id
 
331
  * @return bool
332
  */
333
  public function avoid_add_to_cart( $passed, $product_id ) {
@@ -338,14 +327,15 @@ class YITH_WC_Catalog_Mode {
338
 
339
  $passed = false;
340
 
341
- } else {
 
342
 
343
  if ( get_option( 'ywctm_hide_add_to_cart_single' ) == 'yes' ) {
344
 
345
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
346
- $user_logged = is_user_logged_in();
347
 
348
- if ( ! ( ! $ywctm_hide_price_users && $user_logged ) ) {
349
 
350
  $exclude_catalog = get_post_meta( $product_id, '_ywctm_exclude_catalog_mode', true );
351
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
@@ -354,7 +344,8 @@ class YITH_WC_Catalog_Mode {
354
 
355
  $passed = false;
356
 
357
- } else {
 
358
 
359
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
360
 
@@ -372,7 +363,7 @@ class YITH_WC_Catalog_Mode {
372
 
373
  if ( $reverse_criteria == 'yes' ) {
374
 
375
- $passed = ! $passed;
376
 
377
  }
378
 
@@ -404,16 +395,17 @@ class YITH_WC_Catalog_Mode {
404
 
405
  $remove = true;
406
 
407
- } else {
 
408
 
409
  global $post;
410
 
411
  if ( get_option( 'ywctm_hide_add_to_cart_loop' ) == 'yes' ) {
412
 
413
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
414
- $user_logged = is_user_logged_in();
415
 
416
- if ( ! ( ! $ywctm_hide_price_users && $user_logged ) ) {
417
 
418
  $exclude_catalog = get_post_meta( $post->ID, '_ywctm_exclude_catalog_mode', true );
419
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
@@ -422,13 +414,15 @@ class YITH_WC_Catalog_Mode {
422
 
423
  $remove = true;
424
 
425
- } else {
 
426
 
427
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
428
 
429
  $remove = true;
430
 
431
- } else {
 
432
 
433
  $remove = false;
434
 
@@ -444,7 +438,7 @@ class YITH_WC_Catalog_Mode {
444
 
445
  if ( $reverse_criteria == 'yes' ) {
446
 
447
- $remove = ! $remove;
448
 
449
  }
450
 
@@ -476,12 +470,13 @@ class YITH_WC_Catalog_Mode {
476
  */
477
  public function hide_add_to_cart_loop() {
478
 
479
- if ( $this->check_hide_add_cart_loop() ){
480
 
481
  remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
482
  add_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
483
 
484
- } else {
 
485
 
486
  add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
487
  remove_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
@@ -515,12 +510,12 @@ class YITH_WC_Catalog_Mode {
515
 
516
  if ( get_option( 'ywctm_hide_cart_header' ) == 'yes' ) {
517
 
518
- $cart = get_option( 'woocommerce_cart_page_id' );
519
- $checkout = get_option( 'woocommerce_checkout_page_id' );
520
 
521
  wp_reset_query();
522
 
523
- if( is_page( $cart ) || is_page( $checkout ) ) {
524
 
525
  wp_redirect( home_url() );
526
  exit;
@@ -536,7 +531,9 @@ class YITH_WC_Catalog_Mode {
536
  * Removes Cart and checkout pages from menu
537
  *
538
  * @since 1.0.4
 
539
  * @param $pages
 
540
  * @author Alberto Ruggiero
541
  * @return mixed
542
  */
@@ -549,12 +546,12 @@ class YITH_WC_Catalog_Mode {
549
  get_option( 'woocommerce_checkout_page_id' )
550
  );
551
 
552
- for ( $i = 0; $i < count( $pages ); $i++ ) {
553
- $page = & $pages[ $i ];
554
 
555
  if ( in_array( $page->ID, $excluded_pages ) ) {
556
 
557
- unset( $pages[ $i ] );
558
 
559
  }
560
 
@@ -575,7 +572,7 @@ class YITH_WC_Catalog_Mode {
575
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
576
  */
577
  public function plugin_fw_loader() {
578
- if ( ! defined( 'YIT' ) || ! defined( 'YIT_CORE_PLUGIN' ) ) {
579
  require_once( 'plugin-fw/yit-plugin.php' );
580
  }
581
  }
@@ -586,22 +583,23 @@ class YITH_WC_Catalog_Mode {
586
  * @return void
587
  * @since 1.0
588
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
589
- * @use /Yit_Plugin_Panel class
590
  * @see plugin-fw/lib/yit-plugin-panel.php
591
  */
592
  public function add_menu_page() {
593
- if ( ! empty( $this->_panel ) ) {
594
  return;
595
  }
596
 
597
  $admin_tabs = array(
598
- 'settings' => __( 'Settings', 'ywctm' ),
599
  );
600
 
601
  if ( defined( 'YWCTM_PREMIUM' ) ) {
602
- $admin_tabs['premium'] = __( 'Premium Settings', 'ywctm' );
603
  $admin_tabs['exclusions'] = __( 'Exclusion List', 'ywctm' );
604
- } else {
 
605
  $admin_tabs['premium-landing'] = __( 'Premium Version', 'ywctm' );
606
  }
607
 
@@ -644,7 +642,7 @@ class YITH_WC_Catalog_Mode {
644
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
645
  * @return string The premium landing link
646
  */
647
- public function get_premium_landing_uri(){
648
  return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
649
  }
650
 
@@ -659,7 +657,7 @@ class YITH_WC_Catalog_Mode {
659
  * @since 1.0
660
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
661
  * @return mixed
662
- * @use plugin_action_links_{$plugin_file_name}
663
  */
664
  public function action_links( $links ) {
665
 
@@ -685,7 +683,7 @@ class YITH_WC_Catalog_Mode {
685
  * @return Array
686
  * @since 1.0
687
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
688
- * @use plugin_row_meta
689
  */
690
  public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
691
  if ( ( defined( 'YWCTM_INIT' ) && ( YWCTM_INIT == $plugin_file ) ) ||
@@ -701,14 +699,13 @@ class YITH_WC_Catalog_Mode {
701
  /**
702
  *
703
  * say if the code is execute by quick view
704
-
705
  *
706
  * @return bool
707
  * @since 1.0.7
708
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
709
  */
710
  public function is_quick_view() {
711
- return defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST[ 'action' ] ) && ( $_REQUEST[ 'action' ] == 'yith_load_product_quick_view' || $_REQUEST[ 'action' ] == 'yit_load_product_quick_view' );
712
  }
713
 
714
  }
1
  <?php
2
 
3
+ if ( !defined( 'ABSPATH' ) ) {
4
  exit;
5
  } // Exit if accessed directly
6
 
48
  * @author Alberto Ruggiero
49
  */
50
  public function __construct() {
51
+ if ( !function_exists( 'WC' ) ) {
52
  return;
53
  }
54
 
67
  add_action( 'admin_menu', array( $this, 'add_menu_page' ), 5 );
68
  add_action( 'yith_catalog_mode_premium', array( $this, 'premium_tab' ) );
69
 
70
+ if ( get_option( 'ywctm_enable_plugin' ) == 'yes' ) {
71
 
72
+ if ( $this->check_user_admin_enable() ) {
73
 
74
+ if ( !is_admin() || $this->is_quick_view() ) {
75
+ if ( get_option( 'ywctm_hide_cart_header' ) == 'yes' ) {
76
 
77
  $priority = has_action( 'wp_loaded', array( 'WC_Form_Handler', 'add_to_cart_action' ) );
78
  remove_action( 'wp_loaded', array( 'WC_Form_Handler', 'add_to_cart_action' ), $priority );
104
  */
105
  public function check_user_admin_enable() {
106
 
107
+ return !( current_user_can( 'administrator' ) && is_user_logged_in() && get_option( 'ywctm_admin_view' ) == 'no' );
108
 
109
  }
110
 
117
  */
118
  public function check_hide_cart_checkout_pages() {
119
 
120
+ return get_option( 'ywctm_enable_plugin' ) == 'yes' && $this->check_user_admin_enable() && get_option( 'ywctm_hide_cart_header' ) == 'yes';
121
 
122
  }
123
 
130
  */
131
  public function hide_add_to_cart_single( $action = 'woocommerce_single_product_summary' ) {
132
 
 
 
133
  $priority = has_action( $action, 'woocommerce_template_single_add_to_cart' );
134
 
135
  if ( $this->check_add_to_cart_single( $priority ) ) {
136
 
137
+ add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'hide_add_to_cart_quick_view' ), 10 );
 
 
 
 
 
 
 
 
 
 
138
 
139
+ }
140
 
141
+ }
142
 
 
143
 
144
+ /**
145
+ * Hide add to cart button in quick view
146
+ *
147
+ */
148
+ public function hide_add_to_cart_quick_view() {
149
+
150
+ $hide_variations = get_option( 'ywctm_hide_variations' );
151
+ ob_start();
152
+ ?>
153
+ <style>
154
+ form.cart button.single_add_to_cart_button <?php if ($hide_variations=='yes'): ?>,
155
+ .single_variation_wrap .variations_button <?php endif; ?> {
156
+ display: none !important;
157
  }
158
 
159
+ <?php if( ! class_exists( 'YITH_YWRAQ_Frontend' ) ) : ?>
160
+ form.cart .quantity {
161
+ display: none !important;
162
+ }
 
 
163
 
164
+ <?php endif; ?>
165
+ </style>
166
+ <?php
167
+ echo ob_get_clean();
168
 
169
  }
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  /**
172
  * Check if price is hidden to hide add to cart button
173
  *
174
  * @since 1.0.4
175
+ *
176
  * @param $post_id
177
+ *
178
  * @author Alberto Ruggiero
179
  * @return bool
180
  */
185
  if ( get_option( 'ywctm_hide_price' ) == 'yes' ) {
186
 
187
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
188
+ $user_logged = is_user_logged_in();
189
 
190
+ if ( !( !$ywctm_hide_price_users && $user_logged ) ) {
191
 
192
+ $exclude_catalog = get_post_meta( $post_id, '_ywctm_exclude_hide_price', true );
193
+ $enable_exclusion = get_option( 'ywctm_exclude_hide_price' );
194
 
195
  if ( $enable_exclusion == '' || $enable_exclusion == 'no' ) {
196
 
197
  $hide = true;
198
 
199
+ }
200
+ else {
201
 
202
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
203
 
211
 
212
  if ( $reverse_criteria == 'yes' ) {
213
 
214
+ $hide = !$hide;
215
 
216
  }
217
+
218
  }
219
 
220
  }
228
  *
229
  * @since 1.0.2
230
  * @author Alberto Ruggiero
231
+ *
232
  * @param $priority
233
  * @param $product_id
234
+ *
235
  * @return bool
236
  */
237
  public function check_add_to_cart_single( $priority = true, $product_id = false ) {
244
 
245
  $hide = true;
246
 
247
+ }
248
+ else {
249
 
250
  global $post;
251
 
252
+ if ( !$product_id && !isset( $post ) ) {
253
+ return false;
254
+ }
255
+
256
  $post_id = ( $product_id ) ? $product_id : $post->ID;
257
 
258
  if ( get_option( 'ywctm_hide_add_to_cart_single' ) == 'yes' ) {
259
 
260
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
261
+ $user_logged = is_user_logged_in();
262
 
263
+ if ( !( !$ywctm_hide_price_users && $user_logged ) ) {
264
 
265
  $exclude_catalog = get_post_meta( $post_id, '_ywctm_exclude_catalog_mode', true );
266
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
271
 
272
  $hide = true;
273
 
274
+ }
275
+ else {
276
 
277
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
278
 
291
 
292
  if ( $reverse_criteria == 'yes' ) {
293
 
294
+ $hide = !$hide;
295
 
296
  }
297
 
313
  *
314
  * @since 1.0.5
315
  * @author Alberto Ruggiero
316
+ *
317
  * @param $passed
318
  * @param $product_id
319
+ *
320
  * @return bool
321
  */
322
  public function avoid_add_to_cart( $passed, $product_id ) {
327
 
328
  $passed = false;
329
 
330
+ }
331
+ else {
332
 
333
  if ( get_option( 'ywctm_hide_add_to_cart_single' ) == 'yes' ) {
334
 
335
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
336
+ $user_logged = is_user_logged_in();
337
 
338
+ if ( !( !$ywctm_hide_price_users && $user_logged ) ) {
339
 
340
  $exclude_catalog = get_post_meta( $product_id, '_ywctm_exclude_catalog_mode', true );
341
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
344
 
345
  $passed = false;
346
 
347
+ }
348
+ else {
349
 
350
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
351
 
363
 
364
  if ( $reverse_criteria == 'yes' ) {
365
 
366
+ $passed = !$passed;
367
 
368
  }
369
 
395
 
396
  $remove = true;
397
 
398
+ }
399
+ else {
400
 
401
  global $post;
402
 
403
  if ( get_option( 'ywctm_hide_add_to_cart_loop' ) == 'yes' ) {
404
 
405
  $ywctm_hide_price_users = ( get_option( 'ywctm_hide_price_users' ) != 'unregistered' ) ? true : false;
406
+ $user_logged = is_user_logged_in();
407
 
408
+ if ( !( !$ywctm_hide_price_users && $user_logged ) ) {
409
 
410
  $exclude_catalog = get_post_meta( $post->ID, '_ywctm_exclude_catalog_mode', true );
411
  $enable_exclusion = get_option( 'ywctm_exclude_hide_add_to_cart' );
414
 
415
  $remove = true;
416
 
417
+ }
418
+ else {
419
 
420
  if ( $exclude_catalog == '' || $exclude_catalog == 'no' ) {
421
 
422
  $remove = true;
423
 
424
+ }
425
+ else {
426
 
427
  $remove = false;
428
 
438
 
439
  if ( $reverse_criteria == 'yes' ) {
440
 
441
+ $remove = !$remove;
442
 
443
  }
444
 
470
  */
471
  public function hide_add_to_cart_loop() {
472
 
473
+ if ( $this->check_hide_add_cart_loop() ) {
474
 
475
  remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
476
  add_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
477
 
478
+ }
479
+ else {
480
 
481
  add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
482
  remove_filter( 'woocommerce_loop_add_to_cart_link', '__return_empty_string', 10 );
510
 
511
  if ( get_option( 'ywctm_hide_cart_header' ) == 'yes' ) {
512
 
513
+ $cart = get_option( 'woocommerce_cart_page_id' );
514
+ $checkout = get_option( 'woocommerce_checkout_page_id' );
515
 
516
  wp_reset_query();
517
 
518
+ if ( is_page( $cart ) || is_page( $checkout ) ) {
519
 
520
  wp_redirect( home_url() );
521
  exit;
531
  * Removes Cart and checkout pages from menu
532
  *
533
  * @since 1.0.4
534
+ *
535
  * @param $pages
536
+ *
537
  * @author Alberto Ruggiero
538
  * @return mixed
539
  */
546
  get_option( 'woocommerce_checkout_page_id' )
547
  );
548
 
549
+ for ( $i = 0; $i < count( $pages ); $i ++ ) {
550
+ $page = &$pages[$i];
551
 
552
  if ( in_array( $page->ID, $excluded_pages ) ) {
553
 
554
+ unset( $pages[$i] );
555
 
556
  }
557
 
572
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
573
  */
574
  public function plugin_fw_loader() {
575
+ if ( !defined( 'YIT' ) || !defined( 'YIT_CORE_PLUGIN' ) ) {
576
  require_once( 'plugin-fw/yit-plugin.php' );
577
  }
578
  }
583
  * @return void
584
  * @since 1.0
585
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
586
+ * @use /Yit_Plugin_Panel class
587
  * @see plugin-fw/lib/yit-plugin-panel.php
588
  */
589
  public function add_menu_page() {
590
+ if ( !empty( $this->_panel ) ) {
591
  return;
592
  }
593
 
594
  $admin_tabs = array(
595
+ 'settings' => __( 'Settings', 'ywctm' ),
596
  );
597
 
598
  if ( defined( 'YWCTM_PREMIUM' ) ) {
599
+ $admin_tabs['premium'] = __( 'Premium Settings', 'ywctm' );
600
  $admin_tabs['exclusions'] = __( 'Exclusion List', 'ywctm' );
601
+ }
602
+ else {
603
  $admin_tabs['premium-landing'] = __( 'Premium Version', 'ywctm' );
604
  }
605
 
642
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
643
  * @return string The premium landing link
644
  */
645
+ public function get_premium_landing_uri() {
646
  return defined( 'YITH_REFER_ID' ) ? $this->_premium_landing . '?refer_id=' . YITH_REFER_ID : $this->_premium_landing;
647
  }
648
 
657
  * @since 1.0
658
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
659
  * @return mixed
660
+ * @use plugin_action_links_{$plugin_file_name}
661
  */
662
  public function action_links( $links ) {
663
 
683
  * @return Array
684
  * @since 1.0
685
  * @author Andrea Grillo <andrea.grillo@yithemes.com>
686
+ * @use plugin_row_meta
687
  */
688
  public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
689
  if ( ( defined( 'YWCTM_INIT' ) && ( YWCTM_INIT == $plugin_file ) ) ||
699
  /**
700
  *
701
  * say if the code is execute by quick view
 
702
  *
703
  * @return bool
704
  * @since 1.0.7
705
  * @author Andrea Frascaspata <andrea.frascaspata@yithemes.com>
706
  */
707
  public function is_quick_view() {
708
+ return defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && ( $_REQUEST['action'] == 'yith_load_product_quick_view' || $_REQUEST['action'] == 'yit_load_product_quick_view' );
709
  }
710
 
711
  }
init.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://yithemes.com/themes/plugins/yith-woocommerce-catalog-mode/
5
  Description: YITH Woocommerce Catalog Mode allows you to disable shop functions.
6
  Author: Yithemes
7
  Text Domain: ywctm
8
- Version: 1.0.8
9
  Author URI: http://yithemes.com/
10
  */
11
 
@@ -34,7 +34,7 @@ function ywctm_install_free_admin_notice() {
34
  }
35
 
36
  if ( ! defined( 'YWCTM_VERSION' ) ) {
37
- define( 'YWCTM_VERSION', '1.0.8' );
38
  }
39
 
40
  if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
5
  Description: YITH Woocommerce Catalog Mode allows you to disable shop functions.
6
  Author: Yithemes
7
  Text Domain: ywctm
8
+ Version: 1.0.9
9
  Author URI: http://yithemes.com/
10
  */
11
 
34
  }
35
 
36
  if ( ! defined( 'YWCTM_VERSION' ) ) {
37
+ define( 'YWCTM_VERSION', '1.0.9' );
38
  }
39
 
40
  if ( ! defined( 'YWCTM_FREE_INIT' ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: yithemes
4
  Tags: woocommerce, products, themes, yit, yith, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
- Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -48,6 +48,10 @@ YITH WooCommerce Catalog Mode will add a new tab called "Catalog Mode" inside th
48
 
49
  == Changelog ==
50
 
 
 
 
 
51
  = 1.0.8 =
52
 
53
  * Updated language file
@@ -88,7 +92,7 @@ YITH WooCommerce Catalog Mode will add a new tab called "Catalog Mode" inside th
88
 
89
  == Upgrade Notice ==
90
 
91
- Last Stable Tag 1.0.8
92
 
93
  == Suggestions ==
94
 
4
  Tags: woocommerce, products, themes, yit, yith, e-commerce, shop, catalog mode, catalogue mode, remove add to cart, ask for price, ask price, asking for price, asking price, button remove, call, call for price, call me, call us, contact, email, hide add to cart, hide price
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
 
49
  == Changelog ==
50
 
51
+ = 1.0.9 =
52
+
53
+ * Fixed: YITH WooCommerce Colors and Labels Variations compatibility
54
+
55
  = 1.0.8 =
56
 
57
  * Updated language file
92
 
93
  == Upgrade Notice ==
94
 
95
+ Last Stable Tag 1.0.9
96
 
97
  == Suggestions ==
98
 
templates/admin/premium.php CHANGED
@@ -1,295 +1,347 @@
1
  <style>
2
- .section{
3
- margin-left: -20px;
4
- margin-right: -20px;
5
- font-family: "Raleway",san-serif;
6
- }
7
- .section h1{
8
- text-align: center;
9
- text-transform: uppercase;
10
- color: #808a97;
11
- font-size: 35px;
12
- font-weight: 700;
13
- line-height: normal;
14
- display: inline-block;
15
- width: 100%;
16
- margin: 50px 0 0;
17
- }
18
- .section:nth-child(even){
19
- background-color: #fff;
20
- }
21
- .section:nth-child(odd){
22
- background-color: #f1f1f1;
23
- }
24
- .section .section-title img{
25
- display: table-cell;
26
- vertical-align: middle;
27
- width: auto;
28
- margin-right: 15px;
29
- }
30
- .section h2,
31
- .section h3 {
32
- display: inline-block;
33
- vertical-align: middle;
34
- padding: 0;
35
- font-size: 24px;
36
- font-weight: 700;
37
- color: #808a97;
38
- text-transform: uppercase;
39
- }
 
 
 
 
40
 
41
- .section .section-title h2{
42
- display: table-cell;
43
- vertical-align: middle;
44
- }
 
45
 
46
- .section-title{
47
- display: table;
48
- }
49
 
50
- .section h3 {
51
- font-size: 14px;
52
- line-height: 28px;
53
- margin-bottom: 0;
54
- display: block;
55
- }
56
 
57
- .section p{
58
- font-size: 13px;
59
- margin: 25px 0;
60
- }
61
- .section ul li{
62
- margin-bottom: 4px;
63
- }
64
- .landing-container{
65
- max-width: 750px;
66
- margin-left: auto;
67
- margin-right: auto;
68
- padding: 50px 0 30px;
69
- }
70
- .landing-container:after{
71
- display: block;
72
- clear: both;
73
- content: '';
74
- }
75
- .landing-container .col-1,
76
- .landing-container .col-2{
77
- float: left;
78
- box-sizing: border-box;
79
- padding: 0 15px;
80
- }
81
- .landing-container .col-1 img{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  width: 100%;
83
  }
84
- .landing-container .col-1{
85
- width: 55%;
86
- }
87
- .landing-container .col-2{
88
- width: 45%;
89
- }
90
  .premium-cta{
91
- background-color: #808a97;
92
- color: #fff;
93
- border-radius: 6px;
94
- padding: 20px 15px;
95
- }
96
- .premium-cta:after{
97
- content: '';
98
- display: block;
99
- clear: both;
100
- }
101
- .premium-cta p{
102
- margin: 7px 0;
103
- font-size: 14px;
104
- font-weight: 500;
105
- display: inline-block;
106
- width: 60%;
107
  }
108
  .premium-cta a.button{
109
- border-radius: 6px;
110
- height: 60px;
111
- float: right;
112
- background: url(<?php echo YWCTM_ASSETS_URL?>/images/upgrade.png) #ff643f no-repeat 13px 13px;
113
- border-color: #ff643f;
114
- box-shadow: none;
115
- outline: none;
116
- color: #fff;
117
- position: relative;
118
- padding: 9px 50px 9px 70px;
119
- }
120
- .premium-cta a.button:hover,
121
- .premium-cta a.button:active,
122
- .premium-cta a.button:focus{
123
- color: #fff;
124
- background: url(<?php echo YWCTM_ASSETS_URL?>/images/upgrade.png) #971d00 no-repeat 13px 13px;
125
- border-color: #971d00;
126
- box-shadow: none;
127
- outline: none;
128
  }
129
- .premium-cta a.button:focus{
130
- top: 1px;
 
 
 
131
  }
132
- .premium-cta a.button span{
133
- line-height: 13px;
134
  }
135
- .premium-cta a.button .highlight{
136
- display: block;
137
- font-size: 20px;
138
- font-weight: 700;
139
- line-height: 20px;
140
  }
141
- .premium-cta .highlight{
142
- text-transform: uppercase;
143
- background: none;
144
- font-weight: 800;
145
- color: #fff;
146
  }
147
-
148
- @media (max-width: 768px) {
149
- .section{margin: 0}
150
- .premium-cta p{
151
- width: 100%;
152
- }
153
- .premium-cta{
154
- text-align: center;
155
- }
156
- .premium-cta a.button{
157
- float: none;
158
- }
159
  }
 
160
 
161
- @media (max-width: 480px){
162
- .wrap{
163
- margin-right: 0;
164
- }
165
- .section{
166
- margin: 0;
167
- }
168
- .landing-container .col-1,
169
- .landing-container .col-2{
170
- width: 100%;
171
- padding: 0 15px;
172
- }
173
- .section-odd .col-1 {
174
- float: left;
175
- margin-right: -100%;
176
- }
177
- .section-odd .col-2 {
178
- float: right;
179
- margin-top: 65%;
180
- }
181
  }
182
 
183
- @media (max-width: 320px){
184
- .premium-cta a.button{
185
- padding: 9px 20px 9px 70px;
186
- }
187
-
188
- .section .section-title img{
189
- display: none;
190
- }
191
  }
 
192
  </style>
193
  <div class="landing">
194
  <div class="section section-cta section-odd">
195
  <div class="landing-container">
196
  <div class="premium-cta">
197
  <p>
198
- Upgrade to the <span class="highlight">premium version</span>
199
- of <span class="highlight">YITH WooCommerce Catalog Mode</span> to benefit from all features!
200
  </p>
201
  <a href="<?php echo $this->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
202
- <span class="highlight">UPGRADE</span>
203
- <span>to the premium version</span>
204
  </a>
205
  </div>
206
  </div>
207
  </div>
208
- <div class="section section-even clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/01-bg.png) no-repeat #fff; background-position: 85% 75%">
209
- <h1>Premium Features</h1>
210
  <div class="landing-container">
211
  <div class="col-1">
212
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/01.png" alt="Review Title" />
213
  </div>
214
  <div class="col-2">
215
  <div class="section-title">
216
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/01-icon.png" alt="Review Title"/>
217
- <h2>HIDE PRICE</h2>
218
  </div>
219
- <p>Hide the price of products in your shop and replace it with a text. Decide if some of the products
220
- have to be excluded and if hiding price has to be applied to all or restricted only to unlogged
221
- users.
222
  </p>
223
  </div>
224
  </div>
225
  </div>
226
- <div class="section section-odd clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/02-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
227
  <div class="landing-container">
228
  <div class="col-2">
229
  <div class="section-title">
230
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/02-icon.png" alt="Attachment List" />
231
- <h2>INQUIRY FORM</h2>
232
  </div>
233
- <p>Improve single product page by adding a tab with an inquiry form explicitly thought to let them send messages to site administrator.</p>
 
 
234
  </div>
235
  <div class="col-1">
236
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/02.png" alt="Attachment List" />
237
  </div>
238
  </div>
239
  </div>
240
- <div class="section section-even clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/03-bg.png) no-repeat #fff; background-position: 85% 100%">
241
  <div class="landing-container">
242
  <div class="col-1">
243
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/03.png" alt="Vote the review" />
244
  </div>
245
  <div class="col-2">
246
  <div class="section-title">
247
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/03-icon.png" alt="Vote the review" />
248
- <h2>CUSTOM BUTTON</h2>
249
  </div>
250
- <p>Add a button in single product page to call users to a specific action, depending on the specified link (email sending, skype call, telephone call).</p>
 
 
251
  </div>
252
  </div>
253
  </div>
254
- <div class="section section-odd clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/04-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
255
  <div class="landing-container">
256
  <div class="col-2">
257
  <div class="section-title">
258
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/04-icon.png" alt="Number" />
259
- <h2>PRODUCT REVIEWS</h2>
260
  </div>
261
- <p>You can disable product reviewing system of your shop and decide if applying it to all users or just to unlogged ones.</p>
 
 
262
  </div>
263
  <div class="col-1">
264
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/04.png" alt="Number" />
265
  </div>
266
  </div>
267
  </div>
268
- <div class="section section-even clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/05-bg.png) no-repeat #fff; background-position: 85% 100%">
269
  <div class="landing-container">
270
  <div class="col-1">
271
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/05.png" alt="Filter by rating" />
272
  </div>
273
  <div class="col-2">
274
  <div class="section-title">
275
- <img src="<?php echo YWCTM_ASSETS_URL?>/images/05-icon.png" alt="Filter by rating" />
276
- <h2>EXCLUSION LIST</h2>
277
  </div>
278
- <p>Set plugin options, but if you want that options concerning price visibility and ‘Add to cart’ do not apply to specific products, add them to exclusion list and, voilà, problem solved.</p>
 
 
279
  </div>
280
  </div>
281
  </div>
282
- <div class="section section-odd clear" style="background: url(<?php echo YWCTM_ASSETS_URL ?>/images/06-bg.png) no-repeat #f1f1f1; background-position: 15% 100%">
283
  <div class="landing-container">
284
  <div class="col-2">
285
  <div class="section-title">
286
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/06-icon.png" alt="Number" />
287
- <h2>REVERSE EXCLUSION LIST</h2>
288
  </div>
289
- <p>Apply Catalog Mode to some items only: add them to the "Exclusion List" and make it work in the opposite way as usual. All items in the shop show price and “Add to Cart” button, while items in the list don’t.</p>
 
 
290
  </div>
291
  <div class="col-1">
292
- <img src="<?php echo YWCTM_ASSETS_URL ?>/images/06.png" alt="Number" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  </div>
294
  </div>
295
  </div>
@@ -297,12 +349,11 @@
297
  <div class="landing-container">
298
  <div class="premium-cta">
299
  <p>
300
- Upgrade to the <span class="highlight">premium version</span>
301
- of <span class="highlight">YITH WooCommerce Catalog Mode</span> to benefit from all features!
302
  </p>
303
  <a href="<?php echo $this->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
304
- <span class="highlight">UPGRADE</span>
305
- <span>to the premium version</span>
306
  </a>
307
  </div>
308
  </div>
1
  <style>
2
+ .section{
3
+ margin-left: -20px;
4
+ margin-right: -20px;
5
+ font-family: "Raleway",san-serif;
6
+ }
7
+ .section h1{
8
+ text-align: center;
9
+ text-transform: uppercase;
10
+ color: #808a97;
11
+ font-size: 35px;
12
+ font-weight: 700;
13
+ line-height: normal;
14
+ display: inline-block;
15
+ width: 100%;
16
+ margin: 50px 0 0;
17
+ }
18
+ .section ul{
19
+ list-style-type: disc;
20
+ padding-left: 15px;
21
+ }
22
+ .section:nth-child(even){
23
+ background-color: #fff;
24
+ }
25
+ .section:nth-child(odd){
26
+ background-color: #f1f1f1;
27
+ }
28
+ .section .section-title img{
29
+ display: table-cell;
30
+ vertical-align: middle;
31
+ width: auto;
32
+ margin-right: 15px;
33
+ }
34
+ .section h2,
35
+ .section h3 {
36
+ display: inline-block;
37
+ vertical-align: middle;
38
+ padding: 0;
39
+ font-size: 24px;
40
+ font-weight: 700;
41
+ color: #808a97;
42
+ text-transform: uppercase;
43
+ }
44
 
45
+ .section .section-title h2{
46
+ display: table-cell;
47
+ vertical-align: middle;
48
+ line-height: 25px;
49
+ }
50
 
51
+ .section-title{
52
+ display: table;
53
+ }
54
 
55
+ .section h3 {
56
+ font-size: 14px;
57
+ line-height: 28px;
58
+ margin-bottom: 0;
59
+ display: block;
60
+ }
61
 
62
+ .section p{
63
+ font-size: 13px;
64
+ margin: 25px 0;
65
+ }
66
+ .section ul li{
67
+ margin-bottom: 4px;
68
+ }
69
+ .landing-container{
70
+ max-width: 750px;
71
+ margin-left: auto;
72
+ margin-right: auto;
73
+ padding: 50px 0 30px;
74
+ }
75
+ .landing-container:after{
76
+ display: block;
77
+ clear: both;
78
+ content: '';
79
+ }
80
+ .landing-container .col-1,
81
+ .landing-container .col-2{
82
+ float: left;
83
+ box-sizing: border-box;
84
+ padding: 0 15px;
85
+ }
86
+ .landing-container .col-1 img{
87
+ width: 100%;
88
+ }
89
+ .landing-container .col-1{
90
+ width: 55%;
91
+ }
92
+ .landing-container .col-2{
93
+ width: 45%;
94
+ }
95
+ .premium-cta{
96
+ background-color: #808a97;
97
+ color: #fff;
98
+ border-radius: 6px;
99
+ padding: 20px 15px;
100
+ }
101
+ .premium-cta:after{
102
+ content: '';
103
+ display: block;
104
+ clear: both;
105
+ }
106
+ .premium-cta p{
107
+ margin: 7px 0;
108
+ font-size: 14px;
109
+ font-weight: 500;
110
+ display: inline-block;
111
+ width: 60%;
112
+ }
113
+ .premium-cta a.button{
114
+ border-radius: 6px;
115
+ height: 60px;
116
+ float: right;
117
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/upgrade.png) #ff643f no-repeat 13px 13px;
118
+ border-color: #ff643f;
119
+ box-shadow: none;
120
+ outline: none;
121
+ color: #fff;
122
+ position: relative;
123
+ padding: 9px 50px 9px 70px;
124
+ }
125
+ .premium-cta a.button:hover,
126
+ .premium-cta a.button:active,
127
+ .premium-cta a.button:focus{
128
+ color: #fff;
129
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/upgrade.png) #971d00 no-repeat 13px 13px;
130
+ border-color: #971d00;
131
+ box-shadow: none;
132
+ outline: none;
133
+ }
134
+ .premium-cta a.button:focus{
135
+ top: 1px;
136
+ }
137
+ .premium-cta a.button span{
138
+ line-height: 13px;
139
+ }
140
+ .premium-cta a.button .highlight{
141
+ display: block;
142
+ font-size: 20px;
143
+ font-weight: 700;
144
+ line-height: 20px;
145
+ }
146
+ .premium-cta .highlight{
147
+ text-transform: uppercase;
148
+ background: none;
149
+ font-weight: 800;
150
+ color: #fff;
151
+ }
152
+
153
+ .section.one{
154
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/01-bg.png) no-repeat #fff; background-position: 85% 75%
155
+ }
156
+ .section.two{
157
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/02-bg.png) no-repeat #fff; background-position: 85% 75%
158
+ }
159
+ .section.three{
160
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/03-bg.png) no-repeat #fff; background-position: 85% 75%
161
+ }
162
+ .section.four{
163
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/04-bg.png) no-repeat #fff; background-position: 85% 75%
164
+ }
165
+ .section.five{
166
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/05-bg.png) no-repeat #fff; background-position: 85% 75%
167
+ }
168
+ .section.six{
169
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/06-bg.png) no-repeat #fff; background-position: 85% 75%
170
+ }
171
+
172
+ .section.seven{
173
+ background: url(<?php echo YWCTM_ASSETS_URL?>/images/07-bg.png) no-repeat #fff; background-position: 85% 75%
174
+ }
175
+
176
+ @media (max-width: 768px) {
177
+ .section{margin: 0}
178
+ .premium-cta p{
179
  width: 100%;
180
  }
 
 
 
 
 
 
181
  .premium-cta{
182
+ text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  }
184
  .premium-cta a.button{
185
+ float: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
+ }
188
+
189
+ @media (max-width: 480px){
190
+ .wrap{
191
+ margin-right: 0;
192
  }
193
+ .section{
194
+ margin: 0;
195
  }
196
+ .landing-container .col-1,
197
+ .landing-container .col-2{
198
+ width: 100%;
199
+ padding: 0 15px;
 
200
  }
201
+ .section-odd .col-1 {
202
+ float: left;
203
+ margin-right: -100%;
 
 
204
  }
205
+ .section-odd .col-2 {
206
+ float: right;
207
+ margin-top: 65%;
 
 
 
 
 
 
 
 
 
208
  }
209
+ }
210
 
211
+ @media (max-width: 320px){
212
+ .premium-cta a.button{
213
+ padding: 9px 20px 9px 70px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  }
215
 
216
+ .section .section-title img{
217
+ display: none;
 
 
 
 
 
 
218
  }
219
+ }
220
  </style>
221
  <div class="landing">
222
  <div class="section section-cta section-odd">
223
  <div class="landing-container">
224
  <div class="premium-cta">
225
  <p>
226
+ <?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Catalog Mode%2$s to benefit from all features!','ywctm'),'<span class="highlight">','</span>' );?>
 
227
  </p>
228
  <a href="<?php echo $this->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
229
+ <span class="highlight"><?php _e('UPGRADE','ywctm');?></span>
230
+ <span><?php _e('to the premium version','ywctm');?></span>
231
  </a>
232
  </div>
233
  </div>
234
  </div>
235
+ <div class="one section section-even clear">
236
+ <h1><?php _e('Premium Features','ywctm');?></h1>
237
  <div class="landing-container">
238
  <div class="col-1">
239
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/01.png" alt="Hide price" />
240
  </div>
241
  <div class="col-2">
242
  <div class="section-title">
243
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/01-icon.png" alt="icon 01"/>
244
+ <h2><?php _e('Hide price','ywctm');?></h2>
245
  </div>
246
+ <p>
247
+ <?php echo sprintf(__('Hide the price of products in your shop and replace it with a text. Decide if some of the products have to be excluded and if %1$shiding price%2$s has to be applied to all or restricted only to unlogged users.', 'ywctm'), '<b>', '</b>');?>
 
248
  </p>
249
  </div>
250
  </div>
251
  </div>
252
+ <div class="two section section-odd clear">
253
  <div class="landing-container">
254
  <div class="col-2">
255
  <div class="section-title">
256
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/02-icon.png" alt="icon 02" />
257
+ <h2><?php _e('Inquiry form','ywctm');?></h2>
258
  </div>
259
+ <p>
260
+ <?php echo sprintf(__('Improve single product page by adding a tab with an %1$sinquiry form%2$s explicitly thought to let them send messages to site administrator.', 'ywctm'), '<b>', '</b>');?>
261
+ </p>
262
  </div>
263
  <div class="col-1">
264
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/02.png" alt="Inquiry form" />
265
  </div>
266
  </div>
267
  </div>
268
+ <div class="three section section-even clear">
269
  <div class="landing-container">
270
  <div class="col-1">
271
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/03.png" alt="Custom button" />
272
  </div>
273
  <div class="col-2">
274
  <div class="section-title">
275
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/03-icon.png" alt="icon 03" />
276
+ <h2><?php _e( 'Custom button','ywctm');?></h2>
277
  </div>
278
+ <p>
279
+ <?php echo sprintf(__('Add a button in single product page to call users to a specific %1$saction%2$s, depending on the specified %1$slink%2$s (email sending, skype call, telephone call).', 'ywctm'), '<b>', '</b>');?>
280
+ </p>
281
  </div>
282
  </div>
283
  </div>
284
+ <div class="four section section-odd clear">
285
  <div class="landing-container">
286
  <div class="col-2">
287
  <div class="section-title">
288
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/04-icon.png" alt="icon 04" />
289
+ <h2><?php _e('Product reviews','ywctm');?></h2>
290
  </div>
291
+ <p>
292
+ <?php echo sprintf(__('You can disable product %1$sreviewing system%2$s of your shop and decide if applying it to all users or just to unlogged ones.', 'ywctm'), '<b>', '</b>');?>
293
+ </p>
294
  </div>
295
  <div class="col-1">
296
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/04.png" alt="Product reviews" />
297
  </div>
298
  </div>
299
  </div>
300
+ <div class="five section section-even clear">
301
  <div class="landing-container">
302
  <div class="col-1">
303
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/05.png" alt="Exclusion list" />
304
  </div>
305
  <div class="col-2">
306
  <div class="section-title">
307
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/05-icon.png" alt="icon 05" />
308
+ <h2><?php _e('Exclusion list','ywctm');?></h2>
309
  </div>
310
+ <p>
311
+ <?php echo sprintf( __('Set plugin options, but if you want that options concerning price visibility and ‘Add to cart’ do not apply to specific products, add them to %1$sexclusion list%2$s and, voilà, problem solved.','ywctm'),'<b>','</b>'); ?>
312
+ </p>
313
  </div>
314
  </div>
315
  </div>
316
+ <div class="six section section-odd clear">
317
  <div class="landing-container">
318
  <div class="col-2">
319
  <div class="section-title">
320
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/06-icon.png" alt="icon 06" />
321
+ <h2><?php _e('REVERSE EXCLUSION LIST','ywctm');?></h2>
322
  </div>
323
+ <p>
324
+ <?php echo sprintf( __( 'Apply Catalog Mode to some items only: add them to the "Exclusion List" and %1$smake it work in the opposite way as usual%2$s. All items in the shop show price and “Add to Cart” button, while items in the list don’t.','ywctm' ),'<b>','</b>' ) ?>
325
+ </p>
326
  </div>
327
  <div class="col-1">
328
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/06.png" alt="REVERSE EXCLUSION LIST" />
329
+ </div>
330
+ </div>
331
+ </div>
332
+ <div class="seven section section-even clear">
333
+ <div class="landing-container">
334
+ <div class="col-1">
335
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/07.png" alt="Source page of the request" />
336
+ </div>
337
+ <div class="col-2">
338
+ <div class="section-title">
339
+ <img src="<?php echo YWCTM_ASSETS_URL?>/images/07-icon.png" alt="icon 05" />
340
+ <h2><?php _e('Source page of the request','ywctm');?></h2>
341
+ </div>
342
+ <p>
343
+ <?php echo sprintf( __('Thanks to the %1$s"Product Permalink"%2$s option you will be able to know from which page your users have generated the request.%3$sThe email generated from the request form will include the address of the page: another important information that can be really useful for you.','ywctm'),'<b>','</b>','<br>'); ?>
344
+ </p>
345
  </div>
346
  </div>
347
  </div>
349
  <div class="landing-container">
350
  <div class="premium-cta">
351
  <p>
352
+ <?php echo sprintf( __('Upgrade to %1$spremium version%2$s of %1$sYITH WooCommerce Catalog Mode%2$s to benefit from all features!','ywctm'),'<span class="highlight">','</span>' );?>
 
353
  </p>
354
  <a href="<?php echo $this->get_premium_landing_uri() ?>" target="_blank" class="premium-cta-button button btn">
355
+ <span class="highlight"><?php _e('UPGRADE','ywctm');?></span>
356
+ <span><?php _e('to the premium version','ywctm');?></span>
357
  </a>
358
  </div>
359
  </div>