Try this ...
Put the code back to the original file in ot_coupon.php
Now change the credit_selection function instead:
function credit_selection() {
global $discount_coupon;
global $db;
// note the placement of the redeem code can be moved within the array on the instructions or the title
// do not check if in the admin
if (!IS_ADMIN_FLAG) {
// get the customers_group_pricing
$chk_group = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
if ($chk_group->fields['customers_group_pricing'] == 3 || $chk_group->fields['customers_group_pricing'] == 7) {
// if in customers_group_pricing 3 or 7 do not show
} else {
$selection = array('id' => $this->code,
'module' => $this->title,
'redeem_instructions' => MODULE_ORDER_TOTAL_COUPON_REDEEM_INSTRUCTIONS . ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_REMOVE_INSTRUCTIONS : ''),
'fields' => array(array('title' => ($discount_coupon->fields['coupon_code'] != '' ? MODULE_ORDER_TOTAL_COUPON_TEXT_CURRENT_CODE . '<a href="javascript:couponpopupWindow(\'' . zen_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $_SESSION['cc_id']) . '\')">' . $discount_coupon->fields['coupon_code'] . '</a><br />' : '') . MODULE_ORDER_TOTAL_COUPON_TEXT_ENTER_CODE,
'field' => zen_draw_input_field('dc_redeem_code', '', 'id="disc-' . $this->code . '" onkeyup="submitFunction(0,0)"'),
'tag' => 'disc-'.$this->code
)));
}
}
return $selection;
}
See if that works better ...
NOTE: I am still using groups 3 and 7 ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!