Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8990803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:34:58+00:00 2026-06-15T22:34:58+00:00

I want to add two custom fields for newsletter subscriber at which date customer

  • 0

I want to add two custom fields for newsletter subscriber at which date customer subscribed and its ip address:
1) I had added two columns in ‘newsletter_subscriber’ table.
How this can be achieved?

In the file app/code/core/Mage/Newsletter/Model/Subscriber.php
I found the the functions like:

$this->setSubscriberEmail($email);
$this->setStoreId(Mage::app()->getStore()->getId());
$this->setCustomerId(0); 

But i did not found its code.
I think I also save data like that but how it will be possible ? where I have to define and declare code for the function like $this->seSubscriptionDate();

And how to display in Admin panel under Newsletter->Newsletter Subscriber ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:34:59+00:00Added an answer on June 15, 2026 at 10:34 pm

    I had not find the solution or help from any person.
    I bang my head and find the solution its very simple hope in future may some one’s time save by this post:
    1) Add columns in the table “newsletter_subscriber” say in my case “subscription_date” and “sub_ip_address”
    2) Add following two lines in the file @ two places
    app\code\core\Mage\Newsletter\Model\Subscriber.php

    **$this->setSubscriptionDate(date("d-m-Y"));
    **$this->setSubIpAddress($_SERVER['REMOTE_ADDR']);
    

    One place: in the function: public function subscribe($email)
    Before: $this->save();
    Second place: in the function: public function subscribeCustomer($customer)
    Before: $this->save();
    Now data will be added in the table
    Now to show in admin panel
    1) Open the file app\code\core\Mage\Adminhtml\Block\Newsletter\Subscriber\Grid.php
    Just add two required columns in it like

    $this->addColumn('subscription_date', array(
                'header'    => Mage::helper('newsletter')->__('Subscription Date'),
                'index'     => 'subscription_date',
                'default'   =>    '----'
            ));
    
            $this->addColumn('sub_ip_address', array(
                'header'    => Mage::helper('newsletter')->__('IP Address'),
                'index'     => 'sub_ip_address',
                'default'   =>    '----'
            ));
    

    Now finish.
    ** This is the point where I spent my time and at the end I added this function on hit and trieal basis but it works.
    Someone from Core magento team plz explain why this {setSubscriptionDate()}function work ? I had not declared anybody of this function.
    It seems it shows intellisense to detect table field?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie with magento. I want to add two custom image fields to
I want to add two buttons with custom image to Navigation Bar with some
I want to add two maps together with the following behavior. if key exists
I want to add two lists of a numeric type such that addedList[x] =
I want to add two columns to a file with ~10,000 columns. I want
Suppose I want to add two buffers and store the result. Both buffers are
I have been developing an Android RSS news reader.I want to add two buttons
I want to do the following: 1: Add two dropdown list in the register.aspx
In my application i want to add more than two markers in a Google
I want to add space after every two chars in a string. For example:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.