Bazze Posted July 16, 2010 Share Posted July 16, 2010 Hello!I need some help with creating a referral system based on customers ID. What I want is that every customer has a personal referral link (ex: http://www.myshop.com/?r=CUSTOMER_ID) which they can send to there friends. People shopping thru that link will receive a discount, as will also the referrer. The referral program module isn't exactly doin' it that way, but that is how I want it!Any tips on how to do this? Link to comment Share on other sites More sharing options...
Bazze Posted July 17, 2010 Author Share Posted July 17, 2010 Okay, I've found the built-in "affiliate" system under Admin > Stats > Referrers. I'm now trying to do so every customer that registers will be registered as an affiliate too. But I get a strange error messge the way I'm trying to do it. /* INSERT CUSTOMER AS AN AFFILIATE */ $affiliate = new Referrer(); $affiliate->id_customer = $customer->id; $rand = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $code_len = 8; $rand_need = $code_len - strlen((String)$customer->id); $code = (String)$customer->id . 'R'; while (strlen($code) < $code_len) { $r = rand(1, strlen($rand)-1); $code .= substr($rand, $r, 1); } $affiliate->name = $customer->email; $affiliate->http_referer_like = 'ref=' . $code; $affiliate->percent_fee = 5.00; $affiliate->add(true); I get this error message when creating an account: Hack attempt (Employee -> lastname is empty) I understand nothing... What does the Employee class has to do with the Referrers? Any ideas how to solve this?Thanks! Link to comment Share on other sites More sharing options...
Bazze Posted July 25, 2010 Author Share Posted July 25, 2010 No one has any idea? Link to comment Share on other sites More sharing options...
prestachopper Posted July 28, 2010 Share Posted July 28, 2010 Could you do this? Im so interested.I need a store with discounts coupons, specials and affiliate system that works :S I've tried some stores like x-cart ioncube zencart and more, now i will give a chance to prestashop and oscommerce, maybe I can find a solution here. Link to comment Share on other sites More sharing options...
duskclo Posted December 9, 2010 Share Posted December 9, 2010 my referrers module is not counting can someone help ? please PM me Link to comment Share on other sites More sharing options...
trevorgilligan Posted August 10, 2018 Share Posted August 10, 2018 any update on this, was thinking just now that i would like this, if not i will probably pay a coder to do it, but its a great idea: yourwebsite.com/customerID then customerID gets $ or %... Trev Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now