Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 1

How can I hide the Add to Cart, Quantity and Price from my product page?


amcg
Go to solution Solved by amcg,

Question

  • Answers 55
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

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

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-c

I'm working within the 7.1 system, and here is a way to hide the product selection drop down menu (such as for "Select Size"), the quantity selection box, and the Add to Cart button on an individual p

Posted Images

Recommended Posts

  • 5

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 by ashmac
Link to post
  • 1

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 by ashmac
Link to post
  • 1

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.

Link to post
  • 1

I'm working within the 7.1 system, and here is a way to hide the product selection drop down menu (such as for "Select Size"), the quantity selection box, and the Add to Cart button on an individual product level basis. This way you can hide these elements on products within a given store page without having to use a blanket approach that affects more than specific products.

We'll do this by creating a tag called "hideorder" and tagging any product with this tag name for which we want to hide all of these ordering options. So to start, take a single product and create a tag called "hideorder." To learn more about tags, see: https://support.squarespace.com/hc/en-us/articles/205814438)

Next, add this code to your site's Custom CSS:

 

/* ----------------- ultra-fresh "ORDER INTERFACE Be-Gone"  ----------------- /
/*  add "hideorder" tag to any page to remove dropdown, quantity, and order button  */


/*  remove select size dropdown  */
article .tag-hideorder .variant-option {
    display: none;
}

/*  remove quantity dropdown  */
article .tag-hideorder .product-quantity-input {
    display: none;
}

/*  remove order button  */
article .tag-hideorder .sqs-add-to-cart-button-wrapper {
    display: none;
}

 

That should do it. Seems to work nicely. Also, you can adjust the code by deleting lines if you want parts of the product ordering system to appear but not others (for whatever reason). Or of course you could create additional tag names with different attributes built off this code. I hope this makes sense. Good luck!

Link to post
  • 0

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

Link to post
  • 0

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?

Link to post
  • 0

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

Link to post
  • 0

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:

  1. Add products to a cart for immediate payment as pick up will be at the warehouse where they are located. OR
  2. 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 by Rustic99
Link to post
  • 0

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

Link to post
  • 0

@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"

Link to post
  • 0

@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.

Link to post
  • 0

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..

alt text

alt text

Link to post
  • 0

@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!

Link to post
  • 0

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;}

Link to post
  • 0

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 by alexanderbiscajin
Initial Revision

I am a WordPress expert. I have been working on WordPress since last Three years.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...