Good ... this means that you can check what group a customer belongs to with:
Code:
$group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
and the results can be used in an IF statement, something like:
Code:
if ($group_query->fields['customers_group_pricing'] != '0') {
// do something here
} else {
// do something else here
}
So if you were trying to make the Flat Rate module work only for Customers in the Group where the value is 0 for the customers_group_pricing ... you can verify this by browsing the customers table to see who is assigned what value for this field ...
You can customize the Flat Rate flat shipping module to only show for customers with the value of 0 by changing the code from:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
to read:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_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->fields['customers_group_pricing'] != '0') {
// do not show to anyone not in customers_group_pricing 0
$this->enabled = false;
}
See if this helps you out on organizing things ...