nicolas wrote: If you have a recent version of HikaShop, you can see that there is no PHP anymore in emails but only tags.
You would have to edit the "preload" file of the email via the menu System>Emails (available in the latest version of HikaShop) in order to add your custom PHP code.
thanks for the info. i've edited the preload file as such but i'm not seeing my code displayed. can you advise?
i've added the following into the preload file
if ($item->product_id == 159) {
$gift_cert = 'CUSTOM HTML HERE';
} else {
$gift_cert = '';
}
and then added an extra line to the VARS array:
$vars = array(
....
...
..
'GIFT_CERT' => $gift_cert,
);
i've then used the 'GIFT_CERT' tag in the main email body:
<table width="100%">
<tr>
<td>
<p>
{VAR:GIFT_CERT}
</p>
</td>
</tr>
</table>
is this the correct process?
many thanks