cyberma007

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cyberma007

Profile Information

  • Real Name
    Patrick Nejad
  1. Hi No I not using Paypal IPN, Yes i do see data in discount_coupons_to_orders it shows like this discount_coupons_to_orders_id coupons_id orders_id 18 123abc 0 17 123abc 0 16 123abc 0 And this was the coupon created for it coupons_id coupons_description coupons_discount_percent coupons_date_start coupons_date_end coupons_max_use coupons_min_order coupons_max_order coupons_number_available 123abc Returned Customer Discount 0.0500 2006-12-30 00:00:00 2007-01-05 00:00:00 2 100.0000 100.0000 3 I created a coupon Max use 2 and avaliable 3, customer was able to put in 3 orders throght with that coupon insted for 2 the tables data looks messed up when i pasted here, i hope it makes sens. Thanks
  2. Thanks KGT This Worked great. You are the Best
  3. 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'] ) ); } }