[TYPO3] Webformat extendedshop / sorting of product list

Mauro Lorenzutti mauro.lorenzutti at webformat.com
Wed Sep 19 09:23:56 CEST 2007


Hi Hartmut,

> Hi Mauro, hi list,
>
> is there a way to do some sorting in the product list?
> For example by title?
>
> Thanks in advance
> hartmut
>   

By default, products are sorted by the sorting field (this means that 
you can change order in the BE with the two arrows). It's also possible 
to change the FE sorting by passing the "orderBy" parameter via GET or 
POST with the following syntax:

index.php?id=1&orderBy=title_desc
index.php?id=1&orderBy=title_asc

you can use any table field for the sorting.

This can be achieved by modifying the shop template and providing new 
links for the sorting operation.

Another possibility is to provide a different default sorting field via 
TypoScript. This is not supported by the extension but you can code it 
very easily:
On line 134 you can add the following code:

if ($this->conf['orderBy']!='')
$orderBy = str_replace("_", " ", $this->conf['orderBy']);

Now you can add in your TS template a line like this:

plugin.tx_extendedshop_pi1.orderBy = title_asc

Regards,

-- 
 Mauro Lorenzutti


e-mail:  mauro.lorenzutti at webformat.com

---------------------------------------------------------
WEBFORMAT srl | Corte Europa, 12 | I-33097 SPILIMBERGO PN
     Tel +39-0427-926.389  --  Fax +39-0427-927.653
       info at webformat.com  --  http://www.webformat.com
---------------------------------------------------------



More information about the TYPO3-english mailing list