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 products and add Parent SKU option to option set. Set Required = No:
Make sure your also bought together products has Parent SKU field:
Now, view a product which has the also bought together products from store front. Verify it has Parent SKU option:
Create a new script in Storefront > Script Manager, insert the code below:
<script>
(function($) {
$('body').on('change', '[data-also-bought-checkbox]', function() {
var $sku = $('.productView [data-also-bought-parent-scope] [data-product-sku]');
$('[data-product-attribute="input-text"]').each(function(i, el) {
var $el = $(el);
if ($el.find('label').text().trim().toLowerCase() === 'parent sku:') {
$el.find('input').val($sku.text().trim());
$el.hide();
}
});
});
})(jQuerySupermarket || jQuery);
</script>
Now view your product page again, you will see that Parent SKU field is hidden:
Add the main product and the also bought product to cart, you will see Parent SKU appear as same as the main product SKU:
This option field also appears on invoices, orders history and so on.
Theme design & customization blog
-
PC Builder for BigCommerce – Build & Buy Custom Computers Online
At PapaThemes, we’re proud to introduce a game-changing feature in the Eyeva Theme for BigCommerce – …15th Aug 2025 -
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:Categories
Navigate
Documentation
Subscribe to our newsletter
Get notifications about our FREE themes and important announcements. We don't mail you if we have no great deals for you!
Did you know?
Free Trial for all our BigCommerce themes.
Request NowNeed 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.