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:
Theme design & customization blog
-
The Ultimate Guide to Showcasing Products by Category for All BigCommerce Themes
In today's digital marketplace, the way you display your products can make a significant differen …23rd May 2023 -
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 …9th Sep 2019 -
Identify which products bought together belong to the main product in Supermarket theme
Solution:Create a product option named Parent SKU:Edit the option set of your also bought together p …9th Sep 2019