amcg Posted October 23, 2014 Posted October 23, 2014 (edited) I would like to use the product pages on my site to display my products, but because I am not actually selling online, I need to hide the following elements: Add to Cart button Quantity area Price Edited October 23, 2014 by ashmac jessewaugh and lisam10s 2
Solution amcg Posted October 23, 2014 Author Solution Posted October 23, 2014 (edited) There are a couple of other, related answers to this questions, however this is the code I found which works. The main section of the code is: .product-price, .product-quantity-input, .sqs-add-to-cart-button-wrapper { display:none; } This code can be altered to only affect one or two of the elements by removing certain lines. Remove .product-price, from the code if you want to continue to display the price of the product. Add this code to the Custom CSS Editor if you want all product pages to be affected. If you would like this code to affect individual product pages, you can add it to the Page Code Injection area. Go to Product Settings > Advanced > Page Header Code Injection on your product page and paste in this code: <style> .product-price, .product-quantity-input, .sqs-add-to-cart-button-wrapper { display: none; } </style> This code can be used if you would like to add PayPal buttons within your products pages. Add the PayPal button code within the Additional Info area of each product, and then hide the Add to Cart button with the above CSS. Hopefully this helps anyone else! Edited October 23, 2014 by ashmac lisam10s and embodygreen 2
Russdb705 Posted February 6, 2015 Posted February 6, 2015 I have added about 20 pages (separate from the woocommerce product page) and want quantity + price on the add-to-cart button, currently only the price shows (as per the woocommerce page), how do I add the "quantity" part to just those pages?thanks
amcg Posted February 6, 2015 Author Posted February 6, 2015 Hi there - I'm not sure I understand you here. Are you using the built in Product Pages on your Squarespace site? Or have you linked to a WooCommerce store?
Russdb705 Posted February 6, 2015 Posted February 6, 2015 sorry, it was a general question, there are WooCommerce pages and these are separate from those, I just wanted to add a Quantity option for just those pageRuss
amcg Posted February 6, 2015 Author Posted February 6, 2015 Do you mean that your products don't have a built in quantity option, and appear like this?: http://take.ms/NQ3Df
Russdb705 Posted February 6, 2015 Posted February 6, 2015 no, these are Pages I've created, kind of a display page for the product, now I've added an add-to-cart button to them, but there are no Quantity parts to it, I want to add a Quantity part on just these pages, in case the customer wants to buy from here
amcg Posted February 6, 2015 Author Posted February 6, 2015 @Russdb705 It sounds like you should sent an email to Squarespace support here so that they can take a look at your site and help you out: http://help.squarespace.com/ask-a-person/
Rustic99 Posted April 14, 2015 Posted April 14, 2015 (edited) How I can add PayPal pay butons to my site? I have searched many website platforms and no one seems to have the ability to accomplish this simple (or what i think is simple) thing: Add products to a cart for immediate payment as pick up will be at the warehouse where they are located. OR Add products to a form or a list for this list to be emailed as a QUOTE where we will need to determine a shipping cost based on on the size of the order and where it is being shipped to in Canada (it’s furniture thus this isn’t a case of UPS-PUROLATOR). Any help would be of great appreciation. Stephanie Edited April 14, 2015 by Rustic99
willateam Posted April 26, 2015 Posted April 26, 2015 I'm not sure if the '.product-price' code on this link answers this. Are we talking about the whole suite of elements on the product page, or one product itself (are there singular pages of code for each product described, so that CSS would work on just one?). But this is the closest I've found so far to the problem of 'disabling' a product on the product page so that it is basically just an image and not associated with the shopping cart or any mouseovers. I am trying to disable a single item, and keep the image on the product page. But am not familiar with CSS code. Please comment. This seems to be a popular question. Link:http://answers.squarespace.com/questions/56666/how-can-i-hide-the-add-to-cart-quantity-and-price-from-my-product-page
amcg Posted April 27, 2015 Author Posted April 27, 2015 (edited) Also! This will only stop the price from displaying on each individual product’s page. For the main product page, use this code in the Style Editor/Page Settings: #productList .product .product-price { display: none !important } Edited April 27, 2015 by ashmac
amcg Posted April 27, 2015 Author Posted April 27, 2015 @willateamThis was originally for each individual product's page - I've added an additional comment above for the main page.If you want to disable these options on just one specific product, this code won't work. Instead, you'll need to target each specific item before using code similar to this. Here is another Answers post to help: http://answers.squarespace.com/questions/38508/only-hiding-price-and-add-to-cart-from-some-products Here's a screenshot of the exact code that worked for me using those instructions: http://take.ms/n0DGK **Note the Quantity line has changed to "-input"
amcg Posted April 27, 2015 Author Posted April 27, 2015 @Rustic99 - this isn't possible using Squarespace I'm afraid. The Form Block with areas to allow people to link to the products they want might work. Otherwise, you'll need to look into third party apps which can be embedded on your Squarespace site.
Habitant Posted June 1, 2015 Posted June 1, 2015 This worked great, up to a point. The fatal flaw is in the display of the thumbnail gallery images, which continue to show the price, whereas the individual items do not. Arrgghh..
Laurie616 Posted March 14, 2016 Posted March 14, 2016 @ashmac Thanks so much for all the info on this thread! It looks exactly like what I need! The one crucial part I'm missing though: Go to Product Settings > Advanced > Page Header Code InjectionI cannot find anywhere the Product Settings tab!!! Please help, thank you!
hellolovehandmade Posted July 8, 2016 Posted July 8, 2016 I am wondering if the code shared above be altered and used to solve an additional issue I am having...I am wanting to SHOW the quantity left of each product on the main products page. @ashmac
mcat Posted August 24, 2016 Posted August 24, 2016 Hi. I have tried this but it is not working. Any help very appreciated. Goal: To hide Price - Quantity - Cart button from a product page collection. Tested but FAILED: 1) Custom CSS Editor: collection-576dcb613e00bed84f035031 { .product-price, .product-variants, .product-quantity-input, .sqs-add-to-cart-button-wrapper {display:none;} 2) Page Header Code Injection: Neither work. Can some tell me what needs to be adjusted? Thank you.
mcat Posted September 9, 2016 Posted September 9, 2016 @ashmac @willateam @Laurie616 Any updates? This code isn't working. Please see my comment below in thread. Any help would be really appreciated. Thank you!
LindaG Posted September 16, 2016 Posted September 16, 2016 Thanks Ashmac! Regarding hiding the price on the main products page... got to Design > Style Editor, find the PRODUCTS heading and uncheck "Show Product Price". L.
Guest Posted November 21, 2016 Posted November 21, 2016 Hi, it looks like people are missing the ".sold-out" container, which is higher up in the DOM. This is an answer that actually works. Put this in the custom CSS for your site: .sold-out .sqs-add-to-cart-button{ visibility:hidden;}
Guest Posted November 23, 2016 Posted November 23, 2016 Hello, this worked great for me.. but how do i remove the TEXT that says "Sold Out" above the Add To Basket on a Product detail page? thanks!
jessewaugh Posted December 9, 2016 Posted December 9, 2016 Same here - it removed the box but not the text.
alexanderbiscajin Posted November 2, 2017 Posted November 2, 2017 (edited) You don't have to worry about how you going to remove the add to cart buttons from shop page or any specific product page. Now you just have to follow these simple steps to disable the add to cart button from your Shop page. Add this code to woocommerce.php (located wp-content/plugins/woocommerce): function WpBlog() { removeaction( 'woocommerceaftershoploopitem', 'woocommercetemplateloopaddtocart'); removeaction( 'woocommercesingleproductsummary', 'woocommercetemplatesingleaddto_cart'); return WooCommerce::instance();} You will see that the add to cart button has been disabled. Now you can also remove or hide the button from product pages. Just put this code in functions.php addfilter('woocommerceispurchasable', 'wpblogspecific_product'); function wpblogspecificproduct($purchaseableproductwpblog, $product) { return ($product->id == specificproductid (512) ? false : $purchaseableproductwpblog); } If you still having difficulty doing the following steps you can just see that as reference https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/ Edited November 2, 2017 by alexanderbiscajin Initial Revision I am a WordPress expert. I have been working on WordPress since last Three years.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment