Skip to main content

Quote per user

More
10 years 6 months ago #234298 by ABCdistribution
Hi,

I have created a coupon with attached configuration.
i need that discount is usable only two times (for single user) from all users of the selected group, but does not work...

work only if the value is = 1

how i can solve this issue?


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

More
10 years 6 months ago - 10 years 6 months ago #234313 by nicolas
Replied by nicolas on topic Quote per user
Hi,

What do you mean by "it doesn't work" ?
You can't use the coupon code at all ?
Or you can use the coupon code more than twice ?
Also, which version of HikaShop are you using ?
Last edit: 10 years 6 months ago by nicolas.

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

More
10 years 6 months ago #234574 by ABCdistribution
Replied by ABCdistribution on topic Quote per user
Hi,
the coupon come applied more than twice for each user
my version is HikaShop Business 2.6.1

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

More
10 years 6 months ago #234712 by Mohamed Thelji
Replied by Mohamed Thelji on topic Quote per user
Hello,

It should actually works with the way you have configured your coupon, but can you test it without any value through the "Quota" option ?

Thank you.

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

More
10 years 6 months ago #234730 by ABCdistribution
Replied by ABCdistribution on topic Quote per user
HI,
doesn't work also with quota value = 0
my test account can order more than twice with discount...

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

More
10 years 6 months ago #234777 by Mohamed Thelji
Replied by Mohamed Thelji on topic Quote per user
Hello,

We just added a fix regarding that issue, the solution will be to edit the "administrator\components\com_hikashop\classes\discount.php" file and change that line :
Code:
$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';
By :
Code:
$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);

Thank you for your feedback !

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

More
10 years 6 months ago #234836 by ABCdistribution
Replied by ABCdistribution on topic Quote per user
Now work perfectly!

Many thanks for your quick support!

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

Time to create page: 0.277 seconds
Powered by Kunena Forum