Prevent double add to cart with related products
This commit is contained in:
parent
7f6970c0ae
commit
439d21e395
|
@ -27,6 +27,10 @@ jQuery(document).ready(function($) {
|
||||||
// Ajax action
|
// Ajax action
|
||||||
$.post( woocommerce_params.ajax_url, data, function(response) {
|
$.post( woocommerce_params.ajax_url, data, function(response) {
|
||||||
|
|
||||||
|
var this_page = window.location.toString();
|
||||||
|
|
||||||
|
this_page = this_page.split("?")[0];
|
||||||
|
|
||||||
$thisbutton.removeClass('loading');
|
$thisbutton.removeClass('loading');
|
||||||
|
|
||||||
// Get response
|
// Get response
|
||||||
|
@ -54,7 +58,7 @@ jQuery(document).ready(function($) {
|
||||||
|
|
||||||
// Cart widget load
|
// Cart widget load
|
||||||
if ($('.widget_shopping_cart').size()>0) {
|
if ($('.widget_shopping_cart').size()>0) {
|
||||||
$('.widget_shopping_cart:eq(0)').load( window.location + ' .widget_shopping_cart:eq(0) > *', function() {
|
$('.widget_shopping_cart:eq(0)').load( this_page + ' .widget_shopping_cart:eq(0) > *', function() {
|
||||||
|
|
||||||
// Replace fragments
|
// Replace fragments
|
||||||
if (fragments) {
|
if (fragments) {
|
||||||
|
@ -81,7 +85,7 @@ jQuery(document).ready(function($) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cart page elements
|
// Cart page elements
|
||||||
$('.shop_table.cart').load( window.location + ' .shop_table.cart:eq(0) > *', function() {
|
$('.shop_table.cart').load( this_page + ' .shop_table.cart:eq(0) > *', function() {
|
||||||
|
|
||||||
$("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass('buttons_added').append('<input type="button" value="+" id="add1" class="plus" />').prepend('<input type="button" value="-" id="minus1" class="minus" />');
|
$("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)").addClass('buttons_added').append('<input type="button" value="+" id="add1" class="plus" />').prepend('<input type="button" value="-" id="minus1" class="minus" />');
|
||||||
|
|
||||||
|
@ -90,7 +94,7 @@ jQuery(document).ready(function($) {
|
||||||
$('body').trigger('cart_page_refreshed');
|
$('body').trigger('cart_page_refreshed');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.cart_totals').load( window.location + ' .cart_totals:eq(0) > *', function() {
|
$('.cart_totals').load( this_page + ' .cart_totals:eq(0) > *', function() {
|
||||||
$('.cart_totals').css('opacity', '1').unblock();
|
$('.cart_totals').css('opacity', '1').unblock();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -166,6 +166,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
||||||
* Fix - Cancelling adding an attribute blocks panel
|
* Fix - Cancelling adding an attribute blocks panel
|
||||||
* Fix - Variation duplication respects post status
|
* Fix - Variation duplication respects post status
|
||||||
* Fix - Minimum coupon amount check
|
* Fix - Minimum coupon amount check
|
||||||
|
* Fix - Prevent double add to cart with related products
|
||||||
* Localization - Updated localisations
|
* Localization - Updated localisations
|
||||||
|
|
||||||
= 1.5.6 - 17/05/2012 =
|
= 1.5.6 - 17/05/2012 =
|
||||||
|
|
Loading…
Reference in New Issue