Magento 网站 - 嵌入电子邮件联系表单,允许用户发送文件附件

发布于 2024-09-09 11:11:33 字数 251 浏览 1 评论 0原文

我正在尝试向我的 Magento 网站添加一个包含查询表单的页面。用户将填写姓名、电子邮件、电话号码并添加文件附件。然后,店主将收到包含上传文件作为附件的电子邮件。

我是 Magento 新手,而我所服务的客户不愿意支付延期费用。

到目前为止,我的理解是我不能只使用标准的 php 电子邮件脚本,因为我会遇到有关文件上传的权限问题。我一直在研究使用 /media/ 文件夹上传文件的想法。

任何帮助将不胜感激。

谢谢,史蒂夫

I'm trying to add a page to my Magento site which contains an enquiry form. User would fill out name, email, tel no and add a file attachment. The store owner would then get the email with the uploaded file as an attachment.

I'm a Magento newbie and the client I'm doing this for is reluctant to pay for an extension.

My understanding so far is that I cant just use a standard php email script as I will have permissions issues regarding the file upload. I've been working on the idea of using the /media/ folder to upload the file.

Any help would be greatly appreciated.

Thanks, Steve

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┈┾☆殇 2024-09-16 11:11:33

创建一个新的 CMS 页面并粘贴以下代码:

{{block type="core/template" template="contacts/form.phtml"}}
<script type="text/javascript">
elem = $("contactForm");
elem.writeAttribute('action', '/contacts/index/post');
</script>

既然您已将表单置于 CMS 上下文中,则需要使用 javascript 来确保表单发布到正确的位置。

干杯,
京东

Create a new CMS page and paste in the following code:

{{block type="core/template" template="contacts/form.phtml"}}
<script type="text/javascript">
elem = $("contactForm");
elem.writeAttribute('action', '/contacts/index/post');
</script>

The javascript is required to make sure that the form posts to the correct location now that you have it in a CMS context.

Cheers,
JD

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文