Magento - 模板文件的更改未显示 - /customer/form/register.phml

时间:2012-05-16 12:21:47

标签: magento php

我正在对/customer/form/register.phml进行一些更改,但它们没有出现在前端。我对login.phtml和forgotpassword.phtml所做的更改会显示出来。

我检查了magento是否使用了基本/默认主题的后备,但事实并非如此。我在我的主题和基本/默认主题中删除了register.phtml以检查会发生什么:页面显示正常(当然没有更改)。

我看起来像magento从其他地方获取文件(也许是核心)。我不知道如何解决这个问题。

提前感谢您的帮助。

我的Customer.xml文件如下所示,我正在使用magento 1.5.1

<customer_account_create translate="label">
   <label>Customer Account Registration Form</label>

   <remove name="right"/>
   <remove name="left"/>

   <reference name="root">
       <action method="setTemplate"><template>page/1column.phtml</template></action>
   </reference>

   <reference name="content">
           <block type="customer/form_register" name="customer_form_register"  template="customer/form/register.phtml">
               <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
                   <label>Form Fields Before</label>
               </block>
           </block>
   </reference>
</customer_account_create>

5 个答案:

答案 0 :(得分:4)

调试此方法的最佳方法是打开模板路径提示。

答案 1 :(得分:3)

您可能需要修改template/persistent/customer/form/register.phtml

答案 2 :(得分:2)

是的我同意WebFlake启用模板提示,它会让您知道从哪个模板文件中提取表单,很可能是您正在修改错误的模板。

以下是解释如何启用模板提示的链接:http://vimeo.com/1067069

答案 3 :(得分:2)

使用模板提示。此外,对于您所做的任何phtml更改,请确保已禁用缓存,并刷新所有缓存(系统 - &gt;缓存管理)。

答案 4 :(得分:2)

我使用了模板提示并发现插件替换了该文件。启用模板提示:http://vimeo.com/1067069帮助很多