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?
This topic has 7 replies, 1 voice, and was last updated 7 months, 1 weeks ago ago by Andrea
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?
Hello,
Do you want to enable Catalog Mode? Theme Options > WoOCOmmerce (Shop) > Shop > Catalog Mode > Just Catalog > On.
Regards
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.
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
Perfect thanks! This option should be entered as an option ;o) Thanks again!
Hello,
I passed your request to our developers. Maybe they will add this in one of the next updates.
Regards
Thanks for the support! My topic “makeup button product” has been successfully resolved.
The issue related to '‘makeup button product’' has been successfully resolved, and the topic is now closed for further responses