I upgraded a couple D7 sites to php7 recently and the html formatting in email templates broke for both. In both cases, the inline styles in invoice emails go missing with php7. If I roll back to php56, the styles appear again. The email templates for both sites have been working well for several years now, so this is something new.

Commerce Invoice Receipt 7.x-1.1
Emogrifier 7.x-1.18

Custom css and template in my theme folder:

commerce_invoice_receipt.css
commerce-order-invoice-view.tpl.php

I haven't had time to troubleshoot yet.

Could try the 7.x-2x dev branch...but not clear if it's stable enough?

Comments

dave bruns created an issue.

stroobl’s picture

Update the emogrifier library and this will be fixed. Version 1.2.0 works with php 7 for me.

dave bruns’s picture

Thanks for this tip. I updated the emogrifier library and the module itself, but still not seeing CSS applied to emailed orders.

Do I need to update commerce invoice receipt to the 2x dev branch? I'm still using 7.x-1.1

Commerce invoice receipt 7.x-1.1
Emogrifier 7.x-2.0-beta1
Emogrifier library 1.2.0