I know there is an option to show quantity on product page in details section, but it is way to hidden, I want to show available quantity on product list and product page next to add to cart button. I've copied
{block name='product_quantities'}
{if $product.show_quantities}
<div class="product-quantities">
<label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label>
<span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span>
</div>
{/if}
{/block}
to product-list.tpl and it works, shows available quantity, but not like it should. On category page it shows for example available 100 pieces, when I'll add 10 to cart it changes from "available 100 pieces" to "available 10 pieces", if i'll add 10 more pieces then it turns into "available 20 pieces" etc. On the other hand I've added this code to product-prices.tpl right under reference, and it shows "available 100 pieces", but when I'll add 10 to cart it still says "available 100 pieces" when same piece of code in product details works like it should (after adding 10 to cart shows 90 available).
Where I'm making mistake?