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'; ?> - diff --git a/includes/items/thumbnails.php b/includes/items/thumbnails.php index 71060c44..c201039d 100644 --- a/includes/items/thumbnails.php +++ b/includes/items/thumbnails.php @@ -19,8 +19,8 @@ $tag_end = ""; }elseif($thumb_variation == 'ca_quick_view') { - - $tag_start = ""; + $class_name = class_exists('CAWQV_PLUGIN_LITE') ? 'caqv-open-modal' : 'caqv-open-modal-notfound'; + $tag_start = ""; $tag_end = ""; }elseif ($thumb_variation == 'url') {