1

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?

Community
  • 1
  • 1
user1433900
  • 207
  • 1
  • 2
  • 11

1 Answers1

0

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.

CCBlackburn
  • 1,704
  • 1
  • 12
  • 23