YITH WooCommerce Quick View - Version 1.1.4

Version Description

Released Oct 24 - 2016

  • Fixed: Status code 404 for "Quick View" on single product page
Download this release

Release Info

Developer yithemes
Plugin Icon 128x128 YITH WooCommerce Quick View
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

README.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: yithemes
3
Tags: yith, woocommerce, quick view, woocommerce quick view, yit, single product, products quick view, free quick view, woocommerce extension, woocommerce plugin, product summary, summary, modal
4
Requires at least: 4.0
5
Tested up to: 4.6.1
6
- Stable tag: 1.1.3
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
@@ -42,6 +42,10 @@ Full documentation is available [here](http://yithemes.com/docs-plugins/yith-woo
42
43
== Changelog ==
44
45
= 1.1.3 = Released Oct 20 - 2016
46
47
* Added: Support to WooCommerce 2.6.5
@@ -130,10 +134,6 @@ If you have created your own language pack, or have an update for an existing on
130
131
== Upgrade notice ==
132
133
- = 1.1.3 = Released Oct 20 - 2016
134
135
- * Added: Support to WooCommerce 2.6.5
136
- * Added: Support to WordPress 4.6.1
137
- * Fixed: Responsive style.
138
- * Fixed: Add inline css using WordPress function wp_add_inline_style.
139
- * Updated: Plugin Core.
3
Tags: yith, woocommerce, quick view, woocommerce quick view, yit, single product, products quick view, free quick view, woocommerce extension, woocommerce plugin, product summary, summary, modal
4
Requires at least: 4.0
5
Tested up to: 4.6.1
6
+ Stable tag: 1.1.4
7
License: GPLv2 or later
8
License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
42
43
== Changelog ==
44
45
+ = 1.1.4 = Released Oct 24 - 2016
46
+
47
+ * Fixed: Status code 404 for "Quick View" on single product page
48
+
49
= 1.1.3 = Released Oct 20 - 2016
50
51
* Added: Support to WooCommerce 2.6.5
134
135
== Upgrade notice ==
136
137
+ = 1.1.4 = Released Oct 24 - 2016
138
139
+ * Fixed: Status code 404 for "Quick View" on single product page
assets/js/frontend.js CHANGED
@@ -77,49 +77,55 @@ jQuery(document).ready(function($){
77
78
var ajax_call = function( t, product_id, is_blocked ) {
79
80
- $.post(
81
- yith_qv.ajaxurl.toString().replace( '%%endpoint%%', 'yith_load_product_quick_view' ),
82
- { action: 'yith_load_product_quick_view', product_id: product_id },
83
- function( data ) {
84
85
- qv_content.html( data );
86
87
- // quantity fields for WC 2.2
88
- if( yith_qv.is2_2 ) {
89
- qv_content.find('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
90
- }
91
92
- // Variation Form
93
- var form_variation = qv_content.find( '.variations_form' );
94
95
- form_variation.wc_variation_form();
96
- form_variation.trigger( 'check_variations' );
97
98
- if( typeof $.fn.yith_wccl !== 'undefined' ) {
99
- form_variation.yith_wccl();
100
- }
101
102
- // Init prettyPhoto
103
- if( typeof $.fn.prettyPhoto !== 'undefined' ) {
104
- qv_content.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({
105
- hook : 'data-rel',
106
- social_tools : false,
107
- theme : 'pp_woocommerce',
108
- horizontal_padding: 20,
109
- opacity : 0.8,
110
- deeplinking : false
111
- });
112
- }
113
114
- if( ! qv_modal.hasClass( 'open' ) ) {
115
- qv_modal.removeClass('loading').addClass('open');
116
- if( is_blocked )
117
- t.unblock();
118
}
119
-
120
- // stop loader
121
- $(document).trigger( 'qv_loader_stop' );
122
-
123
});
124
};
125
77
78
var ajax_call = function( t, product_id, is_blocked ) {
79
80
+ $.ajax({
81
+ url: yith_qv.ajaxurl,
82
+ data: {
83
+ action: 'yith_load_product_quick_view',
84
+ product_id: product_id
85
+ },
86
+ dataType: 'html',
87
+ type: 'POST',
88
+ success: function (data) {
89
+
90
+ qv_content.html(data);
91
+
92
+ // quantity fields for WC 2.2
93
+ if (yith_qv.is2_2) {
94
+ qv_content.find('div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)').addClass('buttons_added').append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');
95
+ }
96
97
+ // Variation Form
98
+ var form_variation = qv_content.find('.variations_form');
99
100
+ form_variation.wc_variation_form();
101
+ form_variation.trigger('check_variations');
102
103
+ if (typeof $.fn.yith_wccl !== 'undefined') {
104
+ form_variation.yith_wccl();
105
+ }
106
107
+ // Init prettyPhoto
108
+ if (typeof $.fn.prettyPhoto !== 'undefined') {
109
+ qv_content.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({
110
+ hook: 'data-rel',
111
+ social_tools: false,
112
+ theme: 'pp_woocommerce',
113
+ horizontal_padding: 20,
114
+ opacity: 0.8,
115
+ deeplinking: false
116
+ });
117
+ }
118
119
+ if (!qv_modal.hasClass('open')) {
120
+ qv_modal.removeClass('loading').addClass('open');
121
+ if (is_blocked)
122
+ t.unblock();
123
+ }
124
125
+ // stop loader
126
+ $(document).trigger('qv_loader_stop');
127
128
}
129
});
130
};
131
assets/js/frontend.min.js CHANGED
@@ -5,4 +5,4 @@
5
* @package YITH WooCommerce Quick View
6
* @version 1.0.0
7
*/
8
- jQuery(document).ready(function(a){"use strict";if("undefined"!=typeof yith_qv){var b=a(document).find("#yith-quick-view-modal"),c=b.find(".yith-quick-view-overlay"),d=b.find("#yith-quick-view-content"),e=b.find("#yith-quick-view-close"),f=b.find(".yith-wcqv-wrapper"),g=f.width(),h=f.height(),i=function(){var b=a(window).width(),c=a(window).height(),d=b-60>g?g:b-60,e=c-120>h?h:c-120;f.css({left:b/2-d/2,top:c/2-e/2,width:d+"px",height:e+"px"})};a.fn.yith_quick_view=function(){a(document).off("click",".yith-wcqv-button").on("click",".yith-wcqv-button",function(c){c.preventDefault();var d=a(this),e=d.data("product_id"),f=!1;"undefined"!=typeof yith_qv.loader&&(f=!0,d.block({message:null,overlayCSS:{background:"#fff url("+yith_qv.loader+") no-repeat center",opacity:.5,cursor:"none"}}),b.hasClass("loading")||b.addClass("loading"),a(document).trigger("qv_loading")),j(d,e,f)})};var j=function(c,e,f){a.post(yith_qv.ajaxurl.toString().replace("%%endpoint%%","yith_load_product_quick_view"),{action:"yith_load_product_quick_view",product_id:e},function(e){d.html(e),yith_qv.is2_2&&d.find("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');var g=d.find(".variations_form");g.wc_variation_form(),g.trigger("check_variations"),"undefined"!=typeof a.fn.yith_wccl&&g.yith_wccl(),"undefined"!=typeof a.fn.prettyPhoto&&d.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({hook:"data-rel",social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1}),b.hasClass("open")||(b.removeClass("loading").addClass("open"),f&&c.unblock()),a(document).trigger("qv_loader_stop")})},k=function(){c.on("click",function(a){f()}),a(document).keyup(function(a){27===a.keyCode&&f()}),e.on("click",function(a){a.preventDefault(),f()});var f=function(){b.removeClass("open").removeClass("loading"),setTimeout(function(){d.html("")},1e3)}};k(),i(),a(window).on("resize",i),a.fn.yith_quick_view(),a(document).on("yith_infs_adding_elem yith-wcan-ajax-filtered",function(){a.fn.yith_quick_view()})}});
5
* @package YITH WooCommerce Quick View
6
* @version 1.0.0
7
*/
8
+ jQuery(document).ready(function(a){"use strict";if("undefined"!=typeof yith_qv){var b=a(document).find("#yith-quick-view-modal"),c=b.find(".yith-quick-view-overlay"),d=b.find("#yith-quick-view-content"),e=b.find("#yith-quick-view-close"),f=b.find(".yith-wcqv-wrapper"),g=f.width(),h=f.height(),i=function(){var b=a(window).width(),c=a(window).height(),d=b-60>g?g:b-60,e=c-120>h?h:c-120;f.css({left:b/2-d/2,top:c/2-e/2,width:d+"px",height:e+"px"})};a.fn.yith_quick_view=function(){a(document).off("click",".yith-wcqv-button").on("click",".yith-wcqv-button",function(c){c.preventDefault();var d=a(this),e=d.data("product_id"),f=!1;"undefined"!=typeof yith_qv.loader&&(f=!0,d.block({message:null,overlayCSS:{background:"#fff url("+yith_qv.loader+") no-repeat center",opacity:.5,cursor:"none"}}),b.hasClass("loading")||b.addClass("loading"),a(document).trigger("qv_loading")),j(d,e,f)})};var j=function(c,e,f){a.ajax({url:yith_qv.ajaxurl,data:{action:"yith_load_product_quick_view",product_id:e},dataType:"html",type:"POST",success:function(e){d.html(e),yith_qv.is2_2&&d.find("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass("buttons_added").append('<input type="button" value="+" class="plus" />').prepend('<input type="button" value="-" class="minus" />');var g=d.find(".variations_form");g.wc_variation_form(),g.trigger("check_variations"),"undefined"!=typeof a.fn.yith_wccl&&g.yith_wccl(),"undefined"!=typeof a.fn.prettyPhoto&&d.find("a[data-rel^='prettyPhoto'], a.zoom").prettyPhoto({hook:"data-rel",social_tools:!1,theme:"pp_woocommerce",horizontal_padding:20,opacity:.8,deeplinking:!1}),b.hasClass("open")||(b.removeClass("loading").addClass("open"),f&&c.unblock()),a(document).trigger("qv_loader_stop")}})},k=function(){c.on("click",function(a){f()}),a(document).keyup(function(a){27===a.keyCode&&f()}),e.on("click",function(a){a.preventDefault(),f()});var f=function(){b.removeClass("open").removeClass("loading"),setTimeout(function(){d.html("")},1e3)}};k(),i(),a(window).on("resize",i),a.fn.yith_quick_view(),a(document).on("yith_infs_adding_elem yith-wcan-ajax-filtered",function(){a.fn.yith_quick_view()})}});
class.yith-wcqv-frontend.php CHANGED
@@ -62,13 +62,8 @@ if( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
62
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
63
64
// quick view ajax
65
- if( version_compare( WC()->version, '2.4', '>=' ) ){
66
- add_action( 'wc_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
67
- }
68
- else {
69
- add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
70
- add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
71
- }
72
73
// add button
74
add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
@@ -162,7 +157,7 @@ if( ! class_exists( 'YITH_WCQV_Frontend' ) ) {
162
do_action( 'yith_quick_view_custom_style_scripts' );
163
164
wp_localize_script( 'yith-wcqv-frontend', 'yith_qv', array (
165
- 'ajaxurl' => version_compare( WC()->version, '2.4', '>=' ) ? WC_AJAX::get_endpoint( "%%endpoint%%" ) : admin_url( 'admin-ajax.php', 'relative' ),
166
'loader' => $loader,
167
'is2_2' => $version
168
)
62
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles_scripts' ) );
63
64
// quick view ajax
65
+ add_action( 'wp_ajax_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
66
+ add_action( 'wp_ajax_nopriv_yith_load_product_quick_view', array( $this, 'yith_load_product_quick_view_ajax' ) );
67
68
// add button
69
add_action( 'woocommerce_after_shop_loop_item', array( $this, 'yith_add_quick_view_button' ), 15 );
157
do_action( 'yith_quick_view_custom_style_scripts' );
158
159
wp_localize_script( 'yith-wcqv-frontend', 'yith_qv', array (
160
+ 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
161
'loader' => $loader,
162
'is2_2' => $version
163
)
init.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: YITH WooCommerce Quick View
4
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
6
- * Version: 1.1.3
7
* Author: YITHEMES
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-quick-view
@@ -11,7 +11,7 @@
11
*
12
* @author Yithemes
13
* @package YITH WooCommerce Quick View
14
- * @version 1.1.3
15
*/
16
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
@@ -59,7 +59,7 @@ register_activation_hook( __FILE__, 'yith_plugin_registration_hook' );
59
60
61
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
62
- define( 'YITH_WCQV_VERSION', '1.1.3' );
63
}
64
65
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {
3
* Plugin Name: YITH WooCommerce Quick View
4
* Plugin URI: https://yithemes.com/themes/plugins/yith-woocommerce-quick-view
5
* Description: YITH WooCommerce Quick View allows your users to have a quick look about products.
6
+ * Version: 1.1.4
7
* Author: YITHEMES
8
* Author URI: https://yithemes.com/
9
* Text Domain: yith-woocommerce-quick-view
11
*
12
* @author Yithemes
13
* @package YITH WooCommerce Quick View
14
+ * @version 1.1.4
15
*/
16
/* Copyright 2015 Your Inspiration Themes (email : plugins@yithemes.com)
17
59
60
61
if ( ! defined( 'YITH_WCQV_VERSION' ) ){
62
+ define( 'YITH_WCQV_VERSION', '1.1.4' );
63
}
64
65
if ( ! defined( 'YITH_WCQV_FREE_INIT' ) ) {