CampaignMonitor Sidebox for Zen Cart v1.01
Version 1.01
For Zen Cart v1.3.x
Author: Luke McReynolds
http://lukemcreynolds.com
Zen Forum PM lukemcr
Released under the GNU General Purpose License
See license.txt for details. This documentation is derived in part from the documentation from MailChimp Sidebox v1.2 by Scott Wilson.
Donations welcome at http://lukemcreynolds.com/donate/.
The documentation you are currently reading and and even more information on this contribution is provided at
http://lukemcreynolds.com/software/zen-cart/campaignmonitor_sidebox_for_zen_cart_v1.0/
No warranties expressed or implied; use at your own risk.
Please note: I hope to develop a CampaignMonitor contribution for ZenCart that integrates with the core customer account creation mechanism. When/if I do that, I will include a link to it in future releases of this software. In the meantime, I hope that this contribution serves your purposes.
History:
1.01 2/12/2009 - Curlopt bugfix, documentation update
1.0 1/8/2009 - First Release
—————————————————————————
Overview:
CampaignMonitor Sidebox for Zen Cart v1.01 lets your customers add their e-mail address to a mailing list in your CampaignMonitor account.
CampaignMonitor is a set of very powerful and easy to use e-mail marketing software. Mailings cost $5.00 USD each, plus $0.01 USD per recipient. CampaignMonitor is very web developer-friendly: developers can create e-mail design templates for their clients, enabling their clients to send their own e-mail marketing campaigns. Developers can also set up a pricing mark-up schedule for their clients, letting developers choose the prices that their clients pay for e-mail marketing campaigns. (CampaignMonitor takes $5/campaign and $0.01/recipient; the developer pockets the rest.)
Please note: for the 1.01 version, customers can only sign up for mailings with this module: they cannot unsubscribe. Customers would need to click on the “Unsubscribe” link in the CampaignMonitor-sent mailings that they receive in order to unsubscribe.
To sign up for CampaignMonitor, go to http://www.campaignmonitor.com.
—————————————————————————
Pre-Installation Preparation:
This ZenCart contribution will be useless without a CampaignMonitor account and creation of CampaignMonitor API and List keys.
0. Read the CampaignMonitor Feature Tour at http://www.campaignmonitor.com/features/.
1. Sign up for CampaignMonitor at http://www.campaignmonitor.com
2. Generate your CampaignMonitor API Key. To do this, click on “Account” once you’ve logged in to your CampaignMonitor account, and click on “Generate Your API Key”. A 33 digit alphanumeric string will be generated for you: this is your API key.
3. Place your API key in the language file. Open includes/languages/english/extra_definitions/campaignmonitor_sidebox_defines.php and edit line 5. In place of “abcde12345abcde12345abcde12345”, put your API key. (The line starts with “$api_key”.)
4. Find your API Subscriber List ID. To do this, click on “Manage Subscribers” for the CampaignMonitor client that you want to add Zen Cart integration for. Then, click on the list that you want to integrate with Zen Cart. Finally, click on “(edit list name/type)” near the top of the page. Your API Subscriber List ID will be on the bottom of the page, directly above the “Save Changes” button.
5. Place the API Subscriber List ID in the language file. It goes in line 6, the line directly below your API key. Replace “12345abcde12345abcde12345abcde” with your API Subscriber List ID.
6. Finally, take the time to test and customize CampaignMonitor before adding this contribution to your site.
—————————————————————————
Installation Instructions:
0. Back up everything! As with all Zen Cart contributions, try this in a test environment prior to installing it on a live shop.
1. Copy the contents of the folder you have unzipped to the root directory of your shop. NOTE that these files assume your template name is “custom,” so any file with “custom” in its name will need to be renamed if you are using a different template name.
2. Edit the file includes/languages/english/extra_definitions/campaignmonitor_sidebox_defines.php.
Set the BOX_CAMPAIGNMONITOR_NEWSLETTER_ID to your CampaignMonitor API key. (You got this in step 2 of the pre-installation instructions.)
Set the BOX_CAMPAIGNMONITOR_NEWSLETTER_U to the value of the List ID of the particular list that you want e-mail addresses added to. (See step 4 of the pre-installation instructions.)
3. (Optional, but recommended.) In the same file you were editing before, includes/languages/english/extra_definitions/campaignmonitor_sidebox_defines.php, edit the language defines for the newsletter sidebox. These are the lines that start with “define”. I think most of the defines are self-explanatory. The second-to-last define, BOX_CAMPAIGNMONITOR_SIZE, controls the width of the e-mail input field. It specifies how many characters will fit in the field. The default is 16, but you can change the number as you see fit.
4. In Admin->Tools->Layout Boxes Controller, turn on the CampaignMonitor sidebox.
5. (Optional.) To enable debugging, change the “1” on line 21 of tpl_campaignmonitor_sidebox/php to “0”. This will show the CampaignMonitor error codes.
—————————————————————————
Upgrade Instructions
Simply overwrite all the files from existing versions of Campaignmonitor Sidebox. If you overwrite your language file, remember to re-add your CampaignMonitor API Key and List ID.
—————————————————————————
Possible TODOs for later versions of CampaignMonitor Sidebox for Zen Cart:
1. Change to the “include” method of getting the CM API key and List ID, instead of the variable version. (More elegant/“Zen”).
2. Integrate CampaignMonitor curl responses.
—————————————————————————
No New Files in v1.01
=========
includes/languages/english/extra_definitions/campaignmonitor_sidebox_defines.php
includes/modules/sideboxes/custom/campaignmonitor_sidebox.php
includes/templates/custom/sideboxes/tpl_campaignmonitor_sidebox.php
