E-mail template - switch on age of {$customer.createdDatetime}

We need to send different e-mail text for "Payment Declined" in the case of a new customer (such as a mistake in typing their address during initial signup) vs. existing customer (such as declined due to card cancelled etc.).

I see there is "{$customer.createdDatetime}" available, but can you please show quickly how we could use this in an e-mail template? Say we want one text for created in the last 30 days, and another text for created further back than that.

Thanks!

  1. Hi Dan -- I think you want to switch on the $invoice.isInitial value. That's a 1 or 0 indicating whether or not the invoice is the first one. You can, of course, do what you're suggesting with the customer $customer.createdDatetime value with something like:

    {if $customer.createdDatetime|date_format:"%s" < $smarty.now-60*60*24*30} created more than 30 days ago {/if}
    
  2. Jess Pendley closed this discussion on 21 Nov, 2013 07:49 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions