Coupon not being applied to total amount (product + shipping)

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
3 years 2 weeks ago #336726

-- url of the page with the problem -- : www.thegoatcompany.co.uk
-- HikaShop version -- : 4.4.4
-- Joomla version -- : Latest
-- PHP version -- : 7.4.24
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : How to apply voucher to product and shipping as customer loses money?

Hi,
Just had an order where a customer used a coupon for £25, the goods were £24 and the shipping was £4.70 (£28.70), the total the customer was charged was £4.70. This should have been £3.70? I have looked everywhere to try and find the cause of the problem but can not find it.
The customer was upset that they couldn't redeem the entire voucher against the whole cost.

Any ideas.

Thanks

Ian

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 2 weeks ago #336729

Hi,

The "amount" and "percentage" fields of a coupon are indeed only for the products total amount, not the order total amount.
The shipping fee can be discounted by the coupon using the "Shipping percentage" field of the coupon.
I'm afraid there is no easy solution to this as that's how the system is made to behave.
The coupon value is added to the cart amount before the shipping amount is added to the cart. And the total value at that point cannot be lower than 0.
Handling it like you want would require to add an extra option to the coupons so that you could choose if the amount of the coupon can be used on shipping fees or not and extra code in the afterShippingProcessing function of the file administrator/components/com_hikashop/classes/discount.php which is tasked to handle the "shipping percentage" of coupons and thus is processed after the shipping has been added to the cart.

The following user(s) said Thank You: ianspeed

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

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
3 years 2 weeks ago #336759

Thanks Nicolas,
It seems a bit crazy this function doesn't exist, and I can understand where the customer and my client are coming from. As for modifying the core files in administrator, wouldn't these would just get wiped out on the next update?
I wouldn't want this as an option, I would want this to happen every time we have that situation/scenario.
Guess the way to handle this would be do the calculation last on total, and if a negative figure set to zero and treat the sale as free item?

Can I request this option for a future modification?

Thanks

Ian

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 2 weeks ago #336771

Hi,

It's done like that because often you need to configure shipping methods using the "minimum price" / "maximum price" settings of the shipping methods so that different shipping methods are available to the customer based on the amount of his order. And in such case, you usually want to take into account the coupon added to the cart. And thus, for that to happen, you need to add the coupon to the cart before you load the shipping methods.
So it's not crazy at all to have it work the way it does now. It's just not like you want it for your particular case, which I understand too.
So no, it can't be done like you're proposing, or we wouldn't be able to properly keep supporting the scenario I talked about above. It can only be done as an extra option to the coupon system, like I explained in my previous message.
I've added your feature request of that extra option to our todo list.

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

  • Posts: 170
  • Thank you received: 8
  • Hikashop Essential
3 years 2 weeks ago #336784

Thanks Nicolas,
The crazy bit It wasn't a criticism. Hikashop has just so much flexibility that I couldn't believe that this hadn't come to the surface before. My customer is doing more and more Gift Vouchers/Coupons at the moment. She is having to put a note with each voucher purchased saying that she will refund the difference. But it would be good if that was to be implemented :-)

Thanks

Ian

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

Time to create page: 0.059 seconds
Powered by Kunena Forum