• Resolved thesaintindiano

    (@thesaintindiano)


    Respected sir/madam,

    1) I wanna show add to wishlist before add to cart button. Hence, I changed the WPC wishlist plugin settings for a wishlist button to be displayed above the add to cart button but it shows under ADD TO CART button (same for the under the price option).

    Please find attached the screenshot for the same.
    https://justpaste.it/9phl7

    WPC Wishlist plugin support response: Seem the theme you’re using doesn’t use the standard action hooks from WooCommerce. So, our plugin doesn’t work correctly.

    I tried setting different priorities for add to cart (apart from official 10) but it does move down add to wishlist button. Please let me know how to make add to cart button for simple products under add to wishlist button.

    Have a nice day.

    Regards & Thanks
    Indiano`

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @thesaintindiano,

    Thank you for using the Neve theme and contacting us.

    May you please provide an example of hooks that you’re using to add the Add to Cart button and also the hook that you’re using to place the wishlist button?

    I checked the plugin and seems like the shortcode should be used using it, for example,

    add_action( 'woocommerce_after_shop_loop_item_title', 'display_add_to_wishlist');
    function display_add_to_wishlist() {
     
        echo do_shortcode('[woosw_list]');
         
    }

    Then, the Add to Cart button is hooked using the method described in our doc here: https://docs.themeisle.com/article/1210-how-to-enable-the-add-to-cart-button-on-the-shop-page-in-neve ?

    Thanks!

    Thread Starter thesaintindiano

    (@thesaintindiano)

    Hi @bvytis,

    I’m using add to cart as described in the neve article above and it’s also using the same hook woocommerce_after_shop_loop_item_title to insert button. But why add to wishlist is being shown after woocommerce_after_shop_loop_item hook (using to add quantity field for simple product) even though it’s using woocommerce_after_shop_loop_item_title as shown above.

    How to move add to wishlist button before add to cart?

    Regards
    Indiano

    Hi @thesaintindiano,

    If you’re using the Wishlist plugin mentioned above and adding the wishlist button as I also described in my previous reply by echoing a shortcode – this is the code that will place it below the title and before add to cart button –

    add_action( 'woocommerce_after_shop_loop_item_title', 'display_add_to_wishlist', 1);
    function display_add_to_wishlist() {
     
        echo do_shortcode('[woosw_list]');
         
    }

    I hope it helps!

    @thesaintindiano,

    I’m sorry, actually, instead of using this function to add the add to cart button:

    function custom_add_cart_button () {
        add_action( 'woocommerce_after_shop_loop_item_title','woocommerce_template_loop_add_to_cart' );
    }
    add_action( 'after_setup_theme', 'custom_add_cart_button' );

    Use this as it’s enough:
    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10);

    I’ve also updated our documentation.

    Let us know if it still doesn’t work ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘The theme doesn’t use the standard action hooks from WooCommerce?’ is closed to new replies.