Hi,
This is just for information for anyone looking for this kind of change.
If you have visibility of "Out of stock products" active in PS, and you want to hide the "out of stock products" in certain modules/hooks
you can simply edit the tpl file of that module/hook like below.
for example if you want to hide the out of stock products for "ps_categoryproducts" module edit > /modules/ps_categoryproducts/views/templates/hook/ps_categoryproducts.tpl file
change this line
{foreach from=$products item="product"}
{include file="catalog/_partials/miniatures/product.tpl" product=$product}
{/foreach}
to this
{assign var="displayedProducts" value=0}
{while $displayedProducts < 4}
{foreach from=$products item="product"}
{if $product.quantity > 0}
{include file="catalog/_partials/miniatures/product.tpl" product=$product}
{assign var="displayedProducts" value=$displayedProducts+1}
{/if}
{if $displayedProducts >= 4}
{break} {/if}
{/foreach}
{/while}
via this code, it will skip the out of stock product , and will show the next product (will not be empty)
this works with PS 1.8 as well
Thanks