Makeup button product - by Andrea - on WordPress WooCommerce support

This topic has 7 replies, 1 voice, and was last updated 7 months, 1 weeks ago ago by Andrea

  • Avatar: Redgall
    Andrea
    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

    6 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
    Andrea
    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
    Andrea
    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
    Participant
    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

    Avatar: Redgall
    Andrea
    Participant
    May 15, 2025 at 08:44

    Thanks for the support! My topic “makeup button product” has been successfully resolved.

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

The issue related to '‘makeup button product’' has been successfully resolved, and the topic is now closed for further responses

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