Since you say you're running an ecommerce site, you should check to see if the shopping cart program you use offers this functionality. I know the one my company uses (ShopSite) does include the ability to run an affiliate program as one of its features.
You may also want to check this article
. It has links to many affiliate tracking programs and networks, one of which might fill the bill for you.
If your site has been created on Wordpress, there are plugins (such as this one
and others) that can add affiliate tracking features. (Here are some for Joomla
, as well.) I'm sure similar plugins exist for other platforms.
You can also search on "affiliate tracking system" or "run your own affiliate program" to get some additional ideas.
Hope this helps!