How do I add a custom user field to emails

  • Posts: 6
  • Thank you received: 0
  • Hikashop Essential
6 years 10 months ago #285377

-- HikaShop version -- : 3.2.2
-- Joomla version -- : Joomla! 2.5.14
-- PHP version -- : 5.6.31
-- Browser(s) name and version -- : firefox 57.0.3

Hi

I have added a custom user field which is a society registration number to the user and it appears on all tables etc however I would like to add the field to the notification emails but cannot find any information on how to do so. Any pointers would really help!

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 10 months ago #285388

Hi,

You can edit the emails via the menu System>Emails.
There, you can add such code in the HTML version:
<?php echo $data->cart->customer->XXX; ?>
where XXX is the column name of your custom field of the table "user".

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

  • Posts: 58
  • Thank you received: 2
6 years 10 months ago #286690

I have a similar question...

What would be the code to add to the HTML email version if we want to include a custom field from the product table? Would it be

<?php echo $data->product->XXX; ?>
where XXX is the column name of your custom field of the table "product" ?

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
6 years 10 months ago #286691

It would be:
{VAR:product.XXX}
Note that the tag must be between the tags <!--{START:PRODUCT_LINE}--> and <!--{END:PRODUCT_LINE}--> in the HTML version.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum