Skip to content

Instantly share code, notes, and snippets.

@colinhoward
Created November 22, 2014 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colinhoward/7e517037b2a361b0475b to your computer and use it in GitHub Desktop.
Save colinhoward/7e517037b2a361b0475b to your computer and use it in GitHub Desktop.
Calculating Payouts
/Let’s assume this is for an online clothing store and the customer bought shoes, pants, and a shirt. Each category has 5%, 10%, and 15% commission respectively.
$shoes = .05;
$pants = .10;
$shirts = .15;
$aff_payout = ($shoes_price * $shoes) + ($pants_price + $pants) + ($shirts_price * shirts);
//Now that we have calculated and stored the payout that is going to be given to affiliates, we can place that into the &amount= parameter in the pixel and fire it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment