BluePearl Posted June 22, 2018 Posted June 22, 2018 I am getting an incorrect syntax error or the first line no matter where I paste it in. Is there a reason for this?
BluePearl Posted June 22, 2018 Posted June 22, 2018 (edited) 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 June 22, 2018 by BluePearl Initial Revision
amcg Posted June 27, 2018 Author Posted June 27, 2018 Hey @BluePearl , This code is pretty old, so it may not work in some of the newer templates. Are you adding it to the CSS panel or Code Injection?
svco Posted April 5, 2019 Posted April 5, 2019 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.
Guest jameskendy Posted October 23, 2019 Posted October 23, 2019 (edited) 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 October 23, 2019 by jameskendy
tuanphan Posted October 23, 2019 Posted October 23, 2019 @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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
JonJonJon Posted January 29, 2020 Posted January 29, 2020 @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.
tuanphan Posted January 30, 2020 Posted January 30, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
JonJonJon Posted January 30, 2020 Posted January 30, 2020 @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
tuanphan Posted January 30, 2020 Posted January 30, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
JonJonJon Posted January 30, 2020 Posted January 30, 2020 @tuanphan Thanks. Works well on the product list page, but sadly not on the individual product pages (which is more important). Any ideas of if this would be possible?
JonJonJon Posted January 30, 2020 Posted January 30, 2020 Nevermind.. figured it out. Simply Added ".ProductItem" on the front. Thanks very much
wsmedia Posted April 7, 2020 Posted April 7, 2020 (edited) 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 🙂 Edited April 7, 2020 by wsmedia
tuanphan Posted April 8, 2020 Posted April 8, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
deandra.olivieri Posted April 29, 2020 Posted April 29, 2020 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!
NomadLad Posted April 29, 2020 Posted April 29, 2020 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.
tuanphan Posted April 30, 2020 Posted April 30, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
deandra.olivieri Posted May 1, 2020 Posted May 1, 2020 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!!
KitJohns Posted May 2, 2020 Posted May 2, 2020 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
tuanphan Posted May 2, 2020 Posted May 2, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
tuanphan Posted May 5, 2020 Posted May 5, 2020 On 5/1/2020 at 9:18 AM, deandra.olivieri said: Hi Tuanphan, Here is a link the the summary blocks: missing your cmt. Have you solved yet? 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!)
deandra.olivieri Posted May 7, 2020 Posted May 7, 2020 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
tuanphan Posted May 8, 2020 Posted May 8, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
deandra.olivieri Posted May 8, 2020 Posted May 8, 2020 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
tuanphan Posted May 9, 2020 Posted May 9, 2020 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. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment