Hi
Thanks for all the hard work that has been put out on this.
I have 2 problems
I got the latest code installed!.
When i create a Discount and Set Max use 1 and Avaliable to 3 , Same customer can use the code 3 times insted for 1 time
this is the code in discount_coupon.php
function check_coupons_max_use() {
global $customer_id;
$check_use_query = tep_db_query($sql = "SELECT COUNT(*) AS cnt
FROM ".TABLE_ORDERS." AS o
INNER JOIN ".TABLE_DISCOUNT_COUPONS_TO_ORDERS." dc2o
ON dc2o.orders_id=o.orders_id
AND o.customers_id = '".(int)$customer_id."'
AND dc2o.coupons_id='".tep_db_input( $this->code )."'");
$use = tep_db_fetch_array( $check_use_query );
//show error message if coupons_max_use is equal to the number of times this customer has used the code
if( $this->coupon['coupons_max_use'] <= $use['cnt'] ) $this->error_message[] = sprintf( ENTRY_DISCOUNT_COUPON_USE_ERROR, $use['cnt'], $this->coupon['coupons_max_use'] ); //display the error message for number of times used
}
and also when amount on the cart is less than Max order and customer tries to checkout i get this
Not Found
The requested URL /checkout_payment.php/error_message/The+minimum+order+total+for+this+coupon+is+<span+class=currency_symbol>$</span>100.00<span+class=currency_symbol></span> was not found on this server.
this is the code used, My header file is ok, it shows other error messasges just fine
thanks for any help that can be provided
function check_coupons_min_order() {
global $order, $currencies;
//if we display the subtotal without the discount applied, then just compare the subtotal to the minimum order
if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'false' && $this->coupon['coupons_min_order'] > $order->info['subtotal'] ) {
$this->error_message[] = sprintf( ENTRY_DISCOUNT_COUPON_MIN_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) );
//if we display the subtotal with the discount applied, then we need to compare the subtotal with the discount added back in to the minimum order
} else if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_DISPLAY_SUBTOTAL == 'true' ) {
$subtotal = $order->info['subtotal'];
foreach( $order->info['applied_discount'] as $discount ) {
$subtotal += $discount;
}
if( $this->coupon['coupons_min_order'] > $subtotal ) $this->error_message[] = sprintf( ENTRY_DISCOUNT_COUPON_MIN_ERROR, $currencies->format( $this->coupon['coupons_min_order'], true, $order->info['currency'], $order->info['currency_value'] ) );
}
}