abofayez Merchant Από Saudi Arabia Μέλος από Μαρ 2021 abofayez 13 Αυγ 2021 17:41 Hello everyone How do I align the text in emails from right to left. (I mean order status messages) The entire site works right to left alignment but the messages are still left to right. Thank you all
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 13 Αυγ 2021 21:13 Try setting this line https://github.com/litecart/litecart/blob/38b2f6e4e992a82ff6a8bf423cf6adc5011588a0/public_html/includes/templates/default.catalog/pages/printable_order_copy.inc.php#L47 To <section class="page" data-size="A4" dir="rtl">
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 13 Αυγ 2021 21:16 Oh wait you meant order status update notifications? That is cooked here: https://github.com/litecart/litecart/blob/38b2f6e4e992a82ff6a8bf423cf6adc5011588a0/public_html/includes/entities/ent_order.inc.php#L749-L802 Try changing this: $message = strtr($order_status->email_message, $aliases); Into this: $message = '<div dir="rtl">'. strtr($order_status->email_message, $aliases) .'</div>';
abofayez Merchant Από Saudi Arabia Μέλος από Μαρ 2021 abofayez 13 Αυγ 2021 21:40 Very cool... All messages have the alignment modified. Except for the order confirmation message, the alignment has not changed. When making a purchase, the customer receives a message with the order details. This message has not modified the alignment.
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 13 Αυγ 2021 22:45 What comes to the email body for the order confirmation it is plain text. So there is no parameter we can send. I read plain text should have the Right to left byter mark. https://en.wikipedia.org/wiki/Right-to-left_mark Try changing: $message = strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases); To: $message = "\u200F" . strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases); or $message = "\xe2\x80\x8f" . strtr(language::translate('email_order_confirmation', $message, $language_code), $aliases); https://www.compart.com/en/unicode/U+200F
abofayez Merchant Από Saudi Arabia Μέλος από Μαρ 2021 abofayez 14 Αυγ 2021 09:04 All my attempts failed. Thank you, dear Tim. Sorry I took up a lot of your time. Your presence is the life of this forum and a source of safety for all. There is no fear for Litecart as long as you are standing behind her. Accept my warmest regards
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 15 Αυγ 2021 04:29 Thank you for the kind words. Let's not give up just yet.
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 16 Αυγ 2021 18:26 Can you translate this for me and I will be able to make some tests. https://www.litecart.net/en/translations/edit?filter=all&locale_1=en-US&locale=ar-SA&query=email_order_confirmation
abofayez Merchant Από Saudi Arabia Μέλος από Μαρ 2021 abofayez 16 Αυγ 2021 18:39 The translation is done
tim Founder Από Sweden Μέλος από Μαΐ 2013 tim 17 Αυγ 2021 00:01 I did numerous tests with the right to left byte mark and nothing seems to work with plain text in Gmail. Makes me wonder how gmail users do it?
abofayez Merchant Από Saudi Arabia Μέλος από Μαρ 2021 abofayez 17 Αυγ 2021 05:45 I wish I had a little experience in this area to help. But if this becomes possible for you later, make it part of the development of the script. Thank you for your effort and interest.