Magento extension Subscription Date Fix by GregC

MageCloud partnered with GregC to offer Subscription Date Fix in your MageCloud panel for our simple 1-click installation option. To install this extension - create your account with MageCloud and launch a new Magento store. It takes only 3 minutes.

GregC always provides support for customers who have installed Subscription Date Fix Magento module. Feel free to leave a review for the company and the extension so we can offer you better products and services in the future.

You may want to check other GregC Magento extensions available at MageCloud and even get extensions from hundreds of other Magento developers using our marketplace.

This simple observer inserts the date associated with newsletter subscribe/unsubscribe actions.

Compatible with Magento 1.x

Subscription Date Fix

So I wanted to know the date that users were subscribing or unsubscribing to newsletters.

I dove into the database to see if the newsletter subscription table had some sort of updated_at field, and there it was - change_status_at. At first I was joyful, then tears came to my eyes when I saw that the field always contained NULL.

I jumped screens and used the power of Goooogle to divine an answer from the internets. I soon found that others had run into this very issue and went away unanswered. There were even those who claim -

"that it used to work in very old versions of Magento, but doesn't anymore".

At a guess, I think what happened is that the field's definition used to be setup to magically update as a default timestamp (i.e. ON UPDATE CURRENT_TIMESTAMP), but that setting was lost in a past and long forgotten update. So there's no core Magento code that writes to the field because "it didn't have to".

So I put down my beer and put on my trusty Magento Certified Developer's thinking cap and bashed out a quick module that solves the problem by observing changes to the mystical event newsletter_subscriber_save_before and provides the missing date.

Now I'm here to share this solution with the anyone in the Mage Multiverse who might find need of it.

Install this little gem and you can take cat naps peacefully, knowing that you now have a time and date when someone subscribed (or