zferral is referral software that you can use with Shopp. If you want to increase sales in your online store, then you should definitely consider adding an affiliate program. We’ve written tutorials on setting up Shopp with ShareaSale and AffiliateRoyale. Your affiliates will boost your sales by driving traffic to your Shopp online store.
We’ll show you how to configure Shopp to work with zferral in under ten minutes.
zferral supports four methods of integration: IMG pixel, IMG pixel HTTPS, Javascript, and PHP pingback. In this tutorial we’ll discuss the IMG pixel HTTPS method.
The documentation for zferral states that a code snippet should placed on the “success” page. In Shopp, this is the confirmation or thanks page. There are a few variable values — only the first is required:
- $rev – the total value of the transaction
- $customerid – the customer id
- $uniqueid – unique order transaction id
- $info – other information about the order
- $coupon – affiliate coupon
Then there is one fixed value which is name of the login page (accountname). You can find yours by logging into your zferral account.
Here is an example ($info and $coupon are not used):
<img src="https://accountname.zferral.com/e/2?rev=24.00&customerId=hello@enzo12.com&uniqueId=2cll21ozne" style="border: none; display: none" alt=""/>
- $rev = 24.00
- $customerid = hello@enzo12.com
- $uniqueid = 2cll21ozne
Now its time to swap in the example above with the Shopp API calls for order total, customer’s email, and order transaction id:
<img src="https://accountname.zferral.com/e/2?rev=<?php echo floatvalue(shopp('purchase.get-total')); ?>&customerID=<?php shopp('purchase','email'); ?>&uniqueID=<?php shopp('purchase','transactionid'); ?>" style="border: none; display: none" alt=""/>
The above code is now almost ready to use. You simply need to replace ‘accountname’ with your real zferral account name.
Here are the steps for inserting the code snippet in your Shopp thank you page.
- Login to your site with your favorite FTP client. We recommend Transmit (for Mac).
- Browse to the Shopp content templates folder (/wp-content/themes/yourthemefolder/shopp)
- Locate the thanks.php and create a backup of the file
- Open the file with a text editor
- Insert your code snippet towards the top of the file just after [php if (shopp('checkout','completed')] and save changes
Now run a test transaction and you should see the order data in your zferral account within a few minutes.
Notes: you can retrieve the order subtotal by using purchase.get-subtotal instead of purchase.get-total.
Is your site slow? Find out right now with a free WordPress speedtest. You'll also receive professional recommendations for making your Shopp FAST.
Stop losing sales because of a slow site!


