I would need to enter my own - primarily at "..../index.php?main_page=create_account". I would like to include the sponsor in the link.
I would need to enter my own - primarily at "..../index.php?main_page=create_account". I would like to include the sponsor in the link.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Sorry! I would like to make a link to my shop that contains the sponsor information, i.e. when the customer clicks on the link it goes straight to the create_account-page and the sponsor-field has the value from the link.
There isn't anything built into Zen Cart to do this, but if you have PHP programming skills it's not too difficult.
I'd recommend overriding the init_customer_auth.php file (there's an overrides folder in the includes/init_includes/ folder for this) to add some code at the end to test if a user is not logged in and has a sponsor parameter in the URL. If so, you would take whatever note you need to there of this (e.g. updating a sponsor count in the database) and then do a zen_redirect to the create_account screen.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Ok, thanks.
I was originally thinking more in terms of cPath/products_id-parameters being handed along and catching the sponsor on the create_account-page!?
I wouldn't try to keep handing it along while a visitor browses the site, it's likely to get lost that way.
Better would be to capture it where I said and write it to a cookie. Then add some code to the includes/modules/create_account_success/header_php.php file to look for the cookie if an account has been created, and if so read in and use the sponsor information there.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Thank's kuroi, I see your point!
Or if the cookie route isn't needed, instead of setting a cookie, just set the same session variable that the ot_coupon module sets, and in your admin set your customer-referrals setting to use the first-redeemed-coupon as the referral code set during create-account.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
This "piggy-back" I like even better.
Bookmarks