2012-12-11 15:01
采纳率: 0%
浏览 27


I am trying to add a new field into newsletter subscription form. I have found this solution. But when I open the file mentioned in the answer ie Mage_Newsletter_Model_Mysql4_Subscriber (app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber.php)

I looks like:

class Mage_Newsletter_Model_Mysql4_Subscriber extends Mage_Newsletter_Model_Resource_Subscriber

It confused me to modify the file. Can any one please guide how to achieve what I want?

图片转代码服务由CSDN问答提供 功能建议

我正在尝试将新字段添加到简报订阅表单中。 我找到了这个解决方案。 但是,当我打开答案中提到的文件,即Mage_Newsletter_Model_Mysql4_Subscriber (app / code / core / Mage / Newsletter / Model / Mysql4 / Subscriber.php)


  class Mage_Newsletter_Model_Mysql4_Subscriber扩展Mage_Newsletter_Model_Resource_Subscriber 

我很难修改文件。 任何人都可以指导如何实现我的目标吗?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douhuigang9550 2012-12-11 22:01

    The key to this is the class declaration:

    class Mage_Newsletter_Model_Mysql4_Subscriber extends Mage_Newsletter_Model_Resource_Subscriber

    Note the word extends? This means that this class inherits its functionality from the Mage_Newsletter_Model_Resource_Subscriber class. I would be looking at the app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php file instead.

    The reason this is different to the solution you have found is that as of 1.6 Community Edition, the Mysql4 model was deprecated and Resource was used. This was to allow Magento to better support different database engines.

    解决 无用
    打赏 举报

相关推荐 更多相似问题