I was trying to set the quantity option on the Shopify home page through custom code.
Actually, i was doing that with a plus/minus icons for increment/decrement. The code works well for first product item but on the other product items, it increments of value 2,3,4 so on respectively. I tested that on other themes also but the problem is there. Code works well on product page but the issue is on collection/home page when there are more then one products on the page then the quantity increment/decrement not works well.