• Hello!

    I need help ?? I use woodmart theme, and they said that they can’t help me, but they use your plugin or whatever for add to wishlist option.

    My problem is that I want to put heart wishlist icon next to Add to cart button. I tried all snippet codes from google. But nothing helped. Do you have some instructions or suggest?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • This should get you in the right direction.

    • This reply was modified 3 years, 11 months ago by konsument. Reason: wrong post
    • This reply was modified 3 years, 11 months ago by konsument. Reason: sry wrong post
    Plugin Author YITHEMES

    (@yithemes)

    Hi there

    @martinakuhada I was checking your theme, and actually it doesn’t look like it is using our plugin for wishlist
    It seems more like a custom implementation of wishlist, made specifcally for the theme (none of the classes, or html structure matches with what I’d expect; I don’t even find any assets loaded from our plugin)

    So I’m not sure how to help ?? Anyway, i think @konsument suggestion is a good starting point
    The idea is to locate the code that prints the Add to Wishlist button, remove from its current hook, and hook it somewhere else (specifically to woocommerce_after_add_to_cart_button hook)

    Here an example of what I’d do for YITH WooCommerce Wishlist plugin

    if ( ! function_exists( 'yith_wcwl_custom_atw_position' ) ) {
    	function yith_wcwl_custom_atw_position() {
    		if ( ! function_exists( 'YITH_WCWL_Frontend' ) ) {
    			return;
    		}
    		add_action( 'woocommerce_after_add_to_cart_button', array( YITH_WCWL_Frontend(), 'print_button' ) );
    	}
    }
    add_action( 'init', 'yith_wcwl_custom_atw_position' );
    

    If I run this code (by adding it at the end of functions.php file of my theme), Add to Wishlist button is placed immediately after Add to Cart button
    Then I just need to
    – Set “Position of “Add to wishlist” on product page” as “Use Shortcode” in plugin’s settings
    – add a css rule to make ATW container inline
    and this is my final result

    I suppose something similar will be needed in your specific case, but unfortunatley you’ll need to check with theme’s support I think

    • This reply was modified 3 years, 11 months ago by YITHEMES.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wishlist button after add to cart button’ is closed to new replies.