type:
integration
system:
WP Affiliate
name:
WP Affiliate Tracking
description:
Add basic affiliate tracking between FoxyCart and WP Affiliate
tag:
affiliate, tracking, tutorial
date:
2012-06-29
developer:
http://www.tipsandtricks-hq.com

WP Affiliate

Please note: The code on this page is submitted by members of the FoxyCart community, and may not verified by FoxyCart.com LLC in any way, shape, or form. Please double check the code before installing. If you need help with it please post in our forum, but if we cannot offer assistance (due to unfamiliarity with this particular system or language) we apologize in advance.

Description

It's easy to integrate WP Affiliate with FoxyCart, below is some notes to get you going quickly and easily!

Installation

  1. Go to the settings menu of the affiliate plugin and check the “Enable Remote Post” checkbox. Take note of the “Secret Word” from this section.
  2. Save the changes by hitting the update settings button.
  3. Add the following HTML tracking code to your FoxyCart receipt template that you will be creating in step 4.
    <!-- 1.1 and older -->
    ^^receipt_only_begin^^<img border="0" src="http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/post_by_ip.php?secret=XXXX&sale_amt=^^order_total^^&txn_id=^^order_id^^" width="1" height="1">^^receipt_only_end^^
     
    <!-- 2.0 and newer -->
    {% if first_receipt_display %}<img border="0" src="http://www.your-domain.com/wp-content/plugins/wp-affiliate-platform/api/post_by_ip.php?secret=XXXX&sale_amt={{ total_order }}&txn_id={{ transaction_id }}" width="1" height="1">{% endif %}
    • Replace “your-domain” with your actual site URL where you have the affiliate plugin installed
    • Replace “XXXX” with the actual secret code from the settings menu of this plugin (refer to step 1)
  4. If you're on version 1.1 or older, create a separate receipt template in your FoxyCart admin. Include your modified code from step 3 at the bottom of your template. If you're on version 2.0 or newer, navigate to the configuration section of your store's FoxyCart administration, and add the code to the “footer” textarea for the configuration option “Add custom header and footer code to your templates”.
  5. If you're on version 2.0, by default the receipt will be served securely over https://. The img source in the code above is insecure over http:// - and any insecure assets will be blocked by browsers for a secure page. To fix that, if you have an SSL certificate on your domain, change the URL for the source to begin with https:// instead. If not, on the configuration page of your store's FoxyCart administration, check the option within the “Receipt” section to serve the receipt over http instead of https.

Site Tools