I just want to know, if there is a built-in function for requesting a quote. I use the Kalium - Automotive theme as basis for my project and want to have a button as you can see in the attachment.
Maybe anyone knows if that is possible with the theme function by default or have otherwise a good advice for a appropriate plugin.
This is not possible through any option but you can tweak the code to achieve that will add a button that you can redirect to the contact page for example, I found this article and it seems to work, you can give it a try by adding the following code under functions.php file of the child theme:
add_action( 'woocommerce_after_add_to_cart_button', 'additional_single_product_button', 20 );
function additional_single_product_button() {
global $product;
// Define your targeted product IDs in the array below
$targeted_product_ids = array( 37, 53 );
if( in_array( $product->get_id(), $targeted_product_ids ) ) {
$link = home_url('/contact-us/'); // <== Here set button link
$name = esc_html_( "Contact Us", "woocommerce" ); // <== Here set button name
$class = 'button alt';
$style = 'display: inline-block; margin-top: 12px;';
// Output
echo '<br><a rel="no-follow" href="'.$href.'" class="'.$class.'">'.$name.'</a>';
}
}
If you're not familiar with adding code to functions.php, follow the step by step instructions in theme documentation.
thanks again for your help. I just want to give a short feedback: I solved the issue by simply installing the plugin "Get a Quote Button for WooCommerce". The basic/free version fits perfectly my requirements. And the available options to define additional things like the look of the formular and the receiving email requests are a big plus.
Happy to hear that you managed to get the "Get Quote" button in your site, and many thanks for sharing it with us so it could be helpful for someone else
Hello there,
I just want to know, if there is a built-in function for requesting a quote. I use the Kalium - Automotive theme as basis for my project and want to have a button as you can see in the attachment.
Maybe anyone knows if that is possible with the theme function by default or have otherwise a good advice for a appropriate plugin.
Thank you in advance and best regards
Hi Daniel,
This is not possible through any option but you can tweak the code to achieve that will add a button that you can redirect to the contact page for example, I found this article and it seems to work, you can give it a try by adding the following code under functions.php file of the child theme:
If you're not familiar with adding code to functions.php, follow the step by step instructions in theme documentation.
Best regards,
Laborator Team
Hi Art,
thank you very much for your quick reply and help. I'll check out this solution in the next days and will see, if this works in my case.
Best regards
Hi Art,
thanks again for your help. I just want to give a short feedback:
I solved the issue by simply installing the plugin "Get a Quote Button for WooCommerce". The basic/free version fits perfectly my requirements. And the available options to define additional things like the look of the formular and the receiving email requests are a big plus.
Best regards
Hi Daniel,
Happy to hear that you managed to get the "Get Quote" button in your site, and many thanks for sharing it with us so it could be helpful for someone else
Have a great week!
Best regards,
Laborator Team