Top

Hide the 1+ Variant (from Quantity Breaks) in the Upsell Window

If you would like to hide the 1+ variant from Quantity Breaks in the upsell window, following these steps:

  1. From "Shopify Admin", select Apps.
  2. Select Product Upsell.
  3. Select Upsell Settings.
  4. Scroll down to the "Custom Design" section.
  5. Enter this JavaScript into the Custom HTML/css text box:
    <script>
    jQuery(window).bind("load", function () {
    $( "#upsell_upsell_form #var_id" ).each(function( index ) {
    $QB_var = $(this).text().trim();
    console.log($QB_var, typeof($QB_var), $QB_var.slice(0,1), $QB_var.length);
    if ($QB_var.slice(0, 1) == "1" && $QB_var.length <= 4 ) {
    $(this).remove();
    }
    });
    });
    </script> 
  6. Select Save.

That's it!

Have more questions? Submit a request