1+ Drop-down on Products

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 (standalone), you will be able to continue using the app on a grandfathered plan.

Any new installs of the Quantity Break app will be redirected to Custom Pricing which has a Quantity Breaks plan available. For more information on Custom Pricing, please visit Custom Pricing: Information and Overview.

 


 

  1. From Shopify's admin, select Online Store.
  2. Select Actions.

    Actions

  3. Select Edit code.
  4. 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.

    select product.liquid

  5. 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

  6. 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

  7. 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

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 %}

 

Was this article helpful?
4 out of 7 found this helpful