D_Schneider Posted November 7, 2013 Share Posted November 7, 2013 (edited) Hello, I have been trying to remove the 'Quantity Select' field from my store for days now and I can not get rid of it. I have injected the code that has been posted on Squarespace: and it works great on everything apart from the 'Quantity'. I simply cannot figure out hot to get rid of it. Has anyone figured this out yet? Edited November 8, 2013 by D_Schneider Link to comment
e2astudio Posted November 7, 2013 Share Posted November 7, 2013 (edited) Looks like you have the wrong class on the quantity - it's -input not -select. <style> .sqs-add-to-cart-button-wrapper, .product-price, .product-quantity-input { display:none; visibility:hidden; } </style> Better yet, it's easier if you just hide the wrapper that holds the button and quantity like this: .product-add-to-cart, .product-price { visibility: none; display: none; } Edited November 7, 2013 by esquareda brigidc.campbell 1 Link to comment
D_Schneider Posted November 8, 2013 Author Share Posted November 8, 2013 Hi, Thanks for your suggestion. I tried the addition of '!important', and still nothing. The 'add to cart', 'price' everything else I can get rid of at will, but the 'quantity select' simply will not budge. I would very much appreciate any additional suggestions. Link to comment
e2astudio Posted November 8, 2013 Share Posted November 8, 2013 @D_Schneider I've corrected my answer, realized you were calling the wrong class for the quantity. Link to comment
D_Schneider Posted November 8, 2013 Author Share Posted November 8, 2013 Awesome!!I knew I had to be missing something obvious. Thanks a million it worked perfectly. Link to comment
Solution Trey_SQSP Posted March 14, 2017 Solution Share Posted March 14, 2017 (edited) It looks like the answer offered hides the Add to Cart, and the Price as well. If you only want to hide the Quantity input field but keep all the rest, you can add this to the custom CSS editor: .product-quantity-input { display:none !important; } This will affect products site wide, so if you need this for only a specific product page, you can add this in style tags via the page header code injection: <style> .product-quantity-input { display:none !important; } </style> Edited March 14, 2017 by TreyT Initial Revision amanda4, XavierCastelan, Jeremyn and 3 others 3 3 Link to comment
SFPotter Posted January 13, 2018 Share Posted January 13, 2018 fantastic. thanks for this information - now I see all the options! Link to comment
Guest Posted November 5, 2018 Share Posted November 5, 2018 Has something changed recently (does the page header code injection code need to be updated)? I used the code suggested above to hide the quantity on a product page successfully -- when I placed two products from that page on different site pages, the quantity didn't appear (as desired). This morning I'm adding another product from that same product page to another site page, and the product is displaying the quantity (not desired). Link to comment
Guest Posted November 5, 2018 Share Posted November 5, 2018 In trying to resolve my issue (above), I created a new product on the page, inserted it into my site page, and the quantity didn't appear, as desired. It looks like products on the page that I created before I added the page header code injection will still show the quantity....word to the wise. Link to comment
Guest Posted November 5, 2018 Share Posted November 5, 2018 I thought I had resolved my issue by creating a new product on the page that had the page header code injection to hide the quantity. Am appealing to @TreyT -- your page header code injection was so helpful, initially! Products I create on the same product page are now displaying the quantity -- it's no longer hidden (although it's hidden on a couple of the products on the same page, so the behavior is inconsistent). I'm stumped.... Link to comment
Trey_SQSP Posted November 5, 2018 Share Posted November 5, 2018 Can you link to the page where you are having this issue? Link to comment
Guest Posted November 5, 2018 Share Posted November 5, 2018 Thank you -- I've figured out a workaround, by changing the Checkout Settings to hide the Quantity for service products: SERVICE PRODUCTS QUANTITYShow the Quantity field for service products anywhere they appear, allowing customers to buy more than one. I have some folks testing the product on this page: https://www.serfa.org/2019-official-showcase-app The quantity is only hidden because I unchecked the box for the Service Products Quantity. When I check it, it shows up again, even though the code injection you provided is applied to that product's page... Link to comment
Trey_SQSP Posted November 5, 2018 Share Posted November 5, 2018 The page you linked to doesn't have anything entered for the code injection. The code would need to be added to each page you need the quantity to be hidden on. Can you add the code to the code injection on the page you linked, and enable the quantity on service products to confirm if you still have the same problem? Link to comment
Guest Posted November 5, 2018 Share Posted November 5, 2018 That worked, thanks so much! I thought the code injection had to live on the Product Page that I created the product on, not that it had to be added to any page that the product appeared on. Thanks again so much! Link to comment
Trey_SQSP Posted November 5, 2018 Share Posted November 5, 2018 You bet! Glad it worked out! Link to comment
ChoreoKeeper Posted July 11, 2019 Share Posted July 11, 2019 Building on the answers above, here's how I was able to disable the Quantity Input field for only a certain product of mine. #item-5cf80e81e8cc64000165751d .product-quantity-input { display:none !important; } Link to comment
SStanford Posted February 16, 2020 Share Posted February 16, 2020 I've tried all the codes listed above to remove the Quantity field but none work! Quite bizarrely; when you visit the page the quantity field displays then when you refresh they disappear. Does anyone know how I can remove the quantity field completely? Link to page can be found here: https://www.level-executive.com/cv-support Link to comment
paul2009 Posted February 16, 2020 Share Posted February 16, 2020 (edited) On 2/16/2020 at 5:59 PM, SStanford said: I've tried all the codes listed above to remove the Quantity field but none work! @SStanford The answer by TreyT, voted best answer, is correct. Use the first solution he provided, and add it to Custom CSS. Do not add it to the Code Injection area as this is not read when the page is loaded after visiting another page - unless you hit refresh. This is due to Ajax on newer templates like yours. Edited January 21 by paul2009 Olokoi 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
debazer914 Posted March 2, 2020 Share Posted March 2, 2020 Hey there. The simple code from Trey T is working in my Custom CSS editor for all products, but I want to target a single product on an index page with many other products. Does any body have a suggestion? Can I target the particular index page, or would I try to seek out this particular product block's ID?https://apricot-elephant-5wex.squarespace.com/food-experiences/ Tone 1 Link to comment
tuanphan Posted March 3, 2020 Share Posted March 3, 2020 15 hours ago, debazer914 said: Hey there. The simple code from Trey T is working in my Custom CSS editor for all products, but I want to target a single product on an index page with many other products. Does any body have a suggestion? Can I target the particular index page, or would I try to seek out this particular product block's ID?https://apricot-elephant-5wex.squarespace.com/food-experiences/ Private Site This site is currently private. If you’re the owner or contributor Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
PMcWebber Posted April 19, 2020 Share Posted April 19, 2020 I can't see what Trey responded to that removes all commerce related items. I'm looking to remove/hide SITE WIDE Add to Cart Price (on each product page and the Shop main page/gallery/collection whatever you want to call it) Quantity Variable (Color in this case) The code I can see for quantity works great. .product-quantity-input { display:none !important; } Thanks! Link to comment
PMcWebber Posted April 19, 2020 Share Posted April 19, 2020 I can't see what Trey responded to that removes all commerce related items. I'm looking to remove/hide SITE WIDE Add to Cart Price (on each product page and the Shop main page/gallery/collection whatever you want to call it) Quantity Variable (Color in this case) The code I can see for quantity works great. .product-quantity-input { display:none !important; } Thanks! Link to comment
PMcWebber Posted April 19, 2020 Share Posted April 19, 2020 Hey, I seem to have stumbled on it! .product-quantity-input { display:none !important; } .product-price { visibility: none; display: none; } .sqs-add-to-cart-button-wrapper { display: none !important; } Link to comment
Guest Posted October 29, 2020 Share Posted October 29, 2020 On 3/14/2017 at 6:37 PM, TreyT said: It looks like the answer offered hides the Add to Cart, and the Price as well. If you only want to hide the Quantity input field but keep all the rest, you can add this to the custom CSS editor: .product-quantity-input { display:none !important; } This will affect products site wide, so if you need this for only a specific product page, you can add this in style tags via the page header code injection: <style> .product-quantity-input { display:none !important; } </style> Do you maybe know how to inject a Shopify Button into the product page? Link to comment
tuanphan Posted October 31, 2020 Share Posted October 31, 2020 On 10/30/2020 at 5:25 AM, MIL said: Do you maybe know how to inject a Shopify Button into the product page? Edit Product > Additional Info > Add Code Block > Paste your Shopify Code If you want to move it to any position in Description, please describe in detail, we can help easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment