Makeup button product - by Redgall - on WordPress WooCommerce support

This topic has 6 replies, 3 voices, and was last updated 4 years, 1 months ago ago by Olga Barlow

  • Avatar: Redgall
    Redgall
    Participant
    February 29, 2020 at 22:42

    Hi,

    how can I disable the add to cart button to Ajax? I would like that only in the “Shop” page when you click on “Add to cart” go to the product page. It’s possible?

    https://prnt.sc/r9n54y

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 1, 2020 at 10:25

    Hello,

    Do you want to enable Catalog Mode? Theme Options > WoOCOmmerce (Shop) > Shop > Catalog Mode > Just Catalog > On.

    Regards

    Avatar: Redgall
    Redgall
    Participant
    March 1, 2020 at 16:05

    No, I don’t want catalog fashions. I want the “Add to cart” button on the “Shop” page not to add the product to the cart but to link to the product page.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    March 1, 2020 at 16:09

    It requests additional customization in files. For example, add this code in functions.php of your child theme –

    add_filter( 'woocommerce_loop_add_to_cart_link', 'etheme_add_to_cart_shop_button', 50, 3 );
    
    function etheme_add_to_cart_shop_button($sprintf, $product, $args) {
    		return sprintf( '<a rel="nofollow" href="%s" class="button show-product">%s</a>',
    			esc_url(  $product->get_permalink() ),
    			__('Buy now', 'xstore')
    	);
    }

    change “buy now” text to the desired one.

    Regards

    Avatar: Redgall
    Redgall
    Participant
    March 2, 2020 at 12:14

    Perfect thanks! This option should be entered as an option ;o) Thanks again!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    March 2, 2020 at 12:36

    Hello,

    I passed your request to our developers. Maybe they will add this in one of the next updates.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.