Posted: June 3, 2013 at 2:56 pm
|
Been trying to create HTML email in the general settings tab for payment confirmation – but seems like wordpress’ wpautop function takes over and all the HTML is quoted with <p> tags and also br tags after every line. Any suggestions on how we can design custom html emails? Event Espresso version3.1.32.2.P WordPress versionWP 3.5.1
|
Hi Pranu, Can you post some sample HTML email content so we can look into this? |
|
|
Hi Josh, Not a problem. I am posting this HTML into the Email Setting content block using the Text option, not Visual. It is from a basic MailChimp HTML template: <!– // Begin Template Body \\ –> <table border=”0″ cellpadding=”0″ cellspacing=”0″ width=”600″ id=”templateBody”> <tr> <td valign=”top” class=”bodyContent”> <!– // Begin Module: Standard Content \\ –> <table border=”0″ cellpadding=”20″ cellspacing=”0″ width=”100%”> <tr> <td valign=”top”> <div mc:edit=”std_content00″> <h1 class=”h1″ style=”text-align:center;”>You Have Been Registered!</h1> <p><strong>[fname]</strong>,</p> <p>Thank you for registering for [event].</p> <p>Your transaction ID number is [txn_id]</p>
<strong>We are excited here at CU</strong> to get you going on the path to your certificate! <p>Thank You.</p> </div> </td> </tr> </table> <!– // End Module: Standard Content \\ –>
This is the result after save: http://colorado.allcampus.com/espresso-email/after-save.jpg |
Hi Pranu, I tried the code and I did see an issue right after I took the markup you posted above, fixed the double quotes that got converted by the forum software and posted it into the Payment confirmation email editor and saved. However, I switched to visual mode, then back to text mode and saved and while there were a few p tags added, they were only there where a line break was needed. The one thing that did happen was the html comment lines got a bit messed up from when I toggled back and forth from Text mode to Visual mode. So I removed those. <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody"> <tr> <td valign="top" class="bodyContent"> <table border="0" cellpadding="20" cellspacing="0" width="100%"> <tr> <td valign="top"> <div mc:edit="std_content00"> <h1 class="h1" style="text-align:center;">You Have Been Registered!</h1> <p><strong>[fname]</strong>,</p> <p>Thank you for registering for [event].</p> <p>Your transaction ID number is [txn_id]</p> <strong>We are excited here at CU</strong> to get you going on the path to your certificate! <p>Thank You.</p> </div> </td> </tr> </table> Here’s the markup I ended up with: <table id="templateBody" width="600" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="bodyContent" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="20"> <tbody> <tr> <td valign="top"> <div> <h1 class="h1" style="text-align: center;">You Have Been Registered!</h1> <p><strong>[fname]</strong>,</p> <p>Thank you for registering for [event].</p> <p>Your transaction ID number is [txn_id]</p> <p><strong>We are excited here at CU</strong> to get you going on the path to your certificate!</p> <p>Thank You.</p> </div> </td> </tr> </tbody> </table> One thing that may be causing the extra tags to get added is if there are any theme or plugin functions that are adding their own formatting functions. I’m running the twentythirteen theme with a minimal set of plugins. So if the issue persists you might try temporarily switching to the default theme and deactivating other plugins and this may help. |
|
|
Posts now showing up |
|
I submitted a response twice and it didn’t show up. I submitted the response about and that showed up, so I’m not sure if my posts are being posted. Will try in pieces. |
|
This seemed to help a bit. I switched over to the TwentyEleven theme and turned off ALL plugins except for Event Espresso. This email code has been parsed through CSS in-liner tool and tested with different email clients. I pasted the code and clicked on visual to check then saved. That seemed to not add any <br> tags and <p> tags BUT it stripped out the <p> tags I needed. Pasted Code: <table id="backgroundTable" style="margin: 0; padding: 0; background-color: #fafafa; height: 100%; width: 100%;" width="100%" border="0" cellspacing="0" cellpadding="0"> <p>Thank you for registering for [event].</p> <p>Your transaction ID number is [txn_id]</p> <p><strong>We are excited here at CU</strong> to get you going on the path to your certificate!</p> <p>Thank You.</p> </div></td> |
|
My responses aren’t being posted. My intended <p> tags get stripped out and the email is broken in my email client. The email has been tested on email clients and should not be broken. |
Hi Pranu, I’m not finding this to be the case when I test this on my setup, but you might try an alternate template that doesn’t rely on p tags -or- if you want to try some experimentation, you could remove the autop filter from the /includes/functions/email.php on line 577. |
|
The support post ‘Custom HTML Payment Confirmation Email’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.