[Typo3-shop] new: plugin.tt_products.withoutHighlight, plugin.tt_products.withoutOffer, plugin.tt_products.withoutSpecial_preparation

Michael Hoppe michael at hoppefamily.de
Sun Jan 8 03:29:57 CET 2006


zusätzlich muss noch in   class.tx_ttproducts_pi1.php

nach der Zeile:
$this->config['limit'] = $this->conf['limit'] ? $this->conf['limit'] : 50;

die Zeilen:
  $this->config['withoutHighlights'] = $this->conf['withoutHighlights'] ? 
$this->conf['withoutHighlights'] : 0;
  $this->config['withoutOffers'] = $this->conf['withoutOffers'] ? 
$this->conf['withoutOffers'] : 0;
  $this->config['withoutSpecial_preparations'] = 
$this->conf['withoutSpecial_preparations'] ? 
$this->conf['withoutSpecial_preparations'] : 0;

eingefügt werden.

Der richtige Code ist dann auch:

            $wherestock = ($this->config['withoutHighlights'] ? 'AND 
(highlight = 0) ' : '');
            $selectConf['where'] .= $wherestock;
            $wherestock = ($this->config['withoutOffers'] ? 'AND (offer = 0) 
' : '');
            $selectConf['where'] .= $wherestock;
            $wherestock = ($this->config['withoutSpecial_preparations'] ? 
'AND (special_preparation = 0) ' : '');
            $selectConf['where'] .= $wherestock;

im andern Code waren noch Bugs.

Michael


"Michael Hoppe" <michael at hoppefamily.de> schrieb im Newsbeitrag 
news:mailman.1.1136673813.14021.typo3-project-tt-products at lists.netfielders.de...
> Hi,
> in: class.tx_ttproducts_list_view.php
>
> behind:
>  1.. $wherestock = ($this->config['showNotinStock'] ? '' : 'AND (inStock 
> <> 0) ');
>  2.. $selectConf['where'] = '1=1 '.$wherestock.$where;
>
> enter this Code:
>  1.. $wherestock = ($this->config['withoutHighlight'] ? '' : ' AND 
> (highlight = 0) ');
>  2.. $selectConf['where'] .= $wherestock;
>  3..
>  4.. $wherestock = ($this->config['withoutOffer'] ? '' : ' AND (offer = 0) 
> ');
>  5.. $selectConf['where'] .= $wherestock;
>  6..
>  7.. $wherestock = ($this->config['withoutSpecial_preparation'] ? '' : ' 
> AND (special_preparation = 0) ');
>  8.. $selectConf['where'] .= $wherestock;
>
> The exists new parameters:
>  1.. plugin.tt_products.withoutHighlight =
>  2.. plugin.tt_products.withoutOffer =
>  3.. plugin.tt_products.withoutSpecial_preparation =
> If you set it to 1 (in setup) the products will be not found.
> I think the Parameter explain themself.
>
> Useful if you want to display highlight products first an then the others. 
> (two tt_products content objects on one page)
>
>
> Michael Hoppe
> 





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