Remove quantity from a product page (Debut theme)

Rachelia
New Member
5 0 0

I am trying to create an alternate template to remove the quantity on only one product, as it will interfere with the variants we have set up, but I'm not having any success based on the previous advice given. We are using the Debut Theme. Any suggestions?

Product page: https://tumblehomeshop.myshopify.com/products/guided-tours-variant-36022649454742?variant=3602264945...

hank yoU!

0 Likes
dmwwebartisan
Shopify Partner
8570 2008 2711

Hey @Rachelia,

If you're creating a new template for a specific product then just remove quantity code from that template. So the quantity box won't show with that template.

Thanks!

 

 

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
Rachelia
New Member
5 0 0

When I create a template for a product, this is all that is on the template:

{% comment %}
  The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}

<script>
  // Override default values of shop.strings for each template.
  // Alternate product templates can change values of
  // add to cart button, sold out, and unavailable states here.
  theme.productStrings = {
    addToCart: {{ 'products.product.add_to_cart' | t | json }},
    soldOut: {{ 'products.product.sold_out' | t | json }},
    unavailable: {{ 'products.product.unavailable' | t | json }}
  }
</script>
{% if product.options.size == 1 %}
  <script>
    var product_variants_removed = [
      {%- for variant in product.variants -%}
        {%- unless variant.available -%}
          `{{ variant.title }}`,
        {%- endunless -%}
      {%- endfor -%}
    ];
  </script>
{% endif %}


I'm trying to avoid editing (and possibly messing with) the main template.  

0 Likes
dmwwebartisan
Shopify Partner
8570 2008 2711

Hey @Rachelia,

As you said you created a new template. Did you create a new template file in sections folder?

We need to check that template file code. Let me know.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
Rachelia
New Member
5 0 0

Thanks for clarifying! I was creating it under Templates, so I went ahead and created a new section called "no quantity". The code that is auto-created is:

{% schema %}
  {
    "name": "Section name",
    "settings": []
  }
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

 

0 Likes
dmwwebartisan
Shopify Partner
8570 2008 2711

Hey @Rachelia,

Yes, that is correct. Just copy code of sections/product-template.liquid file's code ( complete code)  and replace the existing code of your new create a template file.

After a copy of the code, you can remove quantity code from there.

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Check here PageFly App to customize your pages | Bag is a cart drawer that maximizes your sales. View app →
0 Likes
Rachelia
New Member
5 0 0

Thank you - I was able to make it work with your instructions! I appreciate all the help. 

0 Likes
bmaterial
New Member
1 0 0

"you can remove quantity code from there"

can you specify as to what the quantity code looks like?

Thanks

0 Likes