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

Question

Recommended Posts

  • 0

I've been trying the code provided by @ashmac but I keep getting a syntax error for the first line of it. Am I doing something wrong? I'm not a coder. The website already has some code in it that I am adding to.

Edited by BluePearl
Initial Revision
Link to comment
  • 0

Is there a way to default to one particular product variant's price as the display price rather than "from $20.00"? I do not want the lowest price as what people see but the highest due to the nature of what I am selling and not wanting to appear misleading.

Link to comment
  • 0

I am having an unexpected error while removing add to cart button on my product page. I am using this tutorial for my reference code https://wpitech.com/hide-disable-add-to-cart-button-in-woocommerce-store/ . Is there any other way to hide add to cart button. This is the code that I am using to hide add to cart button on my product page 

function flav() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart');
return WooCommerce::instance();
 

Edited by jameskendy
Link to comment
  • 0

@jameskendy The tutorial you posted is WORDPRESS, not SQUARESPACE

Add this code to Home > Design > Custom CSS

.sqs-add-to-cart-button-wrapper {
    display: none;
}

REference: https://beaverhero.com/adirondack-squarespace/#Remove_Add_to_Cart

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

@tuanphan

Is there a way to apply this to certain products without using code for each collection? perhaps referencing a product tag or category?

Unfortunately Code Injection for individual projects isn't a thing, and using code blocks on a products page doesn't seem to work either.

 

My goal: Remove the Add to Cart, and price on Free items.

Link to comment
  • 0
7 hours ago, JonJonJon said:

@tuanphan

Is there a way to apply this to certain products without using code for each collection? perhaps referencing a product tag or category?

Unfortunately Code Injection for individual projects isn't a thing, and using code blocks on a products page doesn't seem to work either.

 

My goal: Remove the Add to Cart, and price on Free items.

With some templates (not sure this is for all templates) if the product belongs to a certain category / tag, they will have the same class, and we can use the code for only those products.
You can put any tag for a product and reshare url, I can take a look

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

@tuanphan

 

Thanks, I'm using Brine template. I haven't spotted a class that specifies categories or tags, but that would be fantastic if it's available.

Here is a link to a particular product. I've hidden the price and Add to Cart buttons. All products within this category "Smartphone" will need to undergo the same treatment (about 40 products). 

https://shop.jonathan-gallagher.com/photo/001-mobile

pw:jonjonjon

 

Thank you

Link to comment
  • 0
9 minutes ago, JonJonJon said:

@tuanphan

 

Thanks, I'm using Brine template. I haven't spotted a class that specifies categories or tags, but that would be fantastic if it's available.

Here is a link to a particular product. I've hidden the price and Add to Cart buttons. All products within this category "Smartphone" will need to undergo the same treatment (about 40 products). 

https://shop.jonathan-gallagher.com/photo/001-mobile

pw:jonjonjon

 

Thank you

.tag-001 .sqs-add-to-cart-button-wrapper {
    display: none;
}

or

.category-smartphone .sqs-add-to-cart-button-wrapper {
    display: none;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 1/29/2020 at 7:33 PM, tuanphan said:

With some templates (not sure this is for all templates) if the product belongs to a certain category / tag, they will have the same class, and we can use the code for only those products.
You can put any tag for a product and reshare url, I can take a look

tuanphan,

I am using squarespace 7.1 (not a template)... Is it possible to hide the price, quantity&box, the add to cart button, and the shopping cart for my store page? And if so, where do I put in the code if I want to hide this stuff on only ONE of the stores on my site? I have removed price and part of the button but the other stuff eludes me. I am using this code:

<style>
.product-price,
.product-quantity-input,
.quantity-label,
.yui_3_17_2_1_1586294340112_457,
.sqs-add-to-cart-button-inner
 {
 display: none;
}
</style>

 

I have put the above code here: store's page / Products Settings / Advanced / Page Header Code Injection

I know it is wrong. If you have an answer or help for this, just imagine you are speaking with someone with zero knowledge of anything code 🙂

 
 

Screen Shot 2020-04-07 at 4.25.22 PM.png

Screen Shot 2020-04-07 at 4.46.26 PM.png

Edited by wsmedia
Link to comment
  • 0
5 hours ago, wsmedia said:

tuanphan,

I am using squarespace 7.1 (not a template)... Is it possible to hide the price, quantity&box, the add to cart button, and the shopping cart for my store page? And if so, where do I put in the code if I want to hide this stuff on only ONE of the stores on my site? I have removed price and part of the button but the other stuff eludes me. I am using this code:

<style>
.product-price,
.product-quantity-input,
.quantity-label,
.yui_3_17_2_1_1586294340112_457,
.sqs-add-to-cart-button-inner
 {
 display: none;
}
</style>

 

I have put the above code here: store's page / Products Settings / Advanced / Page Header Code Injection

I know it is wrong. If you have an answer or help for this, just imagine you are speaking with someone with zero knowledge of anything code 🙂

 

I think your code should work?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 10/23/2014 at 1:30 PM, amcg said:

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!

Hi, this doesn't appear to work for me.

Can you assist.

Link to comment
  • 0
11 hours ago, deandra.olivieri said:

Does anyone know of a way to hide the price of one item within a summary block? I've been able to use the code above to hide the price on the shop page as well as the individual product page. But I also list the product in a summary block on another page and the price is still showing there.

Thanks!

Can you share link to page where you use summary block?

5 hours ago, NomadLad said:

Hi, this doesn't appear to work for me.

Can you assist.

Can you share link to product page?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
23 hours ago, tuanphan said:

Can you share link to page where you use summary block?

Can you share link to product page?

Hi Tuanphan, Here is a link the the summary blocks: 

https://jenevoymakeupstudio.com/eyenvy and https://jenevoymakeup.squarespace.com/eyes

The item I am trying to hide the price on is "EyEnvy". For legal purposes, until this is resolved, I've had to remove the prices on all items. 

I've managed to get the price removed everywhere else this product appears, but not within this summary block. Please see screen shots attached. 

Thanks for your help with this!! 

Screen Shot 2020-04-30 at 10.17.37 PM.png

Screen Shot 2020-04-30 at 10.14.47 PM.png

Screen Shot 2020-04-30 at 10.14.26 PM.png

Link to comment
  • 0

Ive been trying to do it on my site www.kitjohns.co.uk but its not working when I've added the code.

Im a total beginner when it comes to code.

I want to remove the 'purchase' button on some of the products on the item page.

For example here https://www.kitjohns.co.uk/the-map-collection/ill-love-you-until-the-world-stops-turning

Ive added the tag 'gallery' to the product

then added this bit of custom css

.tag-gallery .ProductItem-summary .ProductItem-details {
  .sqs-add-to-cart-button-wrapper, .product-quantity-input {
  display: none;
  }

Doesn't seem to work though.

Thanks for any help you might be able to offer 

Link to comment
  • 0
2 hours ago, KitJohns said:

Ive been trying to do it on my site www.kitjohns.co.uk but its not working when I've added the code.

Im a total beginner when it comes to code.

I want to remove the 'purchase' button on some of the products on the item page.

For example here https://www.kitjohns.co.uk/the-map-collection/ill-love-you-until-the-world-stops-turning

Ive added the tag 'gallery' to the product

then added this bit of custom css

.tag-gallery .ProductItem-summary .ProductItem-details {
  .sqs-add-to-cart-button-wrapper, .product-quantity-input {
  display: none;
  }

Doesn't seem to work though.

Thanks for any help you might be able to offer 

I see it worked here. Try clearing browser cache.

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 5/5/2020 at 9:48 AM, tuanphan said:

missing your cmt. Have you solved yet?

Hey @tuanphan, haven't solved this yet. 

Here's the link to the product: https://www.jenevoymakeupstudio.com/shop/eyenvy

And link to the page with the summary block: https://www.jenevoymakeupstudio.com/eyenvy 

I've had to remove all prices here for legal purposes. But ideally Id just remove the eyenvy product price only from the summary block.

Excuse my ignorance, but what is cmt? 

 

D

Link to comment
  • 0
21 hours ago, deandra.olivieri said:

Hey @tuanphan, haven't solved this yet. 

Here's the link to the product: https://www.jenevoymakeupstudio.com/shop/eyenvy

And link to the page with the summary block: https://www.jenevoymakeupstudio.com/eyenvy 

I've had to remove all prices here for legal purposes. But ideally Id just remove the eyenvy product price only from the summary block.

Excuse my ignorance, but what is cmt? 

 

D

It seems you solved? I don't see price here

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0

  Right, because I've had to hide it for all for legal reasons. But I'm really only trying to hide the price on one item with in the summary block. 

3 hours ago, tuanphan said:

It seems you solved? I don't see price here

So no, this has not be solved @tuanphan. Do you know how we can hide the price of just one item in the summary block? 

 

D

Link to comment
  • 0
14 hours ago, deandra.olivieri said:

  Right, because I've had to hide it for all for legal reasons. But I'm really only trying to hide the price on one item with in the summary block. 

So no, this has not be solved @tuanphan. Do you know how we can hide the price of just one item in the summary block? 

 

D

Price in Summary Block https://www.jenevoymakeupstudio.com/eyenvy I checked code, and can't find price in code structure...

or Price in detail page https://www.jenevoymakeupstudio.com/shop/eyenvy

?

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...