Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Free Delivery but No Discount % to Groups

Free Delivery but No Discount % to Groups

Started by baloo on 7 Nov 2013, 2:39 AM · Views: 1,099

Results 1 to 5 of 5
7 Nov 2013, 2:39 AM
#1
baloo avatar

baloo

New Zenner

Join Date:
Jul 2007
Location:
Hull, UK
Posts:
28
Plugin Contributions:
0

Free Delivery but No Discount % to Groups

Hi all,
I've seen a couple of similar posts, but nothing solved, or quite right. I've spent all night on it, but my lack of expertise is preventing me from achieving it.

I have set up a group called free delivery (ID 5). The discount rate is 0%.

I have Free Shipping Options set up, to give free delivery when spend is >= £250.

Regardless of spend, I want to give customers in the applicable group free delivery.

I really don't want to use coupons.

I'm confident it's a fairly simple tweak to ../includes/modules/shipping/freeoptions.php but would really appreciate some help.

Thanks in advance

Martin

Experience is something you don't get until just after you need it!

7 Nov 2013, 5:19 AM
#2
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Location:
Wisconsin, USA
Posts:
674
Plugin Contributions:
12

Re: Free Delivery but No Discount % to Groups

What I would do is create another shipping method that would cover this group, then have that method only appear when the customer was a member of that group. Would require some custom programming but not too much

7 Nov 2013, 4:17 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Free Delivery but No Discount % to Groups

Let's say your special Group is customers_group_pricing is 2 ...

You can customize the shipping module:
/includes/modules/shipping/freeshippingoptions.php

with the code in RED:

[B]// bof: give free shipping if Customer is in customers_group_pricing 2
global $db;
$chk_group_sql = "SELECT customers_group_pricing from " . TABLE_CUSTOMERS . " WHERE customers_id = " . (int)$_SESSION['customer_id'];
$chk_group = $db->Execute($chk_group_sql);
// final check for display of Free Options
[/B]      if ([B]$chk_group->fields['customers_group_pricing'] == 2 || ([/B]$this->ck_freeoptions_total or $this->ck_freeoptions_weight or $this->ck_freeoptions_items[B])[/B]) {
        $this->enabled = true;
      } else {
        $this->enabled = false;
      }
[B]// eof: give free shipping if Customer is in customers_group_pricing 2
[/B]
      if ($this->enabled) {

Now anyone with Orders of >= $250.00 get Free Shipping and anyone in Group 2 always gets a Free Shipping Option ...

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!

9 Nov 2013, 10:34 AM
#4
baloo avatar

baloo

New Zenner

Join Date:
Jul 2007
Location:
Hull, UK
Posts:
28
Plugin Contributions:
0

Re: Free Delivery but No Discount % to Groups

I'm very grateful.

Thank you :cool:

Experience is something you don't get until just after you need it!

10 Nov 2013, 12:01 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Free Delivery but No Discount % to Groups

Thanks for the update that this was able to work for you ...

Remember the Zen Cart Team when you are rich and famous!

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!