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
Last revisionBoth sides next revision
integration:campaign_monitor [2014/10/31 07:04] – external edit 127.0.0.1integration:campaign_monitor [2015/01/13 14:10] – [FoxyCart 2.0+] adam
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