Automatically loaded Coupon

  • Posts: 251
  • Thank you received: 2
13 years 4 months 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: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months 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
13 years 4 months 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: 13 years 4 months ago by Nello.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months 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
13 years 4 months ago #20528

it seems to work!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 4 months 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.051 seconds
Powered by Kunena Forum