Conditional listing of Secondary product

Conditional listing of Secondary product

1 0 0

I have primary & secondary products. I need to get the selections for secondary product displayed only after at least making 1 item selection in the primary product. Is it possible to do that directly from or if there are any applicable shopify apps to it. I request a specific response please.

Reply 1 (1)

Shopify Partner
528 16 36



First ensure your Shopify product template includes both primary and secondary product selection inputs.

After that use javascript

Example code

document.addEventListener('DOMContentLoaded', function() {
  var primaryProductSelector = document.querySelector('#primary-product-selector');
  var secondaryProductSelections = document.querySelector('.secondary-product-selections');

  primaryProductSelector.addEventListener('change', function() {
    if (primaryProductSelector.value) { = 'block';
    } else { = 'none';
Click here to Contact and Get Shopify Store Help
E-mail -
We are Shopify Experts   from Ecommerce Small Task Company.