• kombajn88

    (@kombajn88)


    Hello,

    is it possible to create a code to add a “compare” button in the space next to add to wishlist and quick view

    What I mean by that is to add a “compare” button in the red square

    https://ibb.co/vd7P3cW

    I tried to create the code myself, but it does not work

    add_action('woocommerce_after_shop_loop_item', 'add_compare_button', 15);
    
    function add_compare_button() {
      global $product;
      $product_id = $product->get_id();
      
      echo '<div class="single-compare">';
      echo '<a href="#" class="compare button" data-product_id="' . esc_attr($product_id) . '">';
      echo '<span class="et-icon et-compare"></span>';
      echo '</a>';
      echo '</div>';
    }
    

    https://nikex.pl/sklep/

Viewing 1 replies (of 1 total)
  • Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    it’s something you should ask to theme developers. Report them that they can use the shortcode [yith_compare_button] as alternative to add the button.

Viewing 1 replies (of 1 total)
  • The topic ‘add (extra) a “compare” button’ is closed to new replies.