I would like to list products which are in stock before the ones which are currently sold out. Is there a way to get the stock value in the retrieval call? Currently I get my products with pdoPage and TaggerGetResourcesWhere:
&element=`pdoResources`
&where=`[[!TaggerGetResourcesWhere]]`
&cache=`1`
&limit=`9`
&parents=`[[*id]]`
&hideContainers=`1`
&showHidden=`1`
&depth=`1`
&tpl=`product_item`
&sortby=`pagetitle`
&sortdir=`ASC`
&limit=`9`
&maxLimit=`9`
&includeTVs=`products`
]]
The stock value is within the products TV if I’m not mistaken, but how am I able to sort by that?