Automatically loaded Coupon

  • Posts: 251
  • Thank you received: 2
14 years 23 hours ago #20476

Hi Nicolas,

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

Attachments:

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

  • Posts: 84043
  • Thank you received: 13619
  • MODERATOR
14 years 5 hours ago #20506

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.

  • Posts: 251
  • Thank you received: 2
14 years 2 hours ago #20518

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

Attachments:
Last edit: 14 years 2 hours ago by Nello.

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

  • Posts: 84043
  • Thank you received: 13619
  • MODERATOR
14 years 1 hour ago #20521

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.

  • Posts: 251
  • Thank you received: 2
14 years 1 hour ago #20528

it seems to work!

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

  • Posts: 84043
  • Thank you received: 13619
  • MODERATOR
14 years 55 minutes ago #20530

Great. We'll add that to next release.

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

Time to create page: 0.061 seconds
Powered by Kunena Forum