This topic contains 7 replies, has 2 voices. Last updated by Raam Dev 4 years, 1 month ago.
Topic Author | Topic |
---|---|
Posted: Sunday Nov 4th, 2012 at 3:34 am #30577 | |
Hi, I have made my own little cookie tracking affiliate code plug-in for WordPress. It is to track who refers free sign-ups to my website. I have seen the video tutorial on creating a s2-hacks.php file for country codes and I have completed that ok. Now what I need to do is instead of having a pre-populated drop down menu for countries, I need to be able to enter a single custom field for the referrer ID, derived from the variable I have already stored as a cookie. I am struggling both on calling the cookie as a variable in to the hacks file and also working out what the parameter for my new custom field should be. In the countries example it is called “options”. But I do not want options. Now I want one field entry for the affiliate ID basically. So that when A new person registers with the affiliate code, I have already managed to generate, then it pre-fills in the registration field with a meta entry for the affiliates ID. I tried to change the hack file for the country codes by making single line one with $aid, the variable I tried to define from the cookie, but I don’t think the cookie is being called properly in the code and also I have a drop down menu now with a blank entry. Obviously I need to have a single custom field for affiliate Id but what would the field be called? Its obviously not “options”? And also how to properly define the variable from the cookie in the hack file please? Hope that makes sense. Been trying to do this for 24 hours without sleep now. Thanks in advance for any help. ~Gary. |