Magento - 如何在查看 phtml 文件中向 friend 表单显示电子邮件

标签 magento magento-1.7

当您点击“向 friend 发送电子邮件”时,您将被引导至要提交的表单。我想在产品 View 页面中显示此表单,而不是“向 friend 发送电子邮件”链接。如何在view.phtml中调用send.phtml模板? 我尝试给出这个

<?php 
  echo $this->getLayout()->createBlock("core/template")->setTemplate("sendfriend/send.phtml")->toHtml();?>

但这不起作用,显示错误。请帮忙

最佳答案

使用这个你会缺少 block 类型

<?php 
  echo $this->getLayout()->createBlock("sendfriend/send")->setTemplate("sendfriend/send.phtml")->toHtml();?>

关于Magento - 如何在查看 phtml 文件中向 friend 表单显示电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33818933/

相关文章:

仅主页上的 CSS 布局问题和响应问题

api - Magento 1.7 REST API url 是什么?

玛根托 : Backend event handle for customer save

iphone - magento REST API 在 iPhone 中无法访问

javascript - 无法添加条件购物篮价格规则,没有选项或下拉 magento 后端

php - 如何在magento中更改区域设置基础上的图像?

magento - 可配置的虚拟产品magento

magento - 如何将 magento 的原生验证码用于产品评论页面和联系我们表格

magento - 如何在magento中获取产品名称?

php - 关于 Php、MySQL、Magento 和 Ubuntu 服务器