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

如何在magento 1.7.0.2的简报中添加新字段(suscriber_name)?

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?

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器