[Typo3-shop] Show Items not in stock

Christian Buelter buelter at kennziffer.com
Tue Sep 27 09:39:20 CEST 2005


Hi Martin,
Hi Franz,

as I use version 2.0.5, this was not programmed in my version.
I did this way:

1. Change class.tx_ttproducts.php (around line 510):

// CHANGED ORIGINAL
// if (!$item)	{$item = 
$this->cObj->getSubpart($this->templateCode,$this->spMarker("###ITEM_SINGLE_DISPLAY###"));}
// CHANGED ORIGINAL END
// NEW:
if (!$item)	{
	if ($row['inStock']==0 && $this->conf['showProductsNotInStock']) {
		$item = 
$this->cObj->getSubpart($this->templateCode,$this->spMarker("###ITEM_SINGLE_DISPLAY_NOT_IN_STOCK###"));
	} else {
		$item = 
$this->cObj->getSubpart($this->templateCode,$this->spMarker("###ITEM_SINGLE_DISPLAY###"));
	}
}
// CHANGED END

2. Add this to your TypoScript Setup:

   # Show products that are not in stock anymore anyway
plugin.tx_indexedsearch.showProductsNotInStock = 1

3. Last you have to change your shop template file:
- Duplicate the part ###ITEM_SINGLE_DISPLAY###, put the duplicated part 
directly under the original part
- rename the duplicated part into ###ITEM_SINGLE_DISPLAY_NOT_IN_STOCK###
- In the part ###ITEM_SINGLE_DISPLAY_NOT_IN_STOCK###, remove the "Into 
basket" button an add your custom text like "this item is not available"

Regards,

Christian

 > -----Ursprüngliche Nachricht-----
 > Von: Martin Clewing [mailto:mpc at clewing.de]
 > Gesendet: Montag, 26. September 2005 18:31
 > Betreff: Re: [Typo3-shop] Show Items not in stock
 >
 >
 > Hi Christian,
 >
 > I need exactly the same thing. Did you find a way to display "not in
 > stock products?"
 >
 > Thanks,
 > Martin
 >
 > Christian Buelter schrieb:
 > > Hi,
 > >
 > > is there a way to make tt_products show articles that are
 > not in stock
 > > anymore? With a remark like "this article is not available"
 > and without
 > > a "put in basket" button.
 > >
 > > Greetings,
 > >
 > > Christian
 >



More information about the TYPO3-project-tt-products mailing list