Layout Problem of Customized Email Template

  • Posts: 20
  • Thank you received: 0
5 years 9 months ago #295056

-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3,7,2
-- PHP version -- : 5.6.31

Hi There,

I would like to have different email template for each order status, and i followed the instructions in the following post:
www.hikashop.com/support/forum/orders-ma...or-order-status.html

However, I found that layout of the customized email template shown in "System > Emails > Select template > Preview" (see attached email-preview-in-Email-template.JPG) and the layout shown in received email (see attached layout-shown-in-Received-Email.png) was different. Also, some contents in email were not displayed properly (highlighted in RED in attached layout-shown-in-Received-Email.png).

Attached also please find the customized code of the email template (order_status_notification.confirmed.html.php.zip) for your reference.

Please advise.

Thanks a lot.

Last edit: 5 years 9 months ago by FORIDA_LTD.

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

  • Posts: 20
  • Thank you received: 0
5 years 9 months ago #295059

Also, I would like to know if I can display a custom field at frontend "Customer orders" page?

Thanks.

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
5 years 9 months ago #295060

Hi,

The HTML of your customized version is not valid.
For example, you have:

<table style="float: left !important; text-align: left !importannt;">
<table class="w600" border="0" cellspacing="0" cellpadding="0" width="600" style="margin:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;float: left !important; text-align: left !importannt;">
So two table tags, one inside the other.
That's not valid HTML.
Another example is this:
<strong>Thank you for choosing to shop at Astore</strong> <br/>
Astore – the Autodesk and BIM software online store operated by Forida Limited<br/><br/>
</table>
</p>
			</div>
You have a closing table and a closing p tag without thei opening tag counterparts before.
If your HTML is not valid it will probably break the layout, like it does in your screenshot.
Note that, between a browser displaying the HTML of a web page, and an email client displaying the HTML of an email, they don't interpret the HTML the same way, even more so when the HTML is invalid. So it's probably why you don't get the same result.

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

  • Posts: 20
  • Thank you received: 0
5 years 9 months ago #295117

Hi Nicolas,

Thanks for the advice. i will try again.

Also, I would like to know if I can display a custom field at frontend "Customer orders" page?

Thanks.

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
5 years 9 months ago #295130

Hi,

There is no option for that. But with some view customization it should be possible yes.
If you want to know how you can find the view file you need to customize and where to customize it, you can read this tutorial:
www.hikashop.com/support/documentation/1...-display.html#layout

The following user(s) said Thank You: FORIDA_LTD

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

  • Posts: 20
  • Thank you received: 0
5 years 9 months ago #295309

Hi Nicolas,

I fixed the layout problem. But there is another problem. when i try to create a new email template for "cancelled" status, the variables used in the code cannot be displayed correctly.
For example, i used {TXT:HI_CUSTOMER}, it was displayed as "Hi %s" instead of cusotmer's name in email. Also, no product information was shown in email.

Attached please see the html code and screen for your reference.
Please advise if i missed anything.

Thanks.

Last edit: 5 years 9 months ago by FORIDA_LTD.

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

  • Posts: 20
  • Thank you received: 0
5 years 9 months ago #295311

Hi Nicolas,

I fixed the issue by adding the preload.php for the new template.

Thanks.

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

  • Posts: 12953
  • Thank you received: 1778
5 years 9 months ago #295316

Hi,

Thank you for your feedback !

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

Time to create page: 0.078 seconds
Powered by Kunena Forum