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 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line