Forums / Setting Up Specials and SaleMaker / Auto-Adding to Group

Auto-Adding to Group

Locked

Started by doodlebee on 5 Dec 2008, 3:56 PM · Views: 1,676

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
5 Dec 2008, 3:56 PM
#1
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Auto-Adding to Group

I have a client who asked a question, and I don't even know if this is possible (mainly because I have no idea what to search for on this - I'd be willing to bet there's already a mod or something that will do this), but I told them I would ask.

So it's a site that sells homeopathic medication. The company as affiliations with certain doctors, and if a doctor sends their patient to this site, they get a group discount. Some doctors have different discount levels associated with them...for example, Dr. Smith might get a 10% discount for his patients, while Dr. Jones will get 25%.

Now, my client has already set up the group discounts, and they are based on the doctor's name. it's working fine BUT when someone creates an account, the client has to manually log into the back end and set the new customer to the group they need to belong to, and then email the new customer with their new group login info so they can access their discounts.

They were wondering if it were possible to have a field on the "Create Account" page that would allow the end user to put in their doctor's name, and then they would immediately be placed in the discount group they assign, and be sent their password info for that discount section - in other words, take out the manual labor part of this.

Now, I realize if the end user misspells the doctor's name, or maybe it would require a specific method of entering the physician (and if they don't do it properly, they won't be given access to that group), but that's something they are willing to chance. So is there already a mod for doing this? Or some way of accomplishing it? (Some kind of code that'll add a custom field to the login process and maybe the "edit profile" page so if the input is empty, it continues on as normal, but if there's something put in, it'll check it against the database and plug them right into the group?)

Thanks for any pointers (or whacks against the head!)

5 Dec 2008, 4:15 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Auto-Adding to Group

There's no mod I'm aware of, but it certainly could be coded. You might try posting in Commercial Help Wanted, depending on how badly the client wants it to work that way.

Wouldn't a dropdown with all the doctor's names solve the typing error problem?

5 Dec 2008, 7:21 PM
#3
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Auto-Adding to Group

BTW, it is better to assign unique reference code to each doctor/... since names are not unique.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

7 Dec 2008, 3:52 AM
#4
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: Auto-Adding to Group

Okay - thanks. You're right about the dropdown - that would probably work.

I have no problem coding it myself - I've done more than my share of hacking ZenCart ;) I just didn't know if a mod already existed, or if it was even possible to do.

Thanks :)

8 Dec 2008, 11:24 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Auto-Adding to Group

You can look up the code or use whatever you are using on this such as the referral code and insert it in the module for the create_account.php when the record is added to automatically add the customer to the group when the account is made ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!