Post by tiredman » Mon May 18, 2020 11:21 am

I have a standard install of 3.0.2, which was migrated over from a different server.

I can't get plain text emails to show with basic formating like how I use to get so easily for the older one – it just works!
With the newly migrated one, all the content comes out in a single block, no spaces like so:
A new customer has signed up:Name:Example_Firstname Example_LastnameCustomer Group:DefaultE-Mail:example_name@gmail.comTelephone:828367908
The customer also receives a whole block and while it isn't deal-breaker, it does not look acceptable. This is so for every .twig file in the view/theme/default/template/mail directory. I have not gone to test in detail for the others.

I really prefer a simple plain text email notification, it forces us to go to the store to look at the details if needed. Twig renders correctly for other pages in the front and back end of the store.

Is there a 'switch', that was not turned on for this part of twig to work?

Thanks!

New member

Posts

Joined
Mon Aug 06, 2018 1:11 am

Post by sw!tch » Mon May 18, 2020 5:45 pm

So it worked prior to the migration? How are you editing the mail templates?

Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by tiredman » Mon May 18, 2020 6:51 pm

It works nice enough for me before the migration:
You have received an order.
Order ID: 4470
Date Added: 17/05/2020

Order Status: Pending

Products
2x Jxx: Midnight xxx - Be xxx (Jxx Midnight xxx ) S$ 68.00
1x Jxx: Hogwarts Essxxx - Mini xxx (Jxx Hogwarts Essxxx) S$ 30.00
1x Jxx: Flxxx Keys - Mini xxx (Jxx Flxxx Keys) S$ 30.00

Totals
Sub-Total: S$ 119.63
Free Shipping Country: S$ 0.00
GST (7%): S$ 8.37
Total: S$ 128.00

The comments for your order are:
Pls call before delivery as I want contactless courier delivery. Do not deliver without calling.
This is what it looks like now:
You have received an order.Order ID:4484Date Added:18/05/2020Order Status:CompleteProducts1 xJxx: Black Petxx - Be Right Bxxx (Last Piece) (Jxx Black Petxx)S$ 215.10TotalsSub-Total:S$ 201.03Pickup at LP (ONLY after circuit breaker):S$ 0.00GST (7%):S$ 14.07Total:S$ 215.10The comments for your order are:test
I coped over the same twig files from the earlier system. All data is sent out as a block of text. The similar style of messages for new account registration, etc.

New member

Posts

Joined
Mon Aug 06, 2018 1:11 am

Post by paulfeakins » Mon May 18, 2020 7:04 pm

I believe this file in the latest versions of OpenCart only has Unix line endings (\n) rather than previous versions that had both (\r\n) - perhaps the new server's version of "mail" doesn't automatically convert these. At a guess.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by tiredman » Mon May 18, 2020 8:42 pm

Is there a way I can pipe in to force the variables to have a \r\n?

New member

Posts

Joined
Mon Aug 06, 2018 1:11 am

Post by AnnieSteward » Tue May 19, 2020 10:04 am

I wonder if this event happens prior to the migration. If it is a yes, try to export a backup of those files and migrate them again.

Newbie

Posts

Joined
Wed Nov 27, 2019 5:20 pm

Post by paulfeakins » Tue May 19, 2020 6:07 pm

tiredman wrote:
Mon May 18, 2020 8:42 pm
Is there a way I can pipe in to force the variables to have a \r\n?
Well you could just edit the email template to have those, most text editors/IDEs should let you convert the Unix endings to DOS ones.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by tiredman » Tue May 19, 2020 11:14 pm

No, they aren't DOS. The server is UNIX, FreeBSD - 12.1.
I think you are right in your earlier reply, something more basic.
I haven't figured it, but UTF-8 encodings are not installed by default in FreeBSD, and that's what causing the problem.

New member

Posts

Joined
Mon Aug 06, 2018 1:11 am
Who is online

Users browsing this forum: Majestic-12 [Bot] and 13 guests