开发者

Magento: how do I determine if a customer is new?

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 custom开发者_高级运维er?

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_at field in the customer_entity table. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜