Post by vaguemind » Fri Sep 09, 2016 5:14 am

Hello, i need to know how to set the order confirmation emails that sent after placing orders and confirming orders and registration confirmation emails to be aligned Right to Left as i am using Arabic Language ?
I am using Opencart Version 2.2.0 ?

Thanks

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by fido-x » Fri Sep 09, 2016 2:52 pm

In catalog/model/checkout/order.php, insert the following at around line 393 (the beginning of the html email):

Code: Select all

$data['direction'] = $language->get('direction');
Then, in the template file (catalog/view/theme/default/template/mail/order.tpl), at the beginning of the file (line 2), replace:

Code: Select all

<html>
with:

Code: Select all

<html dir="<?php echo $direction; ?>">
This should align the html email to the direction specified by the chosen language in the order.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by vaguemind » Fri Sep 09, 2016 4:15 pm

Hello , i implemented this way , but still the email received is LTR not RTL ? what is the reason please ?

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by vaguemind » Sat Sep 10, 2016 3:59 am

I dont why it doesnt work with me ! logically what fido-x said should work ! but it doesnt ?

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by fido-x » Sat Sep 10, 2016 9:43 am

Try refreshing your modification cache.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by vaguemind » Sat Sep 10, 2016 1:54 pm

i did refreshed the modification cache and still the same !!!

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by fido-x » Wed Sep 14, 2016 2:29 pm

fido-x wrote:... in the template file (catalog/view/theme/default/template/mail/order.tpl), at the beginning of the file (line 2), replace:

Code: Select all

<html>
with:

Code: Select all

<html dir="<?php echo $direction; ?>">
Instead of the above, try "hard-coding" the direction in the template file, like so:

Code: Select all

<html dir="rtl">

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by vaguemind » Tue Sep 20, 2016 3:17 pm

That's strange ! still the same i receive order emails LTR not RTL ?! i don't know why !
there is no solution for this !

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by vaguemind » Thu Sep 22, 2016 8:42 pm

I did it by changing every div to rtl "hard-coding" way ...

Can you please advise from where i can RTL the confirmation email also after new registration ?

New member

Posts

Joined
Wed Jul 27, 2016 7:03 pm

Post by fido-x » Fri Sep 23, 2016 11:20 am

vaguemind wrote:Can you please advise from where i can RTL the confirmation email also after new registration ?
I don't think that's possible, since the registration confirmation emails are sent as plain text and not as a formatted html page.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by IP_CAM » Sat Sep 24, 2016 1:29 am

possibly something like this:
Ernie
http://www.opencart.com/index.php?route ... on_id=9901

Please do NOT send me Personal Mails, they will no longer be replied to.
---
My Github OC Site: https://github.com/IP-CAM
2'800+ FREE OC Extensions on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 12 guests