• Resolved Jason Ryan

    (@viablethought)


    Hello –

    Trying to place the Wishlist button within the Add to Cart form so it works with Products that have variations.

    I’ve experimented with the following code with no success:

    if( defined( 'TInvWishlist' ) && ! function_exists( 'move_my_wishlist_btn' ) ) {
    
    	function move_my_wishlist_btn() {
    		echo do_shortcode( '[ti_wishlists_addtowishlist]' );
    	}
    
      add_action( 'woocommerce_after_add_to_cart_button', 'move_my_wishlist_btn' );
    
    }
    

    Any insight would be appreciated. Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    i am also facing the same issue any help would be greatly appreciated,

    Thank you,

    Thread Starter Jason Ryan

    (@viablethought)

    Hey @stantinv

    Any insight on this, not able to find something to put in the “defined” portion of the above code to get this to work. This is needed badly.

    Thanks.

    Plugin Author templateinvaders

    (@templateinvaders)

    Hi @viablethought

    By default our plugin already using the same hook to display the add to wishlist button. Just set appropriate plugin settings to display a button after the add to cart button on a single product page.

    So it’s not clear why you are trying to do programmatically the same that available from the box.

    On another note, the latest update improved add to wishlist button behavior. Just update your instance and check if your issue is gone.

    @erraoudy

    @templateinvaders

    Reply to this question:
    “So it’s not clear why you are trying to do programmatically the same that available from the box.”

    becouse We using woocommerce page builder wpbakery, And when we activate it from the settings to display a button after the add to cart button, it doesn’t work.

    and i have the latest version TI Store Wishlist Premium (Version 1.21.6) But it doesn’t work also and my project has been suspended for more than two months due to this problem.

    Plugin Author templateinvaders

    (@templateinvaders)

    @erraoudy

    becouse We using woocommerce page builder wpbakery, And when we activate it from the settings to display a button after the add to cart button, it doesn’t work.

    It means that this builder doesn’t use default WooCommerce hooks at all.
    You can try to place shortcode of the add to wishlist button directly to the builder text block, etc.

    @templateinvaders

    You can try to place shortcode of the add to wishlist button directly to the builder text block

    This is exactly what I did, check this video please : https://recordit.co/YVjn1cRvpx

    Thread Starter Jason Ryan

    (@viablethought)

    @templateinvaders

    Just need a way to be able to do this aside from the wishlist plugin settings. The wishlist button is not being included in the Add to Cart section but outside of it so Products with variations are not working.

    Plugin Author templateinvaders

    (@templateinvaders)

    @erraoudy

    Please, contact us via email to get support for the premium version.

    You have a completely different issue compare to the topic starter.

    Plugin Author templateinvaders

    (@templateinvaders)

    @viablethought

    It should work for the product page even the wishlist button outside of the form tag. Just test the latest version of our plugin.

    Thread Starter Jason Ryan

    (@viablethought)

    Thanks, seems to be working now.

    @templateinvaders

    Please, contact us via email to get support for the premium version.

    You have a completely different issue compare to the topic starter.

    Is there any direct mail address to contact him ??
    Because I contacted Mr.Konstantin more than once and
    i also contacted via site contact form several times without receiving any response

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hook for Adding Shortcode After Add to Cart Button’ is closed to new replies.