WordPress.org

Forums

WooCommerce - excelling eCommerce
Remove Add to Cart Button on separate pages (5 posts)

  1. shibbytudeuk
    Member
    Posted 1 year ago #

    Hi,

    I am creating a shop site using WooCommerce and on some of the product pages I would like to remove the Add To Cart button but leave the price on, as there is an enquiry form on the page to enquire about it rather than buy on-line, but the rest of the products on the site can be brought on line.

    Is there a way to disable the button on certain pages and not all? I have looked at different types of code so far, but none have done what I need it too do.

    Thanks!

    https://wordpress.org/plugins/woocommerce/

  2. lorro
    Member
    Posted 1 year ago #

    One way to do this would be to put the price in the product description and leave the price fields blank.

  3. caboli
    Member
    Posted 1 year ago #

    Hi, I have the same question.

    If I do as your instruction, then there still has a button READ MORE on the page. How can I do?

    Thanks.

  4. shibbytudeuk
    Member
    Posted 1 year ago #

    Hey,

    Thanks for reply.

    That could work, but I still need the price to be shown on the pages like all the other pages which can be brought.

    Strange there doesn't seem to be an easy way to just hide the add to cart button.

  5. lorro
    Member
    Posted 1 year ago #

    Custom css can be used to hide the Add to Cart button:

    a.button.add_to_cart_button {display: none;}

    Unfortunately it will hide all Add to Cart buttons. The buttons are not identified individually so the css cannot identify which ones to show and which to hide.

    If you set the item's inventory to "out of stock" the Cart button would be hidden for that item. The out of stock warning could be hidden with:

    .out-of-stock {display: none;}

    but this would also apply to other products that can be bought that are out of stock. I don't know whether this would be a disadvantage in your store.

    It looks like you will need an additional field in the product setup page to identify which products are for sale and which not. This would be a custom development and you may have to hire someone to code it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic