magento - 如何通过电子邮件发送评论表单网址(无管理面板)
问题描述
您好,我希望能够向我的客户发送一封包含 URL 的电子邮件,该 URL 会将他们定向到一个表单,当订单状态完成时,他们可以在该表单中留下对该特定产品的评论。
当前代码:
public function afterSave(OrderRepositoryInterface $subject, $result)
{
if($result->getState() == Order::STATE_COMPLETE) {
$orderProductUrls = [];
foreach ($result->getAllItems() as $item) {
// this is where I add the Review form Url for product
$orderProductUrls[] = $item;
}
$this->orderUrlMessagePublisher->publishMessage($orderProductUrls);
}
return $result;
}
如您所见,我在针对州的订单上设置了一个保存后插件。现在我卡在 url 页面上,如何获取这些产品的评论表?
解决方案
推荐阅读
- postgresql - Postgresql 安装默认时区设置不同
- python - Visual Studio Code (VSC) python bash:意外标记“&”附近的语法错误
- c - 为什么在使用 isdigit 函数时出现分段错误?
- spring-boot - Spring Boot 2.5 Hibernate 错误:无法获取当前线程的事务同步会话
- python - 在文本字段中输入文本后如何按 Enter?
- python - 使用 python 将 csv 文件加载到 SnowFlake 表中
- spring-boot - 如何使 Spring Boot 适配器中的 Keycloak 策略执行器与 vaadin 一起使用
- apache - Apache 反向代理到动态端口
- c - 从北欧半导体库了解编写预处理器指令的方法
- ssl - 如何根据请求域动态设置 SSL 证书?