Email template customisation clarifications

  • Posts: 190
  • Thank you received: 0
10 years 6 months ago #154345

-- HikaShop version -- : 2.3.0
-- Joomla version -- : 2.5

Hi,
I know that templates are in media/com_hikashop/mail/XXXXX.html.php but when I make a change, nothing appears.

When an order is created, customer and admin, are notified with a nice HTML mail.

  1. I tried to add my site logo with no success
  2. some messages don't seems to be completed with variables
    ex: the string HI_CUSTOMER="Bonjour %s," generates only Bonjour , without the name
    Same with order reference

When the order is paid with Paypal, notifications are only with poor text messages.
  1. Can you help me to always generate HTML mails for all purposes
  2. Can you tell me where to template and how to display customers informations.

Thanks

Last edit: 10 years 6 months ago by codewarrior.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 6 months ago #154352

Hi,

Images in an email should be URL, you have to specify the full link (with the domain name).
You can use the tag {VAR:LIVE_SITE} to help you for this part, like we did for the header/footer images in these mails.

Texts are process in the "XXXX.preload.php" file, you will find the code which make the translation for the HI_CUSTOMER and you will see that the $customer->name or the $order->billing_address->address_firstname are used to fill the customer name in that place.

Emails sent by the payment plugin does not have any template for the moment.
We have in our TODO list an improvement for the HikaShop payment plugin system in order to have some generic emails when a payment plugin want to send an email.

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.

  • Posts: 190
  • Thank you received: 0
10 years 6 months ago #154389

Thanks Jerome for your reply.
I was focusing on order_creation_notification.html.php when looking mails sent to Admin...
This one is for customer and I saw order_admin_notification.html.php ... for admin
I modified the order image with my Logo : OK

The problem is now that strings like HI_CUSTOMER are only correct in customer mail, but not in admin mail.
The difference is :
- admin :
'HI_CUSTOMER' => JText::sprintf('HI_CUSTOMER', @$mail->to_name),

- customer :
$customer_name = @$customer->name;
if(empty($customer_name)) $customer_name = @$data->cart->billing_address->address_firstname;
'HI_CUSTOMER' => JText::sprintf('HI_CUSTOMER', $customer_name),

Do you think it's an harmonisation needed in Hikasop ?

OK for payment, but it would be fine to also have a nice email, like for the order !
Is it difficult to implement, as you already have the code ?
When do you think to implement it ?

Regards

Last edit: 10 years 6 months ago by codewarrior.

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

  • Posts: 13201
  • Thank you received: 2322
10 years 6 months ago #156570

Hi,

It's normal that the text is different from the emails. One is for the customer, so we set the customer name, the other one is for the admin, so we will not set the customer name. So the code is different.

But if you want to have the the customer name in this email, you can edit it and take the customers details. :)
You can edit the emails via the menu System > Emails for business edition, or in the folder media/mail of hikashop.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum