title: How do I display quantity select in loop in woocommerce?
body: <p>I need to display quantity select near "Add to cart" button in WooCommerce in loop. How do I do that?
  Thank you MahdiY, that works. But I faced another problem:
  I want to replace button "Add to cart" with cart icon.
  In file add-to-cart.php I have the following code:</p>
  
  <pre><code>global $product;
  $class = isset( $class ) ? $class . ' cart-icon-btn' : 'cart-icon-btn';
  $tdir = get_template_directory_uri();
  echo has_filter('woocommerce_loop_add_to_cart_link');
  echo apply_filters( 'woocommerce_loop_add_to_cart_link',
      sprintf( '&lt;a rel="nofollow" href="%s" data-quantity="%s" data-product_id="%s" data-product_sku="%s" class="%s"&gt;&lt;img class="cart-icon-btn" src="' . $tdir . '/images/basketin.png"&gt;&lt;/a&gt;',
          esc_url( $product-&gt;add_to_cart_url() ),
          esc_attr( isset( $quantity ) ? $quantity : 1 ),
          esc_attr( $product-&gt;id ),
          esc_attr( $product-&gt;get_sku() ),
          esc_attr( isset( $class ) ? $class : 'button' )
          // esc_html( $product-&gt;add_to_cart_text() )
      ),
  </code></pre>
  
  <p>But this filter 'woocommerce_loop_add_to_cart_link' seems to override my HTML and remove IMG tag. I tried to find any function added to this filter in files of WC code but did not find. 
  How do I fix that?</p>