I want to be able to send different order confirmation emails to new customers than to established customers.
I am already able to put a block in the email template to insert my own ‘if’ constructs based on order details.
I can get the customer data from the order id, e.g. the customer id, but how can I determine if they are a new customer?
Even if it is getting the customer creation date and checking if it is less than five minutes, I need a technique to determine if they are new from within my template code based on the order information.
Either way your going to just have to do calculations on
created_atfield in thecustomer_entitytable. If not your going to have to find some specific window to consider customers as “new”.Don’t think I’d put said logic in the template file but rather a model and just pass it a block to flag it or not.