0
votes

i am currently developing an shop extension in Extbase 1.3/Typo3 4.5 where the checkout process will be handled under a different domain than the shop (domain A has shop and HTTP, domain B has checkout and HTTPS). In the checkout process i need to access the content of the frontend user session of domain A (e.g. for retrieving the positions). I tried this by passing the frontend user id in my controller to the checkout with

$this->uriBuilder->reset();
$this->uriBuilder->setArguments(array('fe_typo_user'=>$GLOBALS ['TSFE']->fe_user->id));
$url = $this->uriBuilder->uriFor('newCheckout');
$this->redirectToUri($url);

but this does not seem to have any impact on the creation of the user in domain B (the user id is different in domain B than the passed-in one from domain A).

Is there a way to set the current frontend user by user session id? And is this possible, if the user session has been created at domain A and i want to reuse this user at domain B?

Thanks a lot

1

1 Answers

1
votes

Friends, what a day, what a simple answer. The magic word is FE_SESSION_KEY. With this you are able to maintain a session on a multidomain typo3 installation:

$sessionId = $GLOBALS['TSFE']->fe_user->id;
$hash = md5($GLOBALS['TSFE']->fe_user->id.'/'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']);
$sessionKey = rawurlencode($sessionId.'-'.$hash);

$this->uriBuilder->reset();
$this->uriBuilder->setArguments(array('FE_SESSION_KEY'=>$sessionKey));
$url = $this->uriBuilder->uriFor('newCheckout');