I Want to 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, please follow these steps:

  1. From the Shopify admin, navigate to Sales channels > Online Store > Themes.

  2. Click the ellipsis next to your desired theme, and select Edit code.

  3. Under Snippets, create a new snippet file titled "bold-custom".

  4. Enter this code into the file:
    <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>
  5. Select Save.

  6. Under Layout, select theme.liquid.

  7. Copy and paste the following code directly below the {{ content_for_header }}line:

    {%- render 'bold-custom' -%}

  8. Select Save.