Forums / Built-in Shipping and Payment Modules / Disable Free Shipping for wholesale "group"

Disable Free Shipping for wholesale "group"

Locked

Views: 1,755

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Jul 2010, 6:56 PM
#1
roberttimmons avatar

roberttimmons

New Zenner

Join Date:
Apr 2010
Posts:
40
Plugin Contributions:
0

Disable Free Shipping for wholesale "group"

Hello

I have done a ton of searching and reading and I really cant find a strait forward answer to my question. I found a bunch of close answers but nothing that exactly matched my scenario.

Basically I have two pricing groups. The first group is a retail group which pays the advertised price. I have freeshipping enabled for this group for orders larger than 100 dollars. Which works beautifully.

The second group is a wholesale group which resell our product. I give him a discount on the product but I do not want them to have free shipping as well. I have accomplished the discount a few different ways in testing. I have a coupon that gives the customer the percentage off but recently I created a group pricing discount group so customers do not have to use the coupon every time. The group I created was assigned group id 1.

I read this and looked for an option to exclude the group in the freehsipping options. Unfortunately the only exclusion I found was for the zones..

Ajeh:

You could also customize the Free Shipping Options freeoptions shipping module to test the group that the customer belongs to and disable it for Group B ...

I'm not really sure what he means by test the group. I am guessing he means alter the php file for free shipping but honestly I wouldn't know where to start.

Thanks in advance for any hints or pointers. I am running zen cart 1.3.8a

17 Jul 2010, 9:50 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Disable Free Shipping for wholesale "group"

What are you using to manage the Free Shipping for your regular customers?

What shipping module(s) do you want to use for your wholesale group?

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!

17 Jul 2010, 9:59 PM
#3
roberttimmons avatar

roberttimmons

New Zenner

Join Date:
Apr 2010
Posts:
40
Plugin Contributions:
0

Re: Disable Free Shipping for wholesale "group"

for my regular customers I am using the free shipping ie freeoptions.php for orders over 100<
also UPS and USPS for orders under 100

For my wholesale well for now they all are the same. I just want the freeoptions to go away. I have it set for group pricing under id 1.

I pretty much know what I need to do I think. I need to querry the customer table to get it to return the group Id. then tell it true or false based on that.. I have been going through some old code you posted in the past and If I was home I would dust off that old sql book but for the life of me I just cant remember all the correct syntax.

Thanks for your time once we figure this out Coffee will be on me. :)

18 Jul 2010, 12:08 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Disable Free Shipping for wholesale "group"

Change the code in the:
/includes/modules/shipping/freeoptions.php

from reading:

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

to read:

[B]// do not show to customers_group_pricing 32
      $chk_group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
      if ($chk_group_query->fields['customers_group_pricing'] == 32) {
        $this->enabled = false;
      }
[/B]
      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {

where 32 is the group id for the whole members ...

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!

19 Jul 2010, 3:22 PM
#5
roberttimmons avatar

roberttimmons

New Zenner

Join Date:
Apr 2010
Posts:
40
Plugin Contributions:
0

Re: Disable Free Shipping for wholesale "group"

thank you thank you thank you.. Thats perfect. Hopefully somebody else down the road will be able to benifit from this as well. Much appreciated will send some Cofee your way soon. :)

19 Jul 2010, 4:13 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Disable Free Shipping for wholesale "group"

You are most welcome ... glad that this worked for you ... Coffee is always very appreciated! :smile:

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!