- Posts: 20
- Thank you received: 0
Layout Problem of Customized Email Template
- FORIDA_LTD
-
Topic Author
- Offline
Less
More
8 years 2 months ago - 8 years 2 months ago #295056
by FORIDA_LTD
Layout Problem of Customized Email Template was created by FORIDA_LTD
-- 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.
-- 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: 8 years 2 months ago by FORIDA_LTD.
Please Log in or Create an account to join the conversation.
- FORIDA_LTD
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
8 years 2 months ago #295059
by FORIDA_LTD
Replied by FORIDA_LTD on topic Layout Problem of Customized Email Template
Also, I would like to know if I can display a custom field at frontend "Customer orders" page?
Thanks.
Thanks.
Please Log in or Create an account to join the conversation.
8 years 2 months ago #295060
by nicolas
Replied by nicolas on topic Layout Problem of Customized Email Template
Hi,
The HTML of your customized version is not valid.
For example, you have:
So two table tags, one inside the other.
That's not valid HTML.
Another example is this:
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.
The HTML of your customized version is not valid.
For example, you have:
Code:
<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;">
That's not valid HTML.
Another example is this:
Code:
<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>
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.
- FORIDA_LTD
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
8 years 2 months ago #295117
by FORIDA_LTD
Replied by FORIDA_LTD on topic Layout Problem of Customized Email Template
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.
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.
8 years 2 months ago #295130
by nicolas
Replied by nicolas on topic Layout Problem of Customized Email Template
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
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.
- FORIDA_LTD
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
8 years 2 months ago - 8 years 2 months ago #295309
by FORIDA_LTD
Replied by FORIDA_LTD on topic Layout Problem of Customized Email Template
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.
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: 8 years 2 months ago by FORIDA_LTD.
Please Log in or Create an account to join the conversation.
- FORIDA_LTD
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
8 years 2 months ago #295311
by FORIDA_LTD
Replied by FORIDA_LTD on topic Layout Problem of Customized Email Template
Hi Nicolas,
I fixed the issue by adding the preload.php for the new template.
Thanks.
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.
Less
More
- Posts: 12953
- Thank you received: 1778
8 years 2 months ago #295316
by Mohamed Thelji
Replied by Mohamed Thelji on topic Layout Problem of Customized Email Template
Hi,
Thank you for your feedback !
Thank you for your feedback !
Please Log in or Create an account to join the conversation.
Time to create page: 0.203 seconds