[TYPO3] tt_products: Products always visible even stock is 0 - 1/2 Solution

Harald Klotzberg [decomplex audio HQ] harry at decomplexaudio.com
Thu Feb 23 11:09:34 CET 2006

Hi Franz,

another idea, seems quite easier:

There is a part ###ITEM_SINGLE_DISPLAY_NOT_IN_STOCK### in the Template,
having "This item is not on Stock" listed, so the easiest way is to fill 
in the normal Item_List view stuff there, without having "the add to basket"
and price stuff etc....

code in class.tx_ttproducts_single_view.php

} else if ($row['inStock']==0 && $this->conf['showProductsNotInStock'] &&
is_array($TCA[$this->tt_products->table->name]['columns']['inStock']) ) {
	$itemFrameTemplate = '###ITEM_SINGLE_DISPLAY_NOT_IN_STOCK###';
} ...

but it doesn´t work as expected.

this seems uncorrect: $this->conf['showProductsNotInStock']

I search through the whole typo-sourcecode, this is only listed in
While i´m typing this, ich changed it to:

	} else if ($row['inStock']==0 &&
is_array($TCA[$this->tt_products->table->name]['columns']['inStock']) ) {

an now i get a not in stock message !!! cool

so next step is to have same functionality for list_VIEW as well, and
everything is PERFECT :)

grtz, harry

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Franz
Sent: Thursday, February 23, 2006 8:43 AM
To: typo3-english at lists.netfielders.de
Subject: Re: [TYPO3] tt_products: Products always visible even stock is 0

Helleo harry,

> i have some troubles with the showNotinStock Option in tt_products. 
> Products are always visible, even Stock is 0
This is as intended.

> I thought setting the showNotinStock = 1 should help, so button should 
> be invisible, right ? But nothing happens, products are always shown 
> :(

You can move the button out of the products item display into the list
template. So you have only one button on a page.

See the BananaGuard's template/example_template_bill_de.tmpl.

- Franz
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de

More information about the TYPO3-english mailing list