[TYPO3-commerce] move order mail - hook

Peter Waechtler piet at repiet.com
Mon Nov 19 08:25:08 CET 2007


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



On 16 Oct 2007, at 10:25 AM, Michiel Roos [Netcreators] wrote:

> 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/
> _______________________________________________
> TYPO3-project-commerce mailing list
> TYPO3-project-commerce at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project- 
> commerce
>



More information about the TYPO3-project-commerce mailing list