You can add below function to active child theme’s function.php file.
// =========================================================================
// CHANGE ADD TO CART BUTTON TEXT ON SPECIFIC PRODUCTS
// =========================================================================
function translate_add_to_cart() {
global $product;
if( $product->id == 2028 ){
return __( 'request quote', 'woocommerce' );
} elseif($product->id == 2027){
return __( 'Buy now', 'woocommerce' );
}
else{
return __( 'Add to cart', 'woocommerce' );
}
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'translate_add_to_cart', 10, 3 );
You can change product id.
but what will happen when they click on button, because this will change only label.
Thanks
Ahir
Hello, This is not what I mean
This is not what I mean, I rather wish something like this plugin. Anyone experience with this? https://woocommerce.com/products/request-a-quote-plugin-for-woocommerce/#
Yes you can buy that:
Display the quote button on selected products and let customers add products to quote basket just like they add products to the cart and submit the quotation by filling a simple quote form. Create multiple rules to show the quote button for selected user roles, products, and categories
They said. so this will work for you.
ok is this the best plugin ? if i see this page there are other
https://wisdmlabs.com/blog/woocommerce-request-a-quote/
Can you advise me.
it’s your personal choice: but i can recommended: https://woocommerce.com/products/request-a-quote-plugin-for-woocommerce/
but you can read description what they provide and based on that go ahead
ok thanks i’m looking at this.
Do you know a expert that can help me with styling/layout of my website ?
Hi @karel123
This thread has been inactive for a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.