Remove Quantity from a product

Solved
Highlighted
New Member
2 0 1

Hey Bo,

 

I tried following the steps and it didn't work out. Here is a screenshot. I'll be glad if you can guide. Thanks.

 

 

shopify.PNG


@Bo wrote:

Hey there,

 

Bo here from Shopify Support!

 

That is a really great question and you are absolutely heading down the right path to get this done. You will be able to remove the quantity selector from this product by creating a new template and a new section so let's get started.

  • Go to Online Store > Edit Code.
  • Under the Templates folder select "Add a new template". Select product from the dropdown and you can name it what you want, for this case we will simply call it alternate and create the template.
  • On line six replace:

 

{% section 'product-template' %}

with:

 

{% section 'product-template-alternate' %} 

 

  • Click Save.
  • Under the Sections folder you will select "Add a new section". You will name this new section "product-template-alternate".
  • Go to product-template.liquid and copy all the code. Once copied go back to product-template-alternate and paste replace whatever code is there with what you have copied.
  • At the start of line 329 you will add {% comment %} and at the end of line 334 you will close it with {% endcomment %}. The finished product will look like this: 

  • Click Save. 

Now that you have made this change to the code itself you can go ahead and select that template for your product. 

 

Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!

 

All the Best,

Bo


 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1025 97 222

Hey there, @Rafay-Hussain 

 

Could you please confirm the name of the theme that you are using and send me on a link to your store? 

 

Thank You! 

Bo

Bo | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
New Member
2 0 1
Thanks for the reply, Bo. My theme is Minimal and I have fixed it. Thanks
again.
1 Like
Highlighted
New Member
3 0 0

Hi Bo, 

 

Thanks for sharing your knowledge with us! 

 

I attempted to do this but quickly realized it would be different for every theme. I am currently using the Debut theme. Would you be able to help me remove the quantity bar on some of my products? 

 

Looking forward to your reply. Thank you!

 

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1025 97 222

Hey there, @hushlifestyle 

 

So most of the steps are the same as my original posting, you will just need to edit a different line in this new alternate copy of the product-template.liquid. You will need to comment out the following code:

 

            {% if section.settings.show_quantity_selector %}
              <div class="product-form__item product-form__item--quantity">
                <label for="Quantity-{{ section.id }}">{{ 'products.product.quantity' | t }}</label>
                <input type="number" id="Quantity-{{ section.id }}" name="quantity" value="1" min="1" class="product-form__input" pattern="[0-9]*">
              </div>
            {% endif %}

The end result will look like this:

 

 

Let me know how this goes and if there is anything else I can assist you with, I'm happy to help!

 

All the Best,

Bo

Bo | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
New Member
3 0 0

Can you share the same process for venture theme?

0 Likes
Highlighted
New Member
1 0 0

It worked, but it made all my product photos stacked on top eachother instead of being organized in smaller thumbnails with button. Do you have a solution? :)

0 Likes
Highlighted
New Member
3 0 0

Hi Bo, Can you share the same for theme 'Venture' ?

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1025 97 222

Hey there, @opulence 

 

That would be a completely different tutorial, I would recommend posting your request as a new post here in our design forum to get help. 

 

All the Best,

Bo 

Bo | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes