[TYPO3-commerce] move order mail - hook

Michiel Roos [Netcreators] michiel at netcreators.com
Tue Oct 16 10:25:32 CEST 2007


Peter Waechtler schreef:
> hi michel,
> 
> i am using this hook now:
>>> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/hooks/class.tx_commerce_ordermailhooks.php']['generateMail'] 
>>>
> looked in the source and found references to it. so it exists and i do 
> not get any error message.
> 
> i am calling it and using the function
> 
>     function ProcessMarker($markerArray,$this) {
>     
>         $markerArray['###TRACKINGNO###'] = 'test';
>         return $markerArray;
>     }
> 
> to populate a field in the mail template - but is not being replaced.
> 
> have you managed to get a marker inside of a move order mail?

Hi Piet,

No I haven't.

But in theory (correct me if I'm wrong) the generateOrder mail checks 
the $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'] array to see if anythins is 
defined under the name:

['commerce_ordermails/mod1/class.tx_commerce_moveordermail.php']['generateMail']

If it is, it checks the object for a function called: ProcessMarker.

So it should work if you do this in ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce_ordermails/mod1/class.tx_commerce_moveordermail.php']['generateMail'][] 
= t3lib_extmgm::extPath('your_extension_key') 
.'class.tx_yourclassfile.php:tx_yourclassname';

Note the [] after ['generateMail'].

Kind regards,


Michiel Roos


-- 
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/


More information about the TYPO3-project-commerce mailing list