1
我需要为贝宝付款发送同样的电子邮件模板,用于“等待付款”和“取消”,但是当我通知客户他们有一个待付款它应该说Your order is in pending payment
。如果我在管理员中点击取消按钮,电子邮件内容应为unfortunately your order has been cancelled
。在Magento的同一个电子邮件模板中添加一个条件来修改电子邮件内容
我在邮件模板尝试这样做:
{{if order.getStatusLabel() == 'canceled'}}
<p>unfortunately your order has been cancelled</p>
{{else}}<p>Your order is in pending payment</p>
{{/if}}
但unfortunately your order has been cancelled
已经为这两种类型的订单状态被发送。
- 我如果条件似乎并不奏效。任何想法为什么不呢?
- 的订单状态有时会返回取消,有时它返回取消。我不确定它为什么不一致!