Hi,
im trying to modify the confirmation mails and want to personalisize the opener....
so i tried the follwoing (in mail_html_header.php):
<?php
$gender = $this->orderDetails['details']['BT']->title;
if ($gender = "Herr"){$anrede = 'Sehr geehrter';}
elseif ($gender = "Frau"){$anrede = 'Sehr geehrte';}
elseif ($gender = "Dr"){$anrede = 'Sehr geehrter';}
?>
But the variable $gender is always "Herr"; but later on in the code the title is called via "$this->orderDetails['details']['BT']->title" and the it's shown correct as "Herr" or "Frau", depending on what the cutumer has choosen...
Any ideas on this one?Where is my mistake?
you could put in a little validation test to see what the variable $gender actually is, just to make sure that you are not getting some default result from a null variable
<?php
$gender = $this->orderDetails['details']['BT']->title;
echo 'This is your output ' . $gender;
Jupp, tried this already....but $gender is always "Herr"...
ok, ok ok.... took me a while
try
if ($gender == "Herr"){$anrede = 'Sehr geehrter';}
elseif ($gender == "Frau"){$anrede = 'Sehr geehrte';}
elseif ($gender == "Dr"){$anrede = 'Sehr geehrter';}
Ahhhh, that works....
many many many thanks !!!!!