This topic has 8 replies, 4 voices, and was last updated 2 years, 5 months ago ago by Awais Ahmed
Hello,
Pls how do i disable add to cart button on selected product pages.
I have some products that are appointments and just require Bookings not Adding to cart.
An example is this – Check Private content
The Add to cart and ruining the page. If i take out the price then the Add to cart button wont show, but then again i am not able to checkout as no price is attached to the item.
Or is there a way i can checkout without attaching a price to a specific product? Either way would work for me.
Thanks
Hello,
There is no such option by default in our theme or WooCommerce plugin settings.
I think you need to look for some booking plugin that will allow you to change the product type from simple to booking. For example,
https://wordpress.org/plugins/mwb-bookings-for-woocommerce/
https://wordpress.org/plugins/booking-for-woocommerce/
Or something similar that suit your needs.
Regards
Ok but how do i disable Add to Cart or Buy now from Specific Categories.
I used this code snippet on my functions.php and it didn’t work
add_action( 'wp', 'rudr_remove_add_to_cart_product_categories' );
function rudr_remove_add_to_cart_product_categories(){
if( is_product_category( 'virtual-consultations' ) ) {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' );
}
}
Hello,
You are using Single Product Builder, it is the reason.
Using the Builder, you can create Multiple templates, and remove the add to cart element from the page content for a specific category
https://prnt.sc/ahsbMPWcNclg
Regards
This worked beautifully well.
Thank you very much!!
You’re welcome!
Have a nice day!
Regards
Hello,
I noticed this my issues was not fully resolved because from the Catalog page people can still add to cart and that ruins the entire checkout flow. IS there a way i can disable add to cart to these category of products from the catalog view not only single product view?
Thanks
Hello, @Stanley Ezeokeke,
No, sorry to say, because the catalog view of all products shows all the products from all the categories and there is an option in the theme to disable the add to cart button from just specific categories of the products. Disabling add to cart from catalog view will hide it from all of the categories. And changes that you require need customization. We cannot cover the customization issues in our support policy.
If you want paid Customization services submit a customization request to WPKraken team.
I hope you understand.
Regards 8Themes Team.
You must be logged in to reply to this topic.Log in/Sign up