[TYPO3-shop] Problems with tt_products: backlink in Basket, clickintobasket in singleview, continue shopping

Franz Holzinger franz at fholzinger.com
Wed Mar 5 09:10:52 CET 2008


Hello

> There's only one thing left now: I do not know how to add a link
> "continue shopping" using the backPID as you suggested to the basket
> view. Do I have to change the code in
> class.tx_ttproducts_basket_view.php to acchieve this?

Unfortunately there are no markers available for the parameters.

You you must enhance the code of tt_products 2.8.0:

class.tx_ttproducts_main.php line 344:

$markerObj = &t3lib_div::getUserObj('&tx_ttproducts_marker');
$markerObj->init(
	$this->cObj,
	$this->pibase->piVars
);



marker/class.tx_ttproducts_marker.php:

function init(&$cObj, $piVars)	{
	$this->cObj = &$cObj;
	$cnf = &t3lib_div::getUserObj('&tx_ttproducts_config');

	$this->conf = &$cnf->conf;
	$this->config = &$cnf->config;
	$this->markerArray = array('CATEGORY', 'PRODUCT', 'ARTICLE');
	$this->setGlobalMarkerArray($piVars);
}


function setGlobalMarkerArray ($piVars)	{
global $TSFE;

...

$backPID = $piVars['backPID'];
$backPID = ($backPID ? $backPID : t3lib_div::_GP('backPID'));
$backPID = ($backPID  ? $backPID : ($this->conf['PIDlistDisplay'] ?
$this->conf['PIDlistDisplay'] : $TSFE->id));
$markerArray['###BACK_PID###'] = $backPID;

Then you could use the marker ###BACK_PID### globally inside of your
HTML A tag. If there is not backPID parameter, then it would go to the
list page or otherwise remain on the current page.


- Franz






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