Add custom field to Hikaserial email template

  • Posts: 13
  • Thank you received: 1
  • Hikaserial Standard
7 months 3 weeks ago #360578

-- 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:

<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.

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
7 months 3 weeks ago #360593

Hello,

Please edit your override in order to be sure that errors won't affect the email generation, such as :

<?php echo ($data->url_ra ?? '') . ($data->serial_data ?? ''); ?>
and
<?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.058 seconds
Powered by Kunena Forum