在 Magento 订单邮件中显示出生日期

发布于 2024-12-17 12:40:33 字数 245 浏览 1 评论 0原文

我想在客户的订单邮件中显示客户的生日。注册邮件里是

{{var customer.dob}}

但这在订单邮件中不起作用。还:

{{var order.getCustomerDob()}}

不起作用。而且我在网上找不到正确的语法。你有线索吗?或者我是否需要为此编写一个额外的方法,如果需要,在哪里?

I would like to show the Birthday of a customer in their order-mail. In the registration mail it is

{{var customer.dob}}

But this doesn't work in the Order-Mail. Also:

{{var order.getCustomerDob()}}

doesn't work. And I cannot find the right syntax online. Do you have a clue? Or do I need to write an extra method for that, and if so, where?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬花如无物 2024-12-24 12:40:33

试试这个:

$customers = Mage::getModel('customer/customer')  
  ->getCollection()  
  ->addAttributeToSelect('firstname')  
  ->addAttributeToSelect('lastname')  
  ->addAttributeToFilter('dob',array('like'=>'%-'.date('m-d').' %'))  
  ->load();

Try this :

$customers = Mage::getModel('customer/customer')  
  ->getCollection()  
  ->addAttributeToSelect('firstname')  
  ->addAttributeToSelect('lastname')  
  ->addAttributeToFilter('dob',array('like'=>'%-'.date('m-d').' %'))  
  ->load();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文