[TYPO3-shop] default message when products is empty
Franz Holzinger
franz at fholzinger.com
Tue Oct 9 07:31:39 CEST 2007
Hello Andrew,
> is there a way to have a LIST view show a message if the target record
> folder is empty?
>
> I have a client that wanted to put the site us asap, but not all product
> categories are filled with records. some are empty. So if you goto the
> front end, it jst shows blank.
>
> I want it to say "There are no products in this category".
You must adapt the code for this.
tt_products/view/class.tx_ttproducts_list_view.php:
function &printView( ...
...
if ($theCode != 'SEARCH' || ($theCode == 'SEARCH' && $sword)) {
...
}
if ($out) {
...
} elseif ($sword && $allowedItems!='0' && $theCode=='SEARCH') {
...
} else {
// *** new code for the case where no products are listed ***
$content = 'no products are listed';
}
return $conten
}
More information about the TYPO3-project-tt-products
mailing list