• Resolved hoogy84

    (@hoogy84)


    Hi, I was wondering if it is possible to display the yith-wapo-container before the woocommerce-variation-price? The container is shown before or after the add-to-cart button by default, but I would like to show this before the variation price. Thanks a lot for your response.

    Hoogy

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support crodriguez1991

    (@crodriguez1991)

    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.

    Thread Starter hoogy84

    (@hoogy84)

    hello,

    I’m doing well ??
    I’ve copied the code in our theme and it works perfect.
    Thanks a lot for your help.

    Thread Starter hoogy84

    (@hoogy84)

    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 3 months, 3 weeks ago by hoogy84.
    Plugin Support Alessio Torrisi

    (@alessio91)

    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;
    }
    Thread Starter hoogy84

    (@hoogy84)

    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 ??

    Plugin Support crodriguez1991

    (@crodriguez1991)

    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.

    Thread Starter hoogy84

    (@hoogy84)

    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.