First of all, thank you for using those affiliate links! I employ a few on my blog and what I redeem from them is not much, but every little bit helps - so I know whoever you are supporting is super appreciative.
Affiliates receive a small percentage of your total purchase, not just the item that you click. For the links I'm using (through Amazon, Blick, Ellen Hutson, and Whimsy Stamps) the rewards are between 3 and 10%. The Amazon rewards are tiered, based on the number of purchases per month - the more purchases, the higher the reward.
Most companies are using a third party website to track and reward sales/commissions and there are a huge variety to choose from (Commission Junction, Shareasale and Refersion are a few I'm familiar with). Usually there is a time period that the site saves a 'ticket' with your IP address so that whatever you purchase after clicking through from the affiliate link will be credited to that particular affiliate. I'm not positive about saved carts, but I would think that they would be fine and included in the purchase if you've clicked through from the affiliate link before checking out.
Hope that helps a little!