Please note: This website includes an accessibility system. Press Control-F11 to adjust the website to people with visual disabilities who are using a screen reader; Press Control-F10 to open an accessibility menu.
I have opencart version 2.1.0.1 i have some products that need the add to cart button and some products that do not. Is there directions to accomplish this?
Hello,
Thank you for your question on how to hide the Add to Cart button in OpenCart. While this is not a default feature in OpenCart, you may be able to find an extension that has this feature.
Kindest Regards,
Scott M
`function WpBlog() {
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();
}`
And for the specific product pages you can disable add to cart button by adding the code in functions.php
`add_filter('woocommerce_is_purchasable', 'wpblog_specific_product');
function wpblog_specific_product($purchaseable_product_wpblog, $product)
{
return ($product->id == specific_product_id (512) ? false : $purchaseable_product_wpblog);
}`
Reference: https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/