• Resolved nike555

    (@nike555)


    Hi, I would like to transfer button “Compare” in another place (catalog) how i can make it?
    How i know you are not have short code…

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TemplateMonster

    (@templatemonster-2002)


    Hi and thanks for the feedback. You can remove plugin hook and add your own into functions.php file of your theme, for examle:

    remove_action( 'woocommerce_after_shop_loop_item', 'tm_woocompare_add_button_loop', 12 );
    
    add_action( 'woocommerce_before_shop_loop_item', 'tm_woocompare_add_button_loop', 9 );

    Sorry, i’m do not have practice in wordpress BackEnd..
    You can please explain me what code(as link or button) for example in
    “my_theme\woocommerce\content-product.php”

    I tryed to add in “functions.php”
    remove_action( 'woocommerce_after_shop_loop_item', 'tm_woocompare_add_button_loop', 12 );

    And in “my_theme\woocommerce\content-product.php” (after “do_action( ‘woocommerce_after_shop_loop_item’ );” until </span> of nxowoo-box)
    <?php add_action( 'woocommerce_after_shop_loop_item', 'tm_woocompare_add_button_loop', 9 ); ?>

    But i obtation before button “buy”
    Screen
    But i’m need lower (2nd rectangle from screen).

    Thanks.

    Plugin Author TemplateMonster

    (@templatemonster-2002)


    By default, woo hook for add to cart button in loop looks like:
    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    this code is in \wp-content\plugins\woocommerce\includes\wc-template-hooks.php line 94. So, by default, compare button placed after add to cart button.
    You don’t need any changes in “your_theme\woocommerce\content-product.php”, you just need to change action and priority for compare button, if you changed action and priority for add to cart button.

    Could you please send us a link to your website and wordpress login details to the following email cherryframework@gmail.com. We will be happy to assist you. Thanks.

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