[TYPO3-commerce] move order mail - hook
Marco Peemöller
listen at goto-marco.de
Mon Nov 19 09:59:17 CET 2007
Peter Waechtler schrieb:
> hi michel,
>
> i am still on the moveordermail issue. chatted to marco and am using the
> normal ###NAME### marker to show the name in the mail. the funny thing
> about this marker is that at the end of the email the name is repeated
> although i have only one marker in the mail template.
>
> now for the second part i am using the hook
>
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/hooks/class.tx_commerce_ordermailhooks.php']['generateMail'][]
> = 'EXT:gn/pi3/class.tx_gn_pi3.php:tx_gn_pi3';
>
> i also tried:
>
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/hooks/class.tx_commerce_ordermailhooks.php']['generateMail'][]
> = t3lib_extmgm::extPath('gn') .'class.tx_gn.php:tx_gn;
>
> to call this function:
>
> function ProcessMarker(&$markerArray,&$this) {
>
> $markerArray['###TRACKINGNO###'] = 'ttttt';
> return $markerArray;
> }
>
> but the marker ###TRACKINGNO### is not replaced in the mailing template.
> i have been trying a few things but just cannot come up with a solution.
>
> regards,
> peter
Hi peter,
I use now this hook:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/hooks/class.tx_commerce_ordermailhooks.php']['ordermoveSendMail'][]
This is my function to replace the marker:
function ProcessMarker($markerArray,$tx_commerce_pi) {
$billing = $GLOBALS['TSFE']->fe_user->getKey('ses', 'billing');
switch($billing['tx_commerce_gender']) {
case 1:
case 2:
$gender = $tx_commerce_pi->pi_getLL('tx_commerce_email_gender_'.
$billing['tx_commerce_gender']);
$gender .= " ".$billing['surname'];
break;
case 3:
$gender = $tx_commerce_pi->pi_getLL('tx_commerce_email_gender_'.
$billing['tx_commerce_gender']);
break;
}
$markerArray['###MAIL_GENDER###'] = $gender;
return $markerArray;
}
regards
Marco
More information about the TYPO3-project-commerce
mailing list