El Patron Posted November 26, 2011 Share Posted November 26, 2011 I am passing a value via the Mail class that I had hoped would allow me to check the value and change the output of the 'account.html' text. I tried using 1. {if something} {else} {/if} structure i.e smarty type php insertion, this based on {shop_url} tags (like smarty .tpl's). The result is that the email gets sent with {if something} {else} {/if} like text. Note I printed the value I want to check and it showed correctly. 2. typical php if else wrapped code in the account.html. The result, no php code showed up, however was not executed as both texts of a 'else' statement printed in the email. I questioned whether my server would parse .html pages. I added AddType .html .php in my httpd.conf and booted apache...With same results. (this also had me researching AddType vs AddHandler, this made me even more tired as it appears most of us have this set up incorrectly. Well at least since 1996. ref. http://www.devside.net/articles/php) Anyone with an example of how to put conditional code in one of the mail templates? Any and all input is would be very much appreciated. Link to comment Share on other sites More sharing options...
olea Posted November 26, 2011 Share Posted November 26, 2011 Up to 1.4, this is not possible to have conditionnal code in the emails: they are static html in which {string} are considered as markers to ne replaced by another string In 1.5, it Will be possible as mails will be managed in smarty 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now