Forums / Addon Shipping Modules / Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

Views: 1,142

Results 1 to 7 of 7
26 Jul 2016, 2:08 PM
#1
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

Came across an occasion where client wanted a particular shipping method that was set up in Conor's advanced shipping mod, removed from selection when the customer had a group pricing discount applied to them.
This is a hardcoded colution, rtaher than admin interface so will need to manually change method numbers according to which ones you need disabled.
I also make a point of adding the fact that this method is disabled to group pricing in the admin title of the shipping method, so i don't forget!

So in this case, we had method 3 set as free shipping.
for all the usual customers this worked fine.
we wanted to disable this method for those customers who had been allocated a group pricing discount.

edit: /includes/modules/shipping/advshipper.php

find approx line 514

$unapplicable_methods = array();

under it add

            /// CALLJJ 1 of 2 - changed to not allow group pricing to get free shipping...
        $group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
        if ($group_query->fields['customers_group_pricing'] != '0') {
        $unapplicable_methods[] = 3; //  ***** change this to the method number you wish to disable  ****
        $this->_debug("\nMethod $method_num excluded as group pricing used.", false);
        }
        ////  eof CALLJJ mod //////

I bet Conor could have added a proper admin interface for this in minutes...the dude was a genuis.

26 Jul 2016, 11:55 PM
#2
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

i have certain methods not show by stock quantity. if in stock will show this method 1 or if not in stock show this method 2 or if both instock and nonstock show method 3. and can be changed in admin

27 Jul 2016, 7:20 AM
#3
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

Are you going to share the edits with us then?

28 Jul 2016, 10:33 PM
#4
jimmie avatar

jimmie

Totally Zenned

Join Date:
Jan 2013
Location:
New Port Richey, Florida
Posts:
971
Plugin Contributions:
0

Re: Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

already in downloads

29 Jul 2016, 7:42 AM
#5
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

Post a link, I couldn't find under shipping modules

1 Aug 2016, 11:51 AM
#6
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Allow selected Ceon Advanced Shipper methods to be disabled if group pricing used.

jimmie:

already in downloads

How? It's a commercial module isn't it?