I have some categroy no has poducts ,
how can i detect if no products in category/default.php ?
i tried some way,but all not work
if (!empty($this->products)) {
$products = array();
$products[0] = $this->products;
if (!empty($products[0])):
eho 'blablabla....'; // this works
else:
echo 'no products'; // not work
endif;
Just use the following codes.
if(empty($this->products))
{
echo "Sorry, no products found".
}
Thanks Jumbo,
I found the issue happen because i write the code in
if (!empty($this->products))
......
anyway thanks!