- Posts: 251
- Thank you received: 2
Automatically loaded Coupon
15 years 2 months ago #20476
by Nello
Automatically loaded Coupon was created by Nello
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20506
by nicolas
Replied by nicolas on topic Re: Automatically loaded Coupon
It seems that you don't have the latest version of HikaShop. Please update and try again.
Please Log in or Create an account to join the conversation.
15 years 2 months ago - 15 years 2 months ago #20518
by Nello
Replied by Nello on topic Re: Automatically loaded Coupon
Last edit: 15 years 2 months ago by Nello.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20521
by nicolas
Replied by nicolas on topic Re: Automatically loaded Coupon
Please edit the file administrator/com_hikashop/classes/discount.php and change the line:
$query = 'SELECT COUNT(order_id) AS already_used FROM '.hikashop_get('order').' WHERE order_user_id='.(int)$user_id.' AND order_status NOT IN ('.$cancelled_order_status.') AND order_discount_code='.$db->Quote($coupon->discount_code).' GROUP BY order_id';
to:
$query = 'SELECT COUNT(order_id) AS already_used FROM '.hikashop_table('order').' WHERE order_user_id='.(int)$user_id.' AND order_status NOT IN ('.$cancelled_order_status.') AND order_discount_code='.$db->Quote($coupon->discount_code).' GROUP BY order_id';
and try again.
$query = 'SELECT COUNT(order_id) AS already_used FROM '.hikashop_get('order').' WHERE order_user_id='.(int)$user_id.' AND order_status NOT IN ('.$cancelled_order_status.') AND order_discount_code='.$db->Quote($coupon->discount_code).' GROUP BY order_id';
to:
$query = 'SELECT COUNT(order_id) AS already_used FROM '.hikashop_table('order').' WHERE order_user_id='.(int)$user_id.' AND order_status NOT IN ('.$cancelled_order_status.') AND order_discount_code='.$db->Quote($coupon->discount_code).' GROUP BY order_id';
and try again.
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20528
by Nello
Replied by Nello on topic Re: Automatically loaded Coupon
it seems to work!
Please Log in or Create an account to join the conversation.
15 years 2 months ago #20530
by nicolas
Replied by nicolas on topic Re: Automatically loaded Coupon
Great. We'll add that to next release.
Please Log in or Create an account to join the conversation.
Time to create page: 0.204 seconds