Magento 时事通讯未发布
我希望在我的主页上有一份时事通讯。我找到了以下代码,并将其复制到“内容”选项卡中。
{{block type="core/template" template="newsletter/subscribe.phtml"}}
这是在我的页面上呈现的,但是我找不到响应。也就是说,收据不会输入新闻通讯部分。似乎没有在任何地方发布。这是生成的 HTML。
<form action="" method="post" id="newsletter-validate-detail">
<div class="block-content">
<label for="newsletter">Sign Up for Our Newsletter:</label>
<div class="input-box">
<input type="text" name="email" id="newsletter" title="Sign up for our newsletter" class="input-text required-entry validate-email" />
</div>
<div class="actions">
<button type="submit" title="Subscribe" class="button"><span><span>Subscribe</span></span></button>
</div>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');
//]]>
</script>
I wish to have a newsletter on my home page. I found the following code, which I have copied into my "Content" tab.
{{block type="core/template" template="newsletter/subscribe.phtml"}}
This is rendered on my page, however I cannot find the response. That is, the receipts are not entered into the newsletter section. It doesn't seem to post anywhere. Here is the HTML produced.
<form action="" method="post" id="newsletter-validate-detail">
<div class="block-content">
<label for="newsletter">Sign Up for Our Newsletter:</label>
<div class="input-box">
<input type="text" name="email" id="newsletter" title="Sign up for our newsletter" class="input-text required-entry validate-email" />
</div>
<div class="actions">
<button type="submit" title="Subscribe" class="button"><span><span>Subscribe</span></span></button>
</div>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
var newsletterSubscriberFormDetail = new VarienForm('newsletter-validate-detail');
//]]>
</script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用
newsletter/subscribe
作为块类型,因为core/template
没有getFormActionUrl()
方法,该方法返回提交的 url时事通讯订阅表。在您的 CMS 页面内使用此代码:
You need to use
newsletter/subscribe
as you block type becausecore/template
doesn't havegetFormActionUrl()
method, which returns url for submitting newsletter subscription form.Use this code inside of your CMS page: