From 283adc4e3e3121ad4b16ffd1548da3cb7b32a7cc Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Fri, 30 Apr 2021 00:08:35 +0600 Subject: [PATCH 1/3] admin notice feature added for free version when backdated pro version activated. --- woo-product-table.php | 45 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/woo-product-table.php b/woo-product-table.php index 58785888..d3e11395 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -326,11 +326,13 @@ class WPT_Product_Table{ const MINIMUM_PHP_VERSION = '5.6'; /** - * To check Minimum Plugin Version for Free version - * or Main Plugin/Module Version - * for our Pro Version + * check minimum Woo Product Table Pro Version + * + * @Since 2.8.5.4 + * @by Saiful + * @date 28.4.2021 */ - const MINIMUM_WPT_VERSION = '2.6.1'; + const MINIMUM_WPT_PRO_VERSION = '7.0.6'; /** @@ -399,13 +401,26 @@ public function __construct() { * @since 6.1.0.15 */ $installed_plugins = get_plugins(); - +// var_dump($installed_plugins); //Condition and check php verion and WooCommerce activation if ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) { add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] ); return; } + /** + * Checking Pro Version Compatibility If + * Installed + */ + $pro_v_loc = 'woo-product-table-pro/woo-product-table-pro.php'; + $pro_installed = isset( $installed_plugins[$pro_v_loc] ); + $pro_activated = is_plugin_active( $pro_v_loc ); + $pro_version = isset( $installed_plugins[$pro_v_loc]['Version'] ) ? $installed_plugins[$pro_v_loc]['Version'] : false; + if( $pro_installed && $pro_activated && version_compare( $pro_version, self::MINIMUM_WPT_PRO_VERSION, '<' ) ){ + add_action( 'admin_notices', [ $this, 'admin_notice_pro_version_need_update' ] ); + return; + } + //Qty Plus/Minus Button Plugin Compulsory for Our Product Table Plugin $plugin = 'wc-quantity-plus-minus-button/init.php'; $link_text = '' . esc_html__( 'Quantity Plus/Minus Button for WooCommerce', 'wpt_pro' ) . ''; @@ -653,6 +668,26 @@ public function admin_notice_missing_main_plugin() { printf( '

%1$s

', $message ); } + + /** + * Pro version need to be update to latest version + * + * @since 2.8.5.4 + * @by Saiful + * @Date 28.4.2021 + */ + public function admin_notice_pro_version_need_update() { + + $message = sprintf( + esc_html__( '"%1$s" requires "%2$s" to be update to minimum version:("%3$s"). Please update your [Woo Product Table Pro] version', 'wpt_pro' ), + '' . esc_html__( 'Woo Product Table', 'wpt_pro' ) . '', + '' . esc_html__( 'Pro Version of Woo Product Table Pro', 'wpt_pro' ) . '', + '' . self::MINIMUM_WPT_PRO_VERSION . '' + ); + + printf( '

%1$s

', $message ); + + } From e10be20110710942220d6f331852e0a7119006c6 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Fri, 30 Apr 2021 00:59:28 +0600 Subject: [PATCH 2/3] CSS update based on trending design as well as available list at the top --- admin/action-hook.php | 2 +- admin/tabs/column_settings.php | 18 ++++++---- .../tabs/inc-column/available-column-list.php | 4 +-- assets/css/admin.css | 34 +++++++++++++------ 4 files changed, 38 insertions(+), 20 deletions(-) diff --git a/admin/action-hook.php b/admin/action-hook.php index 9f1ccdcb..b60d44ad 100644 --- a/admin/action-hook.php +++ b/admin/action-hook.php @@ -29,7 +29,7 @@ function wpt_admin_form_top(){ GitHub Repo
  • Demo
  • Forum on Repo
  • -
  • Basic Helps
  • +
  • Basic Helps
  • Documentation
  • Get Support
  • diff --git a/admin/tabs/column_settings.php b/admin/tabs/column_settings.php index 26b35427..92517774 100644 --- a/admin/tabs/column_settings.php +++ b/admin/tabs/column_settings.php @@ -70,11 +70,14 @@ @@ -91,11 +94,13 @@ $tablet_header_file = __DIR__ . '/inc-column/tablet-header.php'; include $tablet_header_file; +$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php'; +include $availe_column_list_file; + $column_list_file = __DIR__ . '/inc-column/column-list.php'; include $column_list_file; -$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php'; -include $availe_column_list_file; + ?> @@ -110,11 +115,12 @@ $tablet_header_file = __DIR__ . '/inc-column/mobile-header.php'; include $tablet_header_file; +$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php'; +include $availe_column_list_file; + $column_list_file = __DIR__ . '/inc-column/column-list.php'; include $column_list_file; -$availe_column_list_file = __DIR__ . '/inc-column/available-column-list.php'; -include $availe_column_list_file; ?> diff --git a/admin/tabs/inc-column/available-column-list.php b/admin/tabs/inc-column/available-column-list.php index f3b1d114..e438b779 100644 --- a/admin/tabs/inc-column/available-column-list.php +++ b/admin/tabs/inc-column/available-column-list.php @@ -2,8 +2,6 @@
    -

    -
    -

    +

      $title ){ diff --git a/assets/css/admin.css b/assets/css/admin.css index ac81fd71..f9e9ef96 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -83,7 +83,7 @@ ul#wpt_keyword_hide_mobile .wpt_mobile_hide_keyword { width: 100%; - padding: 10px; + padding: 15px 10px; } .wpt_shortable_data { @@ -543,10 +543,11 @@ ul#wpt_column_sortable>li.wpt_sortable_peritem { padding: 0; } ul#wpt_column_sortable>li.wpt_sortable_peritem.enabled { - border-top: 2px solid #007693; + /* border-top: 1px solid #607d8b40; */ + box-shadow: 0px 1px 16px 0 #bbbbbb9c; } ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle, ul#wpt_keyword_hide_mobile li>span.handle { - background: #007692 no-repeat center center; + background: #e8e8e840 no-repeat center center; } .checkbox_parent { display: inline-block; @@ -622,12 +623,12 @@ span.extra_all_on_off.off_now { li.wpt_sortable_peritem { margin-top: 5px; - margin-bottom: 15px; + margin-bottom: 20px; padding-top: 10px; padding-bottom: 10px; } li.wpt_sortable_peritem.enabled { - border: 1px solid #607D8B; + border: 0 none; } @@ -698,7 +699,7 @@ table.wp-list-table.widefat.plugins tr.active[data-slug='woo-product-table-pro'] .inside-column-settings-wrapper {} .inside-column-settings-wrapper .inside_tab_content { - padding: 15px; + padding: 15px 20px; width: 100%; overflow: hidden; box-sizing: border-box; @@ -885,6 +886,7 @@ body.wpt_admin_bodys{background-color: white;} .add_new_col_wrapper { box-sizing: border-box; display: flex; + padding: 0 15px 15px 15px; } div#wpt_configuration_form .add_new_col_wrapper .ultraaddons-panel { @@ -1116,23 +1118,29 @@ ul#wpt_column_sortable>li.wpt_sortable_peritem.enabled{display: flex;} width: 150px; } .add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item { - /* border: 1px solid #ddd; */ /* height: 55px; */ - margin-right: 2px; - margin-bottom: 2px; + margin-right: 8px; + margin-bottom: 8px; padding: 5px; cursor: pointer; background: #e4e4e459; color: black; + border-radius: 9px; + padding: 5px 8px; + border: 1px solid #ddd; } .add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-enabled { - background: #007694; + background: #07a7d0; color: white; + border: 1px solid #007694; } .add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-disabled { background: #e4e4e459; color: black; } +.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item:after {content: "+";float: right;font-weight: bold;/* font-size: 16px; */box-sizing: border-box;/* position: absolute; *//* right: 5px; */} + +.add_switch_col_wrapper .enable-available-cols ul li.switch-enable-item.item-enabled:after {content: "-";} svg.octicon.octicon-mark-github.v-align-middle { margin-bottom: -3px; @@ -1159,6 +1167,12 @@ span.fork-button-wpt>a:hover { box-sizing: border-box; display: flex; } +div#wpt_configuration_form .add_switch_col_wrapper .ultraaddons-panel { + padding: 0; + border: 0 none; + margin-bottom: 0; +} + div#wpt_configuration_form #column_settings .ultraaddons-panel{width: 100%;} ul#wpt_column_sortable>li.wpt_sortable_peritem { background: #ffffff; From 7865fcd577647b8c4118fa5cad1f8d9eb3a6a31c Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Fri, 30 Apr 2021 01:09:43 +0600 Subject: [PATCH 3/3] CSS update based on trending design as well as available list at the top --- assets/css/admin.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index f9e9ef96..f7f5e336 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -732,11 +732,11 @@ nav.inside-nav-tab-wrapper a.nav-tab.nav-tab-active:hover{ #inside-tablet ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle, #inside-tablet ul#wpt_keyword_hide_mobile li>span.handle { - background-color: #000000; + /*background-color: #000000;*/ } #inside-mobile ul#wpt_column_sortable li.wpt_sortable_peritem.enabled>span.handle, #inside-mobile ul#wpt_keyword_hide_mobile li>span.handle { - background-color: #4c4c4c; + /*background-color: #4c4c4c;*/ } nav.inside-nav-tab-wrapper a:hover { @@ -1178,9 +1178,9 @@ ul#wpt_column_sortable>li.wpt_sortable_peritem { background: #ffffff; } ul#wpt_column_sortable>li.wpt_sortable_peritem.ui-sortable-helper { - background: #eceff1; - box-shadow: -4px 9px 12px 5px #0000007a; - border-color: #100000; + /* background: #000000; */ + box-shadow: 0 1px 12px 0 #00000057; + /* border-color: #100000; } /* Notice Style for UltraAddons*/