shopware - shopware 6 中的电子邮件模板变量
问题描述
如何在 shopware 6 中转储可用于我的电子邮件模板的变量,如果无法转储它们,我在哪里可以找到它们。谢谢
解决方案
我知道它很晚,但如果其他人偶然发现这一点,你可以使用MailBeforeValidateEvent
如下:
public static function getSubscribedEvents()
{
return [
MailBeforeValidateEvent::class => 'mailValidate'
];
}
public function mailValidate(MailBeforeValidateEvent $event): void
{
// Here you get the template data
$templateData = $event->getTemplateData();
// Here you get the data
$data = $event->getData();
}
推荐阅读
- python - Pandas Dateoffset 行为不一致
- java - 从单独的方法调用时,getKey(alias, keyPassword) 返回密钥的空值
- java - 将事件发布到事件队列 / edt - 未传递给 actionPerformed() 的事件
- java - 为什么其他玩家在我的 Last Stone Game (Nim) 实现中永远不会轮到它?
- c# - Azure 机器人框架| 如果一段时间没有用户回复,那么如何给用户发送提醒呢?
- python - 映射函数后 tfds.as_numpy() 崩溃
- xml - 如何修复我的 XSLT 以按预期将 XML 正确转换为 HTML?
- c# - “值不能为空。参数名称:源”同时从视图中的连接表添加项目
- python - 使用 for 循环将 pandas 数据框附加到字典中
- c# - Visual Studio 从同一网络中的另一台计算机调试 Web 应用程序