If coupon used, min-max price restrictions

  • Posts: 171
  • Thank you received: 9
8 years 5 months ago #241952

-- HikaShop version -- : 2.6.3.

Hi!

We have a shipping method with 3 price ranges. So we created 3 types of shipping methods with different min/max price restricitions. The problem is, that if user uses his discount (userpoints discount or coupon discount), the system do not respects the reduced final price.

For example:
Home delivery - 3 shipping types:
1.) max price: 5000 HUF - Cost: 1500 HUF
2.) min. price: 5001 HUF, max.price: 25.000 HUF - Cost: 1000 HUF
3.) min. price: 25001 HUF - Cost: Free

If user has for example 26.000 HUF valued products in his cart, and then applies a 20% coupon discount, final price goes down to 20.800 HUF. In that case system should show 2.) shipping option which costs 1000 HUF, but it shows the 3.) option (free). I think that is not OK, I just wanted to ask is there any option to fix that?

Thanks in advance!

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 5 months ago #242003

Hi,

The shipping system can handle or not coupons/points. It depends on how you configured your shipping methods.
In them, you'll find the "include virtual products price" setting that you can activate. If you do, the coupons will be taken into account.

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

  • Posts: 171
  • Thank you received: 9
8 years 5 months ago #242217

Hi Nicolas,

Thanks for the trick, it works for coupons but not it if user can pay with his (Alpha)Userpoints.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 5 months ago #242238

Hi,

It depends how you configure the points system.
If you configure it to be added as a coupon to the orders, then it will work for points too.
If you don't and the points are added as "additionals" to the orders (which is what you want in most cases), then there is no setting to take them into account.
You would have to change the code:

public function onAfterCartProductsLoad(&$cart) {
	}

	/**
	 *
	 */
	public function onAfterCartShippingLoad(&$cart) {
to:
public function onAfterCartProductsLoad(&$cart) {
in plugins/hikashoppayment/userpoints/userpoints.php

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

  • Posts: 171
  • Thank you received: 9
8 years 5 months ago #242388

Unfortunately I can not get it work the way you adviced. :(
It still do not counts with the userpoints dicount.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 5 months ago #242404

Hi,

I don't see why that change wouldn't work.
Can you provide the code of your plugins/hikashoppayment/userpoints/userpoints.php file now ? And can you make sure that you edited the correct file of the correct website ?

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

Time to create page: 0.065 seconds
Powered by Kunena Forum