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
Code:
$unapplicable_methods = array();
under it add
Code:
/// 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.
Bookmarks