Magento – Where is the newsletter ‘general subscription’ field stored in the database

customereavnewsletter

I'm working on a customer database export, but can't find where the 'general subscription' newsletter subscription field is stored in the database. I imagine it is some EAV value, but in what table and with what attribute_id?

Best Answer

I figured it out. The table 'newsletter_subscriber' contains several fields, the ones most meaningful for my purpose are:

  • store_id
  • customer_id
    • the customer entity_id
  • subscriber_email
    • perhaps someone can subscribe with a different email than their customer email?
  • subscribe_status
    • 0 = Default ( can be seen in the table structure in database )
    • 1 = Subscribed
    • 2 = Not Active
    • 3 = Unsubscribed
    • 4 = Unconfirmed

Status 1 to 4 can be seen at /app/code/core/Mage/Newsletter/Model/Subscriber.php

Note: This is not a topical or 'typed' subscription, but a global opt-in newsletter field for a Magento customer record.

Related Topic