Jump to content
thirty bees forum

Recommended Posts

Posted

I can play-around with email templates, but how do I edit what their smarty tags call ?
I want to make two emails exactly the same, and can do the html part, but it looks as though I need to edit the {products} tag to make it work like the {items} tag, and the tags dont work if swapped around.  From bo> localization  >email templates > etc>

  •  core emails > order.conf uses a {products} tag 
  •  mailalerts > new_order uses an {items}  tag


core emails > order.conf  garbles customizations a little; it adds the product name and price twice, although the total is OK
products.jpg.a9079187cd2d5eae41ee027481493ee6.jpg


mailalerts > new_order copes better

items.jpg.7896ad122ed1015e63ccd3df3b6304e0.jpg

I'm sure there are other work-arounds (I could find some email service that sends new_order to the customer),
but it would be good to know how smarty tags work
any help welcome
John

Posted

Email templates don't have smarty tags. There are only placeholders that will be replaced with *static* content. This means that there can be no loops, no if/else, or other control blocks in the email templates. Which sucks.

Replacement content is defined by php code. Usually it is retrieved from existing data (order reference code, customer name, etc...). In some special cases (like here), the content is generated by evaluating smarty template. Template returns static html markup, which is then replaced into the email template. 

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...