Newsletter-only Subscriptions for ZenCart

Newsletter Subscribe is a contribution for handling newsletter-only subscriptions.

It incorporates Subscribe! v1.1 and newsletter_unsubscribe contribs for 1.2.7, plus adds more functionality.

Next Release

It’s coming, if it has to be done file by file.

All work is delayed due to a, well, devastating family issue. I’m getting to stuff as fast as I can.

In addition, my free time in the last couple months has been nebulous, intervening with my desire to give you guys one last stable release. It’s getting there, but still needs about 12 or so hours to get it done, likely a bit more since I don’t get that much time uninterrupted. If you’d like to ‘buy’ hours with a donation please feel free, but I’m not doing this as a ransom tactic-I’ve just got the priority of getting the paying work done and it’s leaving little room for pro bono work.

Latest Version

The latest version is v2.0.5. It’s mainly a bug-fix release, getting rid of a few annoyances, but it also enhances the subscription manager page in admin.

Catalog features:

Admin features:

Not compatible with earlier versions of ZenCart without a lot of editing.

h3 Known Issues

Version 2.0.5

(v2.0.0 -> v2.0.5) The email input box is too wide!
This occurs in the Sophy Blue template, but may happen in others. This issue is that the column width isn’t really as wide as set in the admin due to padding/margin issues. See this post on the ZC forums for the explanation and a fix
(v2.0.0 -> v2.0.5) The customer subscribe date is blank, 0000-00-00 or some odd date in 1971 or 2036 or the like
customer_date_patch_zc135.zip

I’ve attached a patch that updates create_account.php module and admin/customers.php for 1.3.5 it adds the subscribed date for customers.

What it does is set the subscribed date to the current time-so if a customer subscribes, then unsubscribes, then subscribes again, the date will be that 2nd subscription date.

If a news-only subscriber creates an account, it’ll update the subscribed_date to the day they sign up.

Remember to backup before making change to files or the db!

For those not upgraded to 1.3.5 yet:
1) upgrade.
1a) if you can’t, read the readme included for how to manually edit the files

To fix customers currently in the system run this in your sql patches section of the admin:

update subscribers set subscribed_date = now() where subscribed_date = '0000-00-00';

Version 2.0.3

(v2.0.3) MySQL errors when updating, getting admin notice of subscriptions even though you have it turned off

Download and install v2.0.5. Just overwrite the files. Click on ‘update’ button in subscription manager page.

(v2.0.3) Admins subscription manager: sorting works wonderfully…until you try to click on a string to edit. Then it’s resetting to the default display.
Also, I’m not sure if it’s a ‘first record’ issue or ‘customer’ issue but clicking on the first address to edit gives you a blank edit box.

Working on a patch. I have the sorting fixed but decided to enhance it with a search function. The patch will be out 7-1-2006 or the night before.

Version 2.0.2

(v2.0.2+)Unsubscribing with no email address gives you the ‘the email you have entered has been unsubscribed’ message

If you edit template/your_template/templates/tpl_unsubscribe_default.php and change line 14 from:


 <?php if (!isset($_GET['action']) || 
        ($_GET['action'] != 'unsubscribe')) { ?>
 
to

 <?php if (empty($unsubscribe_address) ||
  ((!isset($_GET['action']) ||
  ($_GET['action'] != 'unsubscribe')))) { ?>
 

It will always show the “We’re sorry you want to unsubscribe” text for blank emails.

The sidebox may be too wide (v2.0.2)

If you use a tabled layout (like the classic/bluestripe layout that was made to be compatible with 1.2.7) you may experience a sidebox that’s too wide. I developed on a CSS layout, so didn’t notice it and it took a few posts from (properly) concerned users to pinpoint the issue.

The box gets wrapped in a table and the text, field and button are all displayed on a line. To fix this we need to add a line break before the text field and the submit button (note that it may be that just adding a space may do to, but untested).

This patch has a new tpl_subscribe.php sidebox template with line breaks placed before those elements, and should fix the issue (please let me know if it doesn’t). ns202_sidebox_patch.zip

Subscription Manager is not saving email format (v2.0.2)

Problem: The v2.0.2 subscription manager was not handling email formats properly. This should fix the issue. Unzip this file and copy to admin/subscription_manager.php, overwriting the other version. ns202_subscription_manager_format_patch.zip

Wishlist

Below are items folks have requested for the next version and their disposition (if any)

Email Import Status: done-v2.0.3 (Status: done-v2.0.3)

I made the first version last night. It tests fine with csv or other deliminators, so long as each record is on a newline.

Email Export

I found there is an excellent export contribution in the downloads section, so I will not reinvent the wheel. Folks needing export ability can try that.

Fix known issues Status: done-v2.0.3 (Status: done-v2.0.3)

I have both of the patches incorporated, and have fixed a few other bugs as well.

v1.3.2 compatibility Status: done-v2.0.3 (Status: done-v2.0.3)

I’ve merged the core file patches for 1.3.2 into the new version.

Rewrite subscribe header file to sensible defaults if POST values fail to pass. Status: done-v2.0.3 (Status: done-v2.0.3)

This error creeps up if you are using both SEFU and Image Handler 2. The file now default to requesting the subscription again, but you’ll need to fix your html_output.php file. See this post for details: http://www.zen-cart.com/forum/showpost.php?p=212144&postcount=43

Revise readme file’s installation steps. Status: done-v2.0.3 (Status: done-v2.0.3)

The installation instructions now refer to ‘zencart root’ instead of ‘catalog/ directory’.


Comments

1 Jake - Jun 16, 08:38 AM

Great contribution!

2 Michael Barnes - Jul 5, 12:15 AM

now onto my wishlist…... I am trying to figure out to make the process of dealing with subscribers who sign up after we have sent out the newsletter for the month. Would it be possible to track when a newsletter is sent out (set date) and then have a function where new suscribers who have not gotten that newsletter are tracked and grouped in the dropdown so that I can send them the newsletter, say once a week. When the next newsletter is sent to all subscribers it would reset the tracking.

on to another issue subscribe date. We already went over the subscribe date for customers in the zen_subscribers list. No issue but when I go to subscription manager some of the customers early (by date) on in the list have an odd date of subscrition (11-30-2036). These customers also have the 00-00-0000 date in the DB. I suppose the two are related but it seems to have stopped after one of the updates, not sure which one though since I didn’t notice this until today after I updated to 2.05

3 Jen Leheny - Feb 10, 07:23 AM

Great mod thankyou! I would like to know if there is a code change I can make to also capture the person’s name when they sign up for newsletter-only?

4 Jordi - Mar 2, 10:40 PM

Hi Sara – First of all thank you for the mod! It’s heaven sent! Now if I can only see it!! How do I make it show up in the header or sidebox? It’s now showing up in the box layout manager in the admin tool. Thanks!

5 Jake Marriott - Jul 10, 02:25 PM

Hi,

This is a great little add on, but I can’t seem to get the sidebox to display, there is no option of a newsletter sidebox in the box layout manager in Admin panel?

6 Patty - Jun 6, 11:57 AM

Hi can you tell me if this works with Zen Cart 1.5?

Add Your Comment