How to make standard quantity to 6? (Studio theme)

martijn18
New Member
6 0 0

Hi,
How do I make it such that when customers go to the product page, the default quantity is already set to 6? However, we do want to allow customers to remove or add quantity with increments of 1, so that they can also order for example 2 or 9 products.

Replies 6 (6)

ThePrimeWeb
Shopify Partner
2119 606 470

Hey @martijn18,

 

Can you share the link to your store please? Thanks!

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
martijn18
New Member
6 0 0

marwijn.com

ThePrimeWeb
Shopify Partner
2119 606 470

Hey @martijn18,

 

The store is password protected, can you share the password or disable it temporarily?

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
martijn18
New Member
6 0 0

It’s off now!

ThePrimeWeb
Shopify Partner
2119 606 470

Hey @martijn18,

 

Go to your theme's "Edit Code" Option, then in the search bar type "theme.liquid"
Above the tag "</body>" tag paste the following. Screenshot attached for reference.

<script>
document.addEventListener('DOMContentLoaded', function() {
   try {
      document.querySelector('input.quantity__input').value = 6; 
   } catch {} 
});
</script>

 

Screenshot for reference

ThePrimeWeb_0-1713964531899.png

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
Check out our interview with Shopify!
martijn18
New Member
6 0 0

Thank you, is it also possible to only do it for certain products? Maybe trough collections, product category of product type?