Make a selection

1+ Drop-down on Products

Laurel
Laurel
  • Updated

On products with the standard Default Title variant name, Quantity Breaks replaces this with the 1+ value. Some themes won't hide the variant selector if the variant isn't named Default Title, and this code adds the exception to hide the variant selector if the title is 1+ instead.

If you see a 1+ drop-down on your quantity break products it is due to the way your theme's code is laid out.

To fix this, please follow the steps below.

Alert

  • The Quantity Breaks (standalone) app is no longer available for new installations. If you are currently using Quantity Breaks, you will be able to continue using the app on a grandfathered plan.
  • New requests for Quantity Breaks will be directed to Custom Pricing. Custom Pricing's Select plans can be used to create quantity breaks. For more information on pricing, please visit Custom Pricing Overview.
  • If you'd like move from Quantity Breaks (standalone) to Custom Pricing, please visit Switch from Quantity Breaks to Custom Pricing.

 


 

  1. From Shopify's admin, navigate to Sales channels > Online Store > Themes.
  2. Click the ellipsis next to your desired theme, and select Edit code.
  3. Under Templates, select product.liquid.

    Note: If your theme contains sections, you may have to make these changes in a different file, like product-template.liquid under "Sections". Some themes will have this in the short-form.liquid or product-form.liquid file.

  4. Look for a line similar to this:
    {% if bold_variants_size == 1 and product.variants.first.title contains 'Default' %}

    look for a line like this

  5. Add this code to the end of the line:
    or product.variants.first.title contains '1+'

    The result should look similar to this:

    {% if bold_variants_size == 1 and product.variants.first.title contains 'Default' or product.variants.first.title contains '1+' %}

    add this code to the end of the line

  6. Select Save.

Caution: Do not add {% if shappify_qb_options_count == 1 and product.variants.first.title contains Default. If the theme doesn't already have this, another method will need to be used to fix this.

If the theme doesn't have the above code you can try adding this script below, just after the </form> tag in the product.liquid (file) or product.template (sections).

{% comment %} added by bold for hide single option selector {% endcomment %}
{% if bold_variants_size == 1 and product.variants.first.title contains 'Default' or product.variants.first.title contains '1+' %}
<script>
$(window).load(function(){
$('.selector-wrapper').hide();
});
</script>
{% endif %} 
{% comment %} end of bold added code to hide single option selectore {% endcomment %}