x

How to delete add to cart button, price and quantity

First, you really need to add the ability to include a directory type of feature, similar to the commerce functionality.

From another post, I was able to add a business directory on my website with one of the themes. I successfully removed the price, quantity and "Add to cart" button. But, because the blog wasn't as user-friendly as it is in other themes, I switched the site to a different theme. The price, quantity and cart button came back obviously. I tried to do the same thing, but the html coding is way different on this theme and I can't figure out how to remove it now. I was successful at removing the quantity, but nothing else.

Of course, I had to rename the theme after I changed it, so I can't remember which theme i changed it to. 

2,517 Views
Message 1 of 9
Report
1 Best Answer

Best Answer

I actually asked a local programmer and she was able to give me code to hide the commerce elements of products. This will remove the price, quantity, and Add to Cart button.

In the CSS editor, under Styles => main.less, add the following code starting at line 1:

/* css edits
--------------------------------------------------------------------------------*/
#wsite-com-product-price-area {
display: none !important;
}

#wsite-com-product-buy {
display: none !important;
}

#wsite-com-product-inventory {
display: none !important;
}

/* Resets
--------------------------------------------------------------------------------*/

View Best Answer >

2,491 Views
Message 10 of 9
Report
8 REPLIES 8
Square

Hi @jjllehrman Can you please confirm the site name? Did you add the business directory using html code? Or was this a third party theme? I'm not 100% sure what you mean by the blog being different and any clarification would be super helpful. Thanks! Smiley Happy

2,506 Views
Message 10 of 9
Report

Hi @Bernadette ,

Sorry if I wasn't clear. The site I'm referring to is https://www.southdakotahorse.com/directory.html. I created the vendor directory using the store. I found a post here about how to remove the code that shows the price, quantity, and "Add to Cart" button. I did it and it worked perfectly. Those three things no longer appeared item or category pages. 

But, the theme I selected had a blog setting that made viewers click on the title or the "+" sign to read posts. It was becoming confusing to my followers, so I switched the site theme to something else, and going back to those same areas of the CSS editor - the code isn't the same and I can't figure out where the code is located for those items.

I believe I have removed the quantity from all items, and it looks like the price is gone from some items but not all. I cannot figure out how to remove the rest and the "Add to Cart" button, or the empty cart in the top corner.

Thank you for any assistance you can provide!

2,505 Views
Message 10 of 9
Report
Square

Oh, gotcha. Thanks for clarifying. Unfortunately, I'm unable to assist with the html/css code, but if you provide a link to your site another user may be able to help you out. Thanks! 

2,501 Views
Message 10 of 9
Report

Best Answer

I actually asked a local programmer and she was able to give me code to hide the commerce elements of products. This will remove the price, quantity, and Add to Cart button.

In the CSS editor, under Styles => main.less, add the following code starting at line 1:

/* css edits
--------------------------------------------------------------------------------*/
#wsite-com-product-price-area {
display: none !important;
}

#wsite-com-product-buy {
display: none !important;
}

#wsite-com-product-inventory {
display: none !important;
}

/* Resets
--------------------------------------------------------------------------------*/

2,492 Views
Message 10 of 9
Report
Square

Thanks for sharing that, @jjllehrman.

2,489 Views
Message 10 of 9
Report

You're welcome @Adam !

2,485 Views
Message 10 of 9
Report

Thank you! Thanks to the community my problem was solved! This code worked for my site!  www.hirefirefighter.com

2,387 Views
Message 10 of 9
Report

hey there! would you be kind enough to help me with the same issue? I have a shop but i dont want people to do direct transactions on it, but i wanna hicde the add to cart button and the quantity field and rather have a button where one can contact us or send us a direct mail and then they can get a custom solution. 

could you please maybe send me the version of the code which would include the renaming and redirection of the button?

thanksss!!!

1,942 Views
Message 10 of 9
Report