Magento通讯没有张贴

fro*_*sty 1 magento

我希望在我的主页上有一份时事通讯.我找到了以下代码,我已将其复制到"内容"选项卡中.

{{block type="core/template" template="newsletter/subscribe.phtml"}}
Run Code Online (Sandbox Code Playgroud)

这是在我的页面上呈现,但我找不到响应.也就是说,收据没有输入新闻通讯部分.它似乎没有张贴在任何地方.这是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>
Run Code Online (Sandbox Code Playgroud)

Iva*_*nyi 11

您需要在newsletter/subscribe阻止类型时使用,因为core/template没有getFormActionUrl()方法,该方法返回用于提交简报订阅表单的URL.

在CMS页面中使用此代码:

{{block type="newsletter/subscribe" template="newsletter/subscribe.phtml"}}
Run Code Online (Sandbox Code Playgroud)