Skip to main content

Automatically loaded Coupon

More
15 years 2 months ago #20476 by Nello
Hi Nicolas,

I set a coupon that is automatically loaded into cart, but this is the result I obtained...

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #20506 by nicolas
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.

More
15 years 2 months ago - 15 years 2 months ago #20518 by Nello
Hi Nicolas I updated to the version 1.5.2.
I set a new coupon this way



I obtained this



I noted that If I try to set the date the error disappear but the coupon isn't applied.

Also I noted that the Discount Quota Per User don't work..
Last edit: 15 years 2 months ago by Nello.

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #20521 by nicolas
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.

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #20528 by Nello
it seems to work!

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #20530 by nicolas
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
Powered by Kunena Forum