From b37252c788872ca3bc3bd472031b7c028e8c20d8 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 27 Feb 2024 20:48:45 +0600 Subject: [PATCH] quick view message done finally --- assets/js/wpt-control.js | 11 +++++++++++ includes/items/product_title.php | 3 ++- includes/items/quick_view.php | 4 +++- includes/items/thumbnails.php | 4 ++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/assets/js/wpt-control.js b/assets/js/wpt-control.js index 9fcfc8ec..c9fc4878 100644 --- a/assets/js/wpt-control.js +++ b/assets/js/wpt-control.js @@ -582,5 +582,16 @@ jQuery(function($) { } }); + + $(document.body).on('click','.caqv-open-modal-notfound',function(){ + // Show an alert + alert('Quick View by CodeAstrology plugin is required.\nPlease Install and Actvate it.\nPlugin will load on new tab.'); + + // Open another page in a new tab + var newPageUrl = 'https://wordpress.org/plugins/ca-quick-view/'; // Replace with the actual URL + window.open(newPageUrl, '_blank'); + }); + + }); }); diff --git a/includes/items/product_title.php b/includes/items/product_title.php index 783fcf8a..69c8a0c4 100644 --- a/includes/items/product_title.php +++ b/includes/items/product_title.php @@ -19,7 +19,8 @@ } elseif($title_variation == 'yith'){ $wpt_single_product_title .= "" . $the_title . ""; }elseif($title_variation == 'ca_quick_view'){ //Quick View by Code Astrology //https://wordpress.org/plugins/ca-quick-view/ - $wpt_single_product_title .= "" . $the_title . ""; + $class_name = class_exists('CAWQV_PLUGIN_LITE') ? 'caqv-open-modal' : 'caqv-open-modal-notfound'; + $wpt_single_product_title .= "" . $the_title . ""; }else{ $wpt_single_product_title .= "" . $the_title . ""; } diff --git a/includes/items/quick_view.php b/includes/items/quick_view.php index a88aecc3..c176c922 100644 --- a/includes/items/quick_view.php +++ b/includes/items/quick_view.php @@ -2,8 +2,10 @@ $product_id = $product->get_id(); $qv_button_label = get_option( 'qv_button_label', __( 'Qiuck View', 'woo-product-table' ) ); $qv_button_label = __( $qv_button_label, 'woo-product-table' ); + +$class_name = class_exists('CAWQV_PLUGIN_LITE') ? 'caqv-open-modal' : 'caqv-open-modal-notfound'; ?> -