Skip to main content

Add custom field to Hikaserial email template

More
2 years 5 months ago #360578 by pixelkraft
-- HikaShop version -- : 5.0.4
-- HikaSerial version -- : 4.0.2
-- Joomla version -- : 4.4.4
-- PHP version -- : 8.1.27
-- Browser(s) name and version -- : Chrome

Hi!

The serials we sell are tokens that are added to a URL.
In Joomla 3 we ade an override for the show_email_notification_html.php file which looked like this:
Code:
<tr> <td><a href="<?php echo "{$data->url_ra}{$data->serial_data}"; ?>">Activation link for <?php echo $data->order_product_name . '(' . $key . ')'; ?></a><br /> <?php echo $data->activation_info; ?></td> </tr>

"url_ra" and "activation_info" are custom fields of the product.

Unfortunately, after migrating to Joomla 4, the override is not working anymore. When it's in the html folder of my template, no confirmation email is sent at all.

Can you please help me how I can access custom fields of the product in the show_email_notification_html.php ?

Thank you!

Please Log in or Create an account to join the conversation.

More
2 years 4 months ago #360593 by Jerome
Hello,

Please edit your override in order to be sure that errors won't affect the email generation, such as :
Code:
<?php echo ($data->url_ra ?? '') . ($data->serial_data ?? ''); ?>
and
Code:
<?php echo ($data->activation_info?? ''); ?>

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.217 seconds
Powered by Kunena Forum