Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 3 years, 9 months ago by  wildmercury. Reason: typo
    #226761

    Hi 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,
    Ismael

    #226767

    Are you sure? That just white-paged the site!

    #227000

    Hi,

    Can you create an administrator account and post it here as a private reply?

    Regards,
    Josue

    #227312
    This reply has been marked as private.
    #227353

    Hi!

    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!
    Ismael

    #227373

    ok thanks – that works.

    #227450

    Hi!

    Glad it worked.

    Cheers!
    Ismael

    #293990

    Perfect Ismael!

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Disable cart’ is closed to new replies.