[TYPO3] Webformat extendedshop / sorting of product list
hartmut
not at home.de
Thu Sep 20 01:31:28 CEST 2007
Mauro Lorenzutti schrieb:
> 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,
>
Hi Mauro,
I tried your third solution since you are rewriting the code anyway for
your new version.
Works fine. Thanks a lot!
Best regards
hartmut
More information about the TYPO3-english
mailing list