Developer forum

Forum » Swift » How do I use system emails in Swift?

How do I use system emails in Swift?

Roald Haahr
Reply

Hi,

A quick Swift question – How do I use the email layout in the system email page below? I can’t find anything about it in the documentation.

Swift version 1.19
Dynamicweb version 9.15.2

Kind regards
Roald


Replies

 
Jennifer Johansen Dynamicweb Employee
Jennifer Johansen
Reply

Hi Ronald 

We are working with the documentation for System emails.
But the way it work is e.g. on the externet app where you typically use an email template you can select a page instead
where you can point to the system email instead.

Order receipt is still under development, which is used in the checkout app. 

In Swift 1.19.0 and the database from that release, is set up with the regular email template.
you need to go to the different location and point to the system email you need


 

 
Roald Haahr
Reply

Hi Jennifer,

I tried that and managed to get the layout in a reset password email. However, it seems that once the email is sent, the Pageview property is returning the pageview of the page of the source form rather than the pageview of the layout page. As the theme is set on the parent page of the layout and Pageview.Page.Parent is hitting the parent of the form page, I am unable to change the theme of the email layout. Also, if I send the email from a top level page (no parent), the email contains nothing but exceptions.

I use DW 9.15.4 and Swift 1.19 gradually upgraded from Swift 1.14.

Is it working as intended on a brand new Swift?

Kind regards,
Roald

 
Goncalo Faria
Reply

Any update on this? Im having the same issue.

 
Roald Haahr
Reply

Hi Goncalo,

I opened a support case and it was registered as bug #12791. It is reportedly fixed in Swift 1.21.0. 

Kind regards,
Roald

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is the Order confirmation email already implemented?

Thank you,

Adrian

 
Roald Haahr
Reply

Hi Adrian,

We are using it on a couple of shops, but we had to adjust some of the templates. I think, it should be working now on the newer versions of Swift though. :)

Kind regards,
Roald

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Roald,

What about the Order Confirmation emails?

Did you manage to use SystemEmails for it as well? I have checked a new version of Swift (not sure if it was the latest though) and the paragraphs used for rendering order content in the preview did not seem to be dynamic at all. They had fixed information instead of dynamic tags.

Adrian

 
Roald Haahr
Reply

Hi Adrian,

For the dynamic tags we have made it work by surrounding the tags by {{ and }}. Below is from a demo of Swift v1.23.

I see that the example Order Confirmation Email page in a standard Swift does not reflect all of its features. To show the orderlines, you can add the Orderlines item to a row and select 'Order context renderer' in the app section. At least that is how we have made it work.

​

Kind regards,
Roald

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Roald,

That's pretty cool!

It means the dynamic tags are supported.

Thank you very much for the confirmation.

Adrian

 
Martin Ottesen
Martin Ottesen
Reply

Hi Roald, 

This is very interesting as i have a few customers who is asking for a new order confirmation email. 

Have you had to change anything to the orderlines item? Because i've just tested it in a 1.24 and i end up getting a template error.

 
Martin Ottesen
Martin Ottesen
Reply
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Martin,

This is a separate approach using a page instead of the regular confirmation email template.

Adrian

 
Martin Ottesen
Martin Ottesen
Reply

Hi Adrian, 

Yes it's using the Order Confirmation Email page is that not what we are talking about above? 

I have added the Orderlines item to my page, and chosen it in the in my email notification. 

Or am i misunderstanding something?

 

Martin

 
Roald Haahr
Reply

Hi Martin,

I haven't made any changes to the template. Have you selected a test order in the app settings?

Kind regards,
Roald

 

You must be logged in to post in the forum