[TYPO3-shop] Extra parameters in product link

Franz Holzinger franz at fholzinger.com
Tue Nov 6 17:43:24 CET 2007


Hello Juan Pablo,

> I need to add an extra parameter in the product links in my PRODUCT LIST 
> page.
> Actually I need to add  &tx_ttproducts_pi1[cat]=2 at the end of each link.
> 
> How can I get that? The link part of my template looks like this:
> 
>  [ <!--###LINK_ITEM###-->more info<!--###LINK_ITEM###--> ]
> 
> I get something like this:
> www.mysite.com/index.php?id=32&tx_ttproducts_pi1%5BbackPID%5D=19&tx_ttproducts_pi1%5Bproduct%5D=1&cHash=fb6d277be0
> and I need this:
> www.mysite.com/index.php?id=32&tx_ttproducts_pi1%5BbackPID%5D=19&tx_ttproducts_pi1%5Bproduct%5D=1&cHash=fb6d277be0&tx_ttproducts_pi1[cat]=2


Such a parameter as tx_ttproducts_pi1[cat] must be added at the call of
function getLinkParams parameter $addQueryString.

function
getLinkParams($excludeList='',$addQueryString=array(),$bUsePrefix=false,$bUseBackPid=true,$piVarCat='cat')


You can find this in tt_products 2.7.0 in
view/class.tx_ttproducts_url_view.php

It is called from here.
$wrappedSubpartArray['###LINK_ITEM###'] = array('<a href="'.
$this->pibase->pi_getPageLink($pid,'',$this->urlObj->getLinkParams('',array(),true))
.'">','</a>',array('useCacheHash' => true));

So this is already the default setup in tt_products 2.7.0 .


- Franz





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