Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Setting up a special customer type for shipping purposes

Setting up a special customer type for shipping purposes

Locked

Views: 2,799

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
10 Apr 2007, 10:47 AM
#1
gretzlertech avatar

gretzlertech

New Zenner

Join Date:
Mar 2007
Posts:
36
Plugin Contributions:
0

Setting up a special customer type for shipping purposes

I would like to set up my store so that people from a certain zone must be approved before making purchases. The purpose here is so that friends and family get discount rates (which I know that I must apply manually after they create an account), and so that I can offer them a "store pickup" shipping rate. I don't want this to be available to everyone, just friends and family. What I did was to create a zone called something like US orders ONLY! so it doesn't look selectable but that is actually the "special" zone that allows for the store pickup option. I just want to take the extra precaution so that if someone does select it, they don't think they can come to my house and pick up their stuff. Not sure if I'm even on the right track or not. Any suggestions?

11 Apr 2007, 2:52 AM
#2
gretzlertech avatar

gretzlertech

New Zenner

Join Date:
Mar 2007
Posts:
36
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

any ideas out there?

13 Apr 2007, 10:29 AM
#3
gretzlertech avatar

gretzlertech

New Zenner

Join Date:
Mar 2007
Posts:
36
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

Hellooooooo? Anybody home out there?

24 Apr 2007, 7:35 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Setting up a special customer type for shipping purposes

Common causes for getting no response:

a. your request may not be clear
b. your request may seem to make no sense
c. your request may sound rude
d. your request may not have enough information to formulate a response.

When not getting an answer, you are best advised to rephrase your request, add more information, and talk about other ways you have tried to tackle the idea.
Often it is smartest to forget asking how to do it a certain way ... skip the proposed "solution", and just explain the business need -- not the "how", but the "what". This usually brings more effective feedback and ideas.

24 Apr 2007, 7:43 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Setting up a special customer type for shipping purposes

If I digest your statement further, it seems to boil down to:

a) want to offer discounts to certain customers
b) want to offer Store Pickup shipping to those same customers.

I don't think you really want to use "zones", because those are geographic in nature.

So, you need to do two things:
a. create a Discount Group in the admin, and manually add the correct customers to it. This will give them their discounts.

b. Customize the Store Pickup shipping module so that it checks to see if the current customer is in the prescribed discount group. If not, deactivate the module for this present shopping session.

example: if the group-pricing record is number 3 for this special group, then change the store_pickup.php module from this:```
$this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_STOREPICKUP_ZONE > 0) ) {

to something like this:
$this->enabled = ((MODULE_SHIPPING_STOREPICKUP_STATUS == 'True') ? true : false);

$group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($group_query->RecordCount() == 0 || $group_query->fields['customers_group_pricing'] != [B]3[/B] ) $this->enabled = false;

if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_STOREPICKUP_ZONE > 0) ) {
26 Apr 2007, 12:51 AM
#6
gretzlertech avatar

gretzlertech

New Zenner

Join Date:
Mar 2007
Posts:
36
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

Thank you, Dr. Byte, for you assistance once again. I also appreciate the tips for getting answers. That is very helpful and I will take that into account when asking questions from now on. Also, thanks for the code. I'll edit the file and report back with the results.

26 Apr 2007, 1:17 AM
#7
gretzlertech avatar

gretzlertech

New Zenner

Join Date:
Mar 2007
Posts:
36
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

Thank you sir that worked perfectly. Now, should I place this file in an override directory or leave it where it lies?

26 Apr 2007, 1:40 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Setting up a special customer type for shipping purposes

There are no overrides for shipping modules themselves. (only for the language files related to them)
Thus, leave the file in the same place.

26 May 2007, 6:05 AM
#9
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

This worked great, thanks! Modified it a bit to work with the dual pricing mod, it's fantastic!

27 May 2007, 5:52 AM
#10
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Setting up a special customer type for shipping purposes

Thought I should probably post how in case anyone wants to know, please see this thread to get this working with the dual pricing mod: http://www.zen-cart.com/forum/showpost.php?p=380422&postcount=7