you could try something like:
PHP Code:
// from
$this->enabled = ((MODULE NAME HERE == 'True') ? true : false);
global $cart;
if (!IS_ADMIN_FLAG && $_SESSION['cart']->show_total() >= 5000) {
$this->enabled = false;
}
//to:
$this->enabled = ((MODULE NAME HERE == 'True') ? true : false);
global $cart, $db;
$customers_orders = $db->Execute("SELECT orders_id
FROM " . TABLE_ORDERS . "
WHERE customers_id = " . (int)$_SESSION['customer_id']);
if (!IS_ADMIN_FLAG && $customers_orders->EOF) {
$this->enabled = false;
}
Bookmarks