Shopify themes, liquid, logos, and UX
I am trying to remove the quantity picker from one of my products as i am using a variant to chose the quantity as there is discounts if you buy more.
I think i have found the code and know i need to make a new template and section to have my page go to this code.
Capture 1 is the code i believe i need to edit or change.
Would anyone be able to help. i am using the Brooklyn Theme
Solved! Go to the solution
This is an accepted solution.
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.
{% section 'product-template' %}
with:
{% section 'product-template-alternate' %}
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
Bo | Retired Staff Member
This is an accepted solution.
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.
{% section 'product-template' %}
with:
{% section 'product-template-alternate' %}
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
Bo | Retired Staff Member
Hi Bo,
I'm also a newbee with Shopify and I have followed your instructions on how to make an alternate product page template and thereafter comment out the Quantity selector.
At first view it works fine (no quantity selector appears on the product page where I have assigned the my new alternate product page template:-)) - but when I use the new alternate product template it seems that I loose some of the regular settings. For instance, the Social sharing icons ar also gone and the styling of the submit to card button is gone too.
Do I have to do some changes in "settings_data.json", "social-sharing.liquid" or some other setting-files to get the altenate product page to act like my normal product pages.
Snap_1.png:
My normal product page
Snap_2.png:
The product where I have used the new alternate product Page Template (As you can see, The Social Sharing section is gone and the styling off the submit button is also gone.
Can you please guide me in this matter?...thanks in advance....
/Ulf
Hey there, Ulf!
This tutorial was specific for an unedited version of the Brooklyn theme. Is this the theme that you are currently using?
All the Best,
Bo
Bo | Retired Staff Member
Hi Bo and sorry for the delayed reply.
I've solved the issue my self...actually right after I posted my request. It seemed that I just had to update my Shopify settings for that particually the page where I had assigned the new template :-). So all is working great now.
But thanks for your rapid reply to my question in the first place 🙂
Best Regarda
/Ulf
Brilliant! I am so glad this worked out for you in the end!
All the Best,
Bo
Bo | Retired Staff Member
heyy Bo,
can you suggest me the best way to catch variant change event on product page.
Hey there, @1234567891
I would recommend posting this query in our awesome API and Technology Community. I would not know how to implement that kind of tracking, however, someone in the community might! It's the best place to get help from both Shopify's dev team and other developers for assistance with API related questions and development.
All the Best,
Bo
Bo | Retired Staff Member
Hi! I want to remove the quantity only from certain products on my store (more than one but not all). How would I go about doing this? I am using Debut theme. Would what was previously suggested work for this?
Also, is there a way to change the name of the quantity selector? Also just for certain products.
Any help on this would be greatly appreciated!
Hey there, @AidanSchaper
I would recommend posting this query in the Design Community board to get more eyes on it as this is a relatively old post. I would love to look into it for you so feel free to @Bo me in the new post.
All the Best,
Bo
Bo | Retired Staff Member
Bo, I did this and it worked fine on the Venture theme product page, but then when i view my cart the quantities choice reappears. How do I go about removing the quantities choices on the cart of one specific product?
Thx
Wonderful!! I am glad to hear that this worked on the product page. Removing the quantity selector for all products in the cart page would be relatively easy, however, having it appear and remove based on the product will be more complicated. If you want it to only not show on certain products I would recommend reaching out to a Shopify Expert.
<p> <a href="{{ routes.cart_change_url }}?line={{ forloop.index }}&quantity=0">{{ 'cart.general.remove' | t }}</a> </p> </td> <td class="cart__cell--quantity"> <label for="Updates_{{ item.key }}" class="cart__quantity-label medium-up--hide">{{ 'cart.label.quantity' | t }}</label> <input type="number" name="updates[]" id="Updates_{{ item.key }}" class="cart__quantity" value="{{ item.quantity }}" min="0" data-line="{{ forloop.index }}" aria-label="{{ 'cart.label.quantity' | t }}"> </td>
{% comment %} <p> <a href="{{ routes.cart_change_url }}?line={{ forloop.index }}&quantity=0">{{ 'cart.general.remove' | t }}</a> </p> </td> <td class="cart__cell--quantity"> <label for="Updates_{{ item.key }}" class="cart__quantity-label medium-up--hide">{{ 'cart.label.quantity' | t }}</label> <input type="number" name="updates[]" id="Updates_{{ item.key }}" class="cart__quantity" value="{{ item.quantity }}" min="0" data-line="{{ forloop.index }}" aria-label="{{ 'cart.label.quantity' | t }}"> </td> {% endcomment %}
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 | Retired Staff Member
Hello,
So tested the solution, using Debut theme as well.
But did not work for me.
On product page I had 2 buttons showing (capture here).
And I had an error when clicking on one of them.
What I'm trying to achieve is removing quantity from product, so when clicking on "buy now" button it redirects to cart without adding a quantity (if there's already 1 product in cart, if 0 than it adds 1, if 1 than adds 0).
Hi Bo,
I'm using Brooklyn theme and I would like to remove the quantity box on the cart slider. Is it possible? If yes, please let me know how it could be done!
Hey there, @marbil_1
I would recommend posting this query in the Design Community board to get more eyes on it as this is a relatively old post. I would love to look into it for you so feel free to @Bo me in the new post.
All the Best,
Bo
Bo | Retired Staff Member
Are we also be able to remove quantity selector on the cart page?
That can be done for sure. What version of what theme are you currently using? These tutorials are very specific to the theme and version. If you would like, you can create a new thread altogether about this in the design forum so other people can chime in on how to help and find the answer you get when they are looking for the same solution!
All the Best,
Bo
Bo | Retired Staff Member
Thank you for confirming, @AnnCodi39. In that case, I would recommend starting a new thread, as the theme is the third party I would not be the best to advise you. You could also hire a Shopify Expert.
All the Best,
Bo
Bo | Retired Staff Member
User | RANK |
---|---|
219 | |
153 | |
61 | |
52 | |
46 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023