Shopify themes, liquid, logos, and UX
Hi 🙂
i would like to hide the quantity selector for free products with 0,00€
Can somebody help pls?
www.pepelini.de
Solved! Go to the solution
This is an accepted solution.
Step 1: Navigate to your Shopify admin panel and go to "Online Store."
Step 2: Click on "Themes" and then select Edit code
Step 3: Find snippets/cart-drawer.liquid line
281 for dawn theme and search <quantity-popover> before it add {% if item.original_line_price > 0 %}
and after </quantity-popover> add
{% endif %}
it will solve your issue.
Let me inform is that ok for you.
This is an accepted solution.
In that case search <quantity-input it must exits
This is an accepted solution.
Put the first code before it {% if item.original_line_price > 0 %} <quantity-input like this and also after it
</quantity-input> {%- endif -%}
it will solve
thank you
This is an accepted solution.
Yes, please insert at the end of that tag also
This is an accepted solution.
Can you check after restore the code, just the issue occurred or not. What I understand your app or any other login ended the card item again and remove that.
This is an accepted solution.
Please sections/main-cart-items.liquid edit the file and add the same code like my screen shot. it will solve your issue
Please do not forget to accept the solution as solved and like our solution.
Thank you
This is an accepted solution.
thanks it worked! But if i go to checkout and then go back, then its again possible to select the quantity.
This is an accepted solution.
Hello, @LinisCandy
You made mistake the product oder is chagned , the 00 price product has not quantity selector 🙂
Since your site is on Shopify, to hide the quantity selector for products priced at 0,00€, you can achieve this by modifying your theme's code. Here's how you can do it:
Log in to your Shopify Admin: Go to your Shopify admin dashboard.
Go to Themes:
Locate the Product Template:
Add Conditional Logic: Find where the quantity selector is rendered in the code, which might look something like:
You can wrap this with a condition to check the product price:
This will ensure that the quantity selector only appears if the product price is greater than 0,00€.
Save the Changes: After adding the code, save the changes.
Test the Change: Check your product pages to ensure that the quantity selector is hidden for free products and still visible for those with a price.
If you're using Shopify Plus, you can leverage Shopify Scripts to manage more advanced customizations, like hiding certain elements based on price.
Hi 🙂
thanks! But i cant find the correct selcetor in the code
This is an accepted solution.
Step 1: Navigate to your Shopify admin panel and go to "Online Store."
Step 2: Click on "Themes" and then select Edit code
Step 3: Find snippets/cart-drawer.liquid line
281 for dawn theme and search <quantity-popover> before it add {% if item.original_line_price > 0 %}
and after </quantity-popover> add
{% endif %}
it will solve your issue.
Let me inform is that ok for you.
Hi 🙂
thanks, but there is no "<quantity-popover>" Maybe somehting different?:)
This is an accepted solution.
In that case search <quantity-input it must exits
Yes, yes, how should i put the code here then?:)
Are you looking for something design related or code?
yes, how should i put the code here then?:)
This is an accepted solution.
Put the first code before it {% if item.original_line_price > 0 %} <quantity-input like this and also after it
</quantity-input> {%- endif -%}
it will solve
thank you
like here?:)
This is an accepted solution.
Yes, please insert at the end of that tag also
thanks it worked! But now if im in the cart page, it will be automatically removed after some seconds
You can check here: https://pepelini.de/products/pengi-bundle
This is an accepted solution.
Can you check after restore the code, just the issue occurred or not. What I understand your app or any other login ended the card item again and remove that.
yes i checked, there was a problem with another app. Now it stays, but you can increase he amount on the cart page. I would like to remove it from there also.
This is an accepted solution.
Please sections/main-cart-items.liquid edit the file and add the same code like my screen shot. it will solve your issue
Please do not forget to accept the solution as solved and like our solution.
Thank you
This is an accepted solution.
thanks it worked! But if i go to checkout and then go back, then its again possible to select the quantity.
This is an accepted solution.
Hello, @LinisCandy
You made mistake the product oder is chagned , the 00 price product has not quantity selector 🙂
Hi 🙂
sorry! you are right. Many many thanks for your great help really appreciate it!
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024