PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.8
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.8
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / assets / js / modules / side-cart / side-cart.js

side-cart.js in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 1.8, at assets/js/modules/side-cart/side-cart.js

32 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";
2
3 /**
4 * Merchant side cart
5 *
6 */
7
8 jQuery(document).ready(function ($) {
9 if (merchant.setting.hasOwnProperty('show_after_add_to_cart_single_product')) {
10 if ($('body.single-product') && $('.woocommerce-notices-wrapper').is(':visible')) {
11 $('body').toggleClass('merchant-floating-side-mini-cart-show');
12 $(window).trigger('merchant.floating-mini-cart-resize');
13 }
14 }
15
16 // Add to cart AJAX event.
17 if (merchant.setting.hasOwnProperty('add_to_cart_slide_out')) {
18 $(document.body).on('added_to_cart', function (event, fragments, cart_hash, $button) {
19 $('body').toggleClass('merchant-floating-side-mini-cart-show');
20 $(window).trigger('merchant.floating-mini-cart-resize');
21 });
22 }
23
24 // On cart URL click
25 if (merchant.setting.hasOwnProperty('cart_url')) {
26 $('[href="' + merchant.setting.cart_url + '"]').on('click', function (e) {
27 e.preventDefault();
28 $(window).trigger('merchant.floating-mini-cart-resize');
29 $('body').toggleClass('merchant-floating-side-mini-cart-show');
30 });
31 }
32 });