Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
integration:campaign_monitor [2011/11/17 18:36] – external edit 127.0.0.1integration:campaign_monitor [2017/04/26 07:02] (current) – external edit 127.0.0.1
Line 4: Line 4:
 name          : Add customers to mailing list # the name of the integration name          : Add customers to mailing list # the name of the integration
 description   : Allow your customers to 'opt in' to your Campaign Monitor or MailBuild lists during checkout. description   : Allow your customers to 'opt in' to your Campaign Monitor or MailBuild lists during checkout.
-tags_tags     : mailing list, emarketing # tags, separated by commas+tags          : mailing list, emarketing # tags, separated by commas
 date_dt       : 2009-12-22 # the date in YYYY-MM-DD format date_dt       : 2009-12-22 # the date in YYYY-MM-DD format
 version       : 2 # if you have a version for your code, enter it here version       : 2 # if you have a version for your code, enter it here
Line 27: Line 27:
 This integration automatically adds your FoxyCart customers to a Campaign Monitor list of your choice. Let's get started: This integration automatically adds your FoxyCart customers to a Campaign Monitor list of your choice. Let's get started:
  
-  - [[http://github.com/FoxyCart/fon/zipball/master|Download the latest .zip]] of the foxy2cm repository on [[http://github.com|GitHub]].  Alternatively, you may use git, if that's how you roll.  The goods are in ''fc-campaignmonitor.php'' Included for good measure are the PHP Campaign Monitor API interface, a PHP4-compatible XML parser, a RC4 decryption library, and a test harness.+  - [[https://github.com/FoxyCart/foxy2cm/zipball/master|Download the latest .zip]] of the foxy2cm repository on [[http://github.com|GitHub]].  Alternatively, you may use git, if that's how you roll.  The goods are in ''fc-campaignmonitor.php'' Included for good measure are the PHP Campaign Monitor API interface, a PHP4-compatible XML parser, a RC4 decryption library, and a test harness.
   - Upload the contents of foxy2cm.zip to your server; you should have 6(!) PHP files.   - Upload the contents of foxy2cm.zip to your server; you should have 6(!) PHP files.
   - Open ''fc-campaignmonitor.php'' in your favorite text editor.   - Open ''fc-campaignmonitor.php'' in your favorite text editor.
Line 105: Line 105:
   - Once you're able to see 'foxy' when you go to 'test.xmldatafeed.php', then you   - Once you're able to see 'foxy' when you go to 'test.xmldatafeed.php', then you
 ===== The "Subscribe" Checkbox ===== ===== The "Subscribe" Checkbox =====
 +
 +==== FoxyCart 2.0+ ====
 +
 +If your store is on FoxyCart 2.0 or newer, a new template configuration option will automatically insert a newsletter subscribe checkbox as part of the checkout form. To enable that, simply navigate to your store's FoxyCart administration, and on the "configuration" page, enable the "Allow users to sign up for your newsletter" option.
 +
 +Within the ''fc-campaignmonitor.php'' file - you'll need to update the ''$Custom_Field'' variable to be set to ''newsletter_subscribe'', and the ''$Custom_Field_Value'' to ''1'' like this:
 +
 +<code php>
 +$Custom_Field = 'newsletter_subscribe';    // Name of the custom "Opt In" field during checkout.
 +$Custom_Field_Value = '1';    // The value of the custom field that indicates the customer's agreement.
 +</code>
 +
 +==== FoxyCart 1.1 and older ====
 Now you have a datafeed receiver all set up on your server, so it's time to let your customers opt in to your mailing list.  To do that, we need to add a [[:v:0.6.0:docs:checkout:customfields|Custom Field]] to your checkout template, so that your customer sees a "Subscribe" checkbox alongside their cart contents.  There are a lot of cool things possible custom fields; find out more at [[:v:0.6.0:docs:checkout:customfields|the wiki page on Custom Fields]].  Today we're only going to add a single checkbox to the checkout template.  Open the template up in your editor (if it's hosted on your server) or edit it directly from the FoxyCart admin interface, and add the following block of code anywhere in the template: Now you have a datafeed receiver all set up on your server, so it's time to let your customers opt in to your mailing list.  To do that, we need to add a [[:v:0.6.0:docs:checkout:customfields|Custom Field]] to your checkout template, so that your customer sees a "Subscribe" checkbox alongside their cart contents.  There are a lot of cool things possible custom fields; find out more at [[:v:0.6.0:docs:checkout:customfields|the wiki page on Custom Fields]].  Today we're only going to add a single checkbox to the checkout template.  Open the template up in your editor (if it's hosted on your server) or edit it directly from the FoxyCart admin interface, and add the following block of code anywhere in the template:
  

Site Tools