This topic has 6 replies, 3 voices, and was last updated 4 years, 9 months ago ago by Olga Barlow
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
You must be logged in to reply to this topic.Log in/Sign up