Tagged: Cart, Catalog Visibility Options, woocommerce
-
AuthorPosts
-
February 20, 2014 at 12:43 pm #226704
Hi there,
Love the theme, especially the work you have put into the admin side with the avia framework. Need some help with woocommerce though. Building a site where the client does not want to sell directly online yet – just use woocommerce as a catalog. So we bought the woocommerce extension Catalog Visibility Options to disable the cart. However, although the options are correct in the Catalog Visibility Options extension (disable purchases, enable prices) the “add to cart” button is still showing in the product loop, and the ajax cart is still active. Can you help disable these properly, not just hide through css?
Thanks.-
This topic was modified 11 years, 8 months ago by
wildmercury. Reason: typo
February 20, 2014 at 2:28 pm #226761Hi wildmercury!
You can add this on functions.php, at the very bottom:
remove_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );Regards,
IsmaelFebruary 20, 2014 at 2:38 pm #226767Are you sure? That just white-paged the site!
February 20, 2014 at 7:41 pm #227000Hi,
Can you create an administrator account and post it here as a private reply?
Regards,
JosueFebruary 21, 2014 at 9:21 am #227312This reply has been marked as private.February 21, 2014 at 10:50 am #227353Hi!
Yes, the code works on my end. If it doesn’t work on functions.php, please config-woocommerce > config.php. Add the code at the very bottom. Also, please try this at the bottom of functions.php:
add_action('init','remove_add_to_cart_button'); function remove_add_to_cart_button(){ remove_action( 'woocommerce_after_shop_loop_item', 'avia_add_cart_button', 16); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); }Cheers!
IsmaelFebruary 21, 2014 at 11:22 am #227373ok thanks – that works.
February 21, 2014 at 1:19 pm #227450July 21, 2014 at 7:38 pm #293990Perfect Ismael!
-
This topic was modified 11 years, 8 months ago by
-
AuthorPosts
- The topic ‘Disable cart’ is closed to new replies.
