null

Auto update quantity of products bought together according to the main product qty in Supermarket theme

Insert the code below to Storefront > Script Manager:

<script>

(function($) {

$('body').on('change', '[data-also-bought-parent-scope] [data-quantity-change] input', function(event) {

var qty = $(event.currentTarget).val();

$('[data-also-bought] [data-quantity-change] input').val(qty);

});

$('body').on('click', '[data-also-bought-parent-scope] [data-quantity-change] [data-action]', function(event) {

$(event.currentTarget).closest('[data-quantity-change]').find('input').trigger('change');

});

})(jQuerySupermarket || jQuery);

</script>

Screenshot:

Check a product on your store front:

9th Sep 2019 Papathemes

Theme design & customization blog

  • Auto update quantity of products bought together according to the main product qty in Supermarket theme

    Insert the code below to Storefront > Script Manager:

Did you know?

Free Trial for all our BigCommerce themes.

Request Now

Need help? Don't hesitate to ask us. We'll reply shortly.

All our BigCommerce themes are 100% compatible with the Standard, Pro, Enterpise edition. Built with Stencil / Cornerstone framework.