December 23, 2003

Smarty HTML Email

Today is a good day to say the least. In the past few hours we have successfully run HTML confirmation email straight through Smarty to completion. There were several key pieces that had to be hunted over the past few weeks, all culminating into the last few hours, then...success. Smarty wants things done in one way, and one way only thank you very much.

What we end up with, is the ability for the end user to write a standard HTML template for their confirmation emails. The structure for Smarty is logical, if you want the Billing First Name in a certain place in the template you would type: {$billing.firstname} last name: {$billing.lastname} . End users don't have to care about anything past that, and in my opinion that is worth alot.

Product display in the confirmations will be returned in a pre-formatted block from the php script. Basically proddispfixed.php rebuilt for Smarty. It will need to be included via the include_php function in Smarty. The code for the end user templates looks like this:

{include_php file="ph2.php" assign="proddisp"}
{$proddisp}

I tend to ramble when excited, but honestly I believe this will benefit FishCart greatly. Until next time, God Bless.

Posted by Ben at December 23, 2003 11:39 PM
Comments