(Apoligies, ahead of time for that formatting in the future. I additionally have no idea why an easy copy paste from the notepad leads to bolding of certain parts from the text to follow along with regardless of the complete insufficient formatting variables in the source). I have looked stackoverflow and should not appear to locate this exact question nor a solution that appears to relate, though this may be my very own lack of knowledge. Thanks, millions of, ahead of time, for just about any help pointing me within the right direction.

If anybody might help get this work, you'll potentially get this to the most joyful day's my year:

Goal: To dynamically append wordpress member's userid to outgoing affiliate links with regards to monitoring each member's purchase totals and subsequently providing them with the right credit for same. I understand you could do working good examples include fatwallet.com and ebates.com (which lately bought fatwallet.com), both of them are "cash returnInch sites that provide to talk about affiliate commission using their site people.

Background/Example: Fatwallet even goes to date regarding report, in your member screen, because you basically clicked on with an affiliate link in a few minutes of doing this. That type of functionality could be nice (and reassuring to people) however is not essential for the idea we are searching to implement (by we, I am talking about a little number of sales and repair pros with better ideas than ebates, only a professional novice understanding or understanding of programming code needed). Besides, doing that type of after sales confirming could be simpler because it requires simple http get calls towards the affiliate systems under consideration to be able to obtain data for everybody user id, BUT, we first have to learn how to dynamically append that user id towards the affiliate link instantly therefore the affiliate network can attach the relaxation from the click's data into it once that's done, rerouting the information from affiliate network to the consumer we have already got determined.

Potential problem/Considerable variable: To aggregate affiliate links and offer them, we use a 3rd party service known as popshops. Popshops may be used two ways: 1) Point and click on building of small "stores" provides "pop it in" code obtainable in java, html, php, xml, csv, rss, atom, vbscript, C#, and vb.internet OR 2) Dynamic loading of pre-defined or user defined (internet search engine) variables via popshops API and http get demands. Both require utilization of popshops class obv troubleshooting portion of popshops states that additional monitoring (sub IDs) might be appended either to of those techniques (I must determine both). However, I am unsure you can dynamically add the variable user ID from the presently drenched in user either to or these two techniques. Below is, first, a good example of the "pop it in" code and fundamental instructions from popshops re: dynamically adding subid's into it:

==

Illustration of php popshop code:

<?php
            # Determine the current base URL
            if(!isset($_SERVER['REQUEST_URI'])) {
               $psps_base_url = $_SERVER['PHP_SELF'];
               if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $psps_base_url .= $HTTP_SERVER_VARS['QUERY_STRING']; }
            } else {
               $psps_base_url = $_SERVER['REQUEST_URI'];
            }

            $psps_parameters = '';

            foreach ($_REQUEST as $key => $value) {
              if (strpos($key,"psps_") > -1 ) {
                $psps_parameters .= '&'.$key.'='.urlencode($value);
                $psps_base_url = str_replace('&'.$key.'='.urlencode($value), "", $psps_base_url);
                $psps_base_url = str_replace($key.'='.urlencode($value), "", $psps_base_url);
              }
            }  

            $psps_parameters .= "&psps_show_search=true";
            $psps_parameters .= "&psps_show_navigation=true";
            $psps_parameters .= "&psps_show_products=true";

            $psps_url = "?psps_base_url=".urlencode($psps_base_url);

            $psps_url="http://shops.popshops.com/shops/php/bwh1u4wom9b4gsaxrcvctxvyl$psps_url$psps_parameters";

            # Include the shop
            if (function_exists('curl_init')) {
            $shop=curl_init();
            curl_setopt($shop,CURLOPT_URL,$psps_url);
            curl_exec($shop);
            curl_close($shop);
              } else {
                readfile($psps_url);
              }
            ?>

Within popshops documentation, we discover the few suggestions here regarding appending subid's/userid's towards the above:

"Dynamic sub-IDs: If you're a Data Pack (or over) customer, you can include dynamic sub-IDs to some ShopBuilder shop. To include an engaged ID for your shop, perform the following:

Add one more parameter towards the code snippet that you simply replicated in the "Pop it In" tab.

$psps_parameters .= "&psps_subid=MYCUSTOMSUBID"

Quite simply you simply give a psps_subid parameter set to anything you want the ultimate sub-ID value to become.Inch

For that above, things i aren't seeing is how you can, if at all possible, format the final parameter, particularly, "&psps_subid=MYCUSTOMSUBID," to ensure that "MYCUSTOMSUBID" is dynamically changed using the current user's id # from wordpress rather than some predefined static variable of my selecting.

After a lot more than 60 hrs of research wasted about this, I've this funny fearful feeling like the reply is simpler than I suspect, but I am prepared to seem like an ignorant tool basically can finally learn how to reach our goal here. Onto the API http get version:

Here' will paste popshops generic advice concerning how to do that inside their API calls, then an example script utilizing popshops API. This quite a bit of text that also eventually boils lower to "How do i dynamically add the present drenched in user's wordpress userID towards the "subid=" variable from the code?

Generic popshops advice: "You should use affiliate-defined sub-ID monitoring that will help you manage profits. Each network gives this "sub ID" monitoring another title, but the bottom line is it appends the written text (or code) that you would like towards the URL.

After that you can run reviews in the network level for your sub-ID. You are able to dynamically append any information, including Sub IDs for commission monitoring (reported via your network account) using parameter "&url_subid=". This can have your custom subid/sid to become dynamically appended in almost any final affiliate product web addresses.

Also, you are able to on any PopShops redirect url (r.popshops.com) append sub ID information by placing "/" then sub IDs in the finish from the PopShops url.

Sample popshops API script:

http://pastebin.com/jDSMneyu

I'll be wishing and praying that somebody can certainly cause me to feel look foolish by having an easy answer today :)

Thanks!

Sean