Hello there,
I hope you’re doing well :D.
Please, try to add the following code in the functions.php of your active theme:
if( !function_exists('yith_wapo_move_addons_container') ) {
function yith_wapo_move_addons_container()
{
if (is_product() && class_exists('YITH_WAPO_Front') ) {
global $post;
$product = wc_get_product($post);
if ($product && 'variable' == $product->get_type()) {
remove_action('woocommerce_after_add_to_cart_button', array(YITH_WAPO_Front::get_instance(), 'print_container'));
remove_action('woocommerce_before_add_to_cart_button', array(YITH_WAPO_Front::get_instance(), 'print_container'));
add_action('woocommerce_after_variations_table', array(YITH_WAPO_Front::get_instance(), 'print_container'));
}
}
}
add_action('template_redirect', 'yith_wapo_move_addons_container');
}
It should move the position and set the addons container before the single variation price.
Please, try it and let me know.
hello,
I’m doing well 😀
I’ve copied the code in our theme and it works perfect.
Thanks a lot for your help.
Hi, I hope you’re doing well :D.
I was wondering how I can extend the code so that it can also be used in the quick view popup?
Thanks again for the code, its working really well on the single product page, but unfortunately not on the quickview popup. On the quick view popup the container is shown before or after the add-to-cart button by default, but I would like also to show this before the variation price in the quick view. With my moderate knowledge I have tried several actions, but unfortunately without success. I hope you can help me with this.
Thanks a lot for your response.
Hoogy
The page I need help with: https://staging.houtenukkies.nl/product-categorie/sale/
-
This reply was modified 2 years, 1 month ago by
hoogy84.
Hello there,
please try with this CSS code and let us know if it helps you.
#yith-quick-view-content .woocommerce-variation-add-to-cart.variations_button {
order: 1;
}
#yith-quick-view-content .woocommerce-variation.single_variation {
order: 2;
}
#yith-quick-view-content .single_variation_wrap {
display: flex;
flex-direction: column;
}
Hi there,
I tested the css code and it looks better already, but I would like to keep the woocommerce-variation single_variation in place above the add-to-card button. So I mean: 1 = yith-wapo-box, 2 = woocommerce-variation single_variation and 3 = add-to-card button. But I don’t think this is possible with CSS. Have I got that right?
Thank you for your response, I really appreciate it 🙂
Hello there,
I hope you’re doing well :D.
No, at the moment, the plugin doesn’t allow to be used in this way. The addons will be render after you select the specific attributes for the variation.
I hope it helps you.
If you have any other questions, don’t hesitate to contact us, we’ll be happy to help you.
Have a good day.
Hi there,
I’m doing well 😃
Thank you for your response. As I said before, it looks better and I will use it this way. Thank you very much again for your support.
Best regards Hoogy