put yith ADD TO QUOTE button on quick view page
-
Hi there,
Please i need put yith ADD TO QUOTE button on quick view page, and yith plugin team said as following:
“The quick view is managed by the Woodmart theme. You should contact them to know where you can place the shortcode [yith_ywraq_request_quote].”
I don’w know where to put the shortcode ,so please help me, thank you so much!
Best regards,
Hello,
Please add the below code in the functions.php file in your child theme.
add_action( 'woocommerce_single_product_summary', function () {
if ( function_exists( 'woodmart_loop_prop' ) && woodmart_loop_prop( 'is_quick_view' ) ) {
echo do_shortcode( '[yith_ywraq_request_quote]' );
}
}, 25 );
Then clear the cache and recheck the issue.
Kind Regards
Hello,
The code for functions.php dosn’t work, please help to check, thank you!
Kind Regards
Attachments:
You must be
logged in to view attached files.
More infomations for your reference please see infra,
yith team said:
about the quick view you should use the shortcode in the quick view template as it seems it is not using the default woocommerce hooks that the plugin normally use to print the button automatically.
[yith_ywraq_request_quote]
Best Regards,
Armando L.
Hello,
Please ask the plugin support which exactly hooks need to make their functionality workable.
Thank you in advance.
Kind Regards
Hello,
The plugin support replied me infra:
——————-
“Hi there,
You only need to use the indicated shortcode in the quick view module. No hooks are necessary.
Please, use this shortcode instead: [yith_ywraq_button_quote]
The previous one was incorrect, sorry.
Kind regards,
Carlos M”
————————
However, it still doesn’t work after changing the short code with new one: [yith_ywraq_button_quote] so please advise what to do, thank you!
Best regards,
Hello,
We checked and we see that this shortcode that recommends adding technical support from the plugin does not work because the file with the shortcode is not connected, therefore, we can offer the following custom code that will display this button, but we cannot guarantee how long and correctly this code will work.
add_action( 'woocommerce_single_product_summary', function () {
if ( function_exists( 'woodmart_loop_prop' ) && woodmart_loop_prop( 'is_quick_view' ) ) {
if ( defined( 'YITH_YWRAQ_INC' ) && ! class_exists( 'YITH_YWRAQ_Shortcodes' ) ) {
require_once YITH_YWRAQ_INC . 'class.yith-ywraq-shortcodes.php';
$class = new YITH_YWRAQ_Shortcodes();
echo $class->button_quote( array() );
} else {
echo do_shortcode( '[yith_ywraq_button_quote]' );
}
}
}, 25 );
Kind Regards
Hello,
I am very grateful for your kind help, this issue has been fixed good.
Kind Regards
Hello,
You are welcome!
If you do not mind, can you please leave 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in future. It would encourage our work a lot.
Have a good day!
Kind Regards
The topic ‘put yith ADD TO QUOTE button on quick view page’ is closed to new replies.