【问题标题】:Display template in front-end前端展示模板
【发布时间】:2018-03-20 09:45:18
【问题描述】:

我遵循了 Incho for Magento 的教程

如何添加带有电子邮件通知的自定义联系表单我添加了现在提到的文件我需要知道如何在前端显示它。

教程链接:inchoo.net/magento/magento-email/magento-custom-email-contact-form-with-notification-system/

问候,

【问题讨论】:

  • 在前端但是你想在哪里显示?目前,它将在http://127.0.0.1/magento/inchoo-simplecontact
  • 我创建了 cms 页面并希望在其中显示表单

标签: magento magento-1.9


【解决方案1】:

将此添加到您的 cms 页面中

{{block type="core/template" name="simple_contact_form" form_action="/inchoo-simplecontact/index/sendemail" template="inchoo/simple_contact.phtml"}}

查看app\code\local\Inchoo\SimpleContact\controllers\IndexController.php

sendemailAction(),最后是$this->_redirect('inchoo-simplecontact/');,这将重定向。所以你可能想改变重定向它在这里。

【讨论】:

  • 感谢您的回复我添加了代码,但cms页面中仍然没有显示表单
  • 这很奇怪......因为我在本地的 Magento 项目中做了同样的事情并且它正在显示。
猜你喜欢
  • 2015-03-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多