Quote per user

  • Posts: 4
  • Thank you received: 0
8 years 7 months ago #234298

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?


Attachments:

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 7 months ago #234313

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: 8 years 7 months ago by nicolas.

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

  • Posts: 4
  • Thank you received: 0
8 years 7 months ago #234574

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.

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #234712

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.

  • Posts: 4
  • Thank you received: 0
8 years 7 months ago #234730

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.

  • Posts: 12953
  • Thank you received: 1778
8 years 7 months ago #234777

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 :

$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 :
$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.

  • Posts: 4
  • Thank you received: 0
8 years 7 months ago #234836

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.092 seconds
Powered by Kunena Forum