I did this a couple of years ago for a client by editing /includes/modules/order_total/ot_coupon.php's check function:
/**
* Enter description here...
*
* @return unknown
*/
function check() {
global $db;
//-bof-20131129-lat9-Don't enable if the customer is a dealer.
if (isset($_SESSION['customer_whole']) && $_SESSION['customer_whole'] != '0') {
$this->check = false;
} elseif (!isset($this->check)) {
//-eof-20131129-lat9
$check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_COUPON_STATUS'");
$this->check = $check_query->RecordCount();
}
return $this->check;
}
... and adding the following script (named header_php_nocouponfordealer.php) to /includes/modules/pages/checkout_payment:
<?php
if (isset($_SESSION['customer_whole']) && $_SESSION['customer_whole'] != '0') {
foreach ($order_total_modules->modules as $otm => $current_module) {
if ($current_module == 'ot_coupon.php') {
unset($order_total_modules->modules[$otm]);
break;
}
}
}