• Hi,

    How can I display the Add To Wishlist Button in Quick View the same way it appears on the single product page?

    I tried with action, but it only appears on the single product page, not in Quick View.

    // define the woocommerce_after_add_to_cart_form callback 
    function action_woocommerce_after_add_to_cart_form(  ) { 
        global $product;
        echo do_shortcode('[yith_wcwl_add_to_wishlist product_id='.$product->get_id().']');
    }; 
             
    // add the action 
    add_action( 'woocommerce_after_add_to_cart_form', 'action_woocommerce_after_add_to_cart_form', 10, 0 );

    Thank you so much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi Robert,
    we hope you’re doing well!

    In order to achieve what you need, try adding the shortcode [yith_wcwl_add_to_wishlist] in the quick view template.

    Could you tell us what theme do you use? It would be helpful if you provide us with your site link as well.

    Let us know any news, please.

    Have a nice day!

    Thread Starter robertherold

    (@robertherold)

    Hello,

    Thank you for your reply!
    I am well thank you! Are you OK?

    Which quick view template should I paste the code into? I found two Quick View template files that I copied into my own template’s woocommerce folder.

    yith-quick-view.php
    yith-quick-view-content.php

    View post on imgur.com

    The latter file calls the contents of the single product with the do_action code. So in principle, everything in single product content should show up here as well.

    View post on imgur.com

    As you can see, the yith-wcwl-add-to-wishlist div also appears, but there is nothing in it.

    You can see the website here: https://robertherold.net/gc/#termekeink

    Thank you for taking the time.

    Thread Starter robertherold

    (@robertherold)

    I found the solution! 🙂
    I had to set this option to NO:

    View post on imgur.com

    However, if this is a bad solution, please let me know! But I see it works great that way! 🙂

    Hi Robert,

    I’m good! Thank you so much for asking 🙂

    Sorry for the delay, we are glad you found the solution!

    It should work with that feature enabled, although if you’re happy with that solution, that’s fine. Maybe there is a plugin, or even your theme, that is affecting that functionality. Try leaving only our plugin active, WooCommerce and a default WordPress theme, such as Twenty Twenty One, and let us know if the problem persists! What theme do you use?

    We will be attentive to your response.

    Have a nice day!

    Thread Starter robertherold

    (@robertherold)

    Hi Juan,

    Thank you for your reply! I hope the holidays went well! 🙂

    I tried, as you said, with the Twenty Twenty One theme, but unfortunately I also found the error this time:
    The Add To Wishlist button only appears in the Quick View popup window if Enable AJAX loading is set to NO.
    And of course, even in this case, it only works with the shortcode.

    By the way, I use my own theme! 🙂

    Have a nice day!

    Hello there,

    Thanks for your reply, I hope you are doing well 😄

    Unfortunately with the information, we get from the problem you are experiencing we cannot be sure if something is interfering or not.
    The free version does not include the integration but even so, you were able to make it work!

    Let us know if you are happy about disabling the AJAX option but having your functionality work.

    Have a nice day and a happy new year!

    Thread Starter robertherold

    (@robertherold)

    Hi,

    Everything works this way perfectly!

    Anyway, what purpose would this option be, because I didn’t figure it out.

    Happy New Year!!

    Hi Robert,

    What this function does is load any item from the wishlist faster.

    Have a nice day and happy new year too!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Add To Wishlist button in Yith Quickview’ is closed to new replies.