[Skip to main content](#vessel-content)

#   If coupon used, min-max price restrictions

##

- **[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")**
- [![pepecortez's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31475-pepecortez "View pepecortez's Profile") Topic Author
- [ Offline](/forum/user/31475-pepecortez)

Less More

- Posts: 171
- Thank you received: 9
-
-

10 years 5 months ago [\#241952](#241952) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#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!")* was created by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 5 months ago [\#242003](#242003) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#242003 "-- 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!")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")**
- [![pepecortez's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31475-pepecortez "View pepecortez's Profile") Topic Author
- [ Offline](/forum/user/31475-pepecortez)

Less More

- Posts: 171
- Thank you received: 9
-
-

10 years 5 months ago [\#242217](#242217) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  Replied by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")* on topic *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#242217 "-- 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!")*

Hi Nicolas,

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 5 months ago [\#242238](#242238) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#242238 "-- 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!")*

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: Code:

public function onAfterCartProductsLoad(&amp;$cart) { } /** * */ public function onAfterCartShippingLoad(&amp;$cart) {

to: Code:

public function onAfterCartProductsLoad(&amp;$cart) {

in plugins/hikashoppayment/userpoints/userpoints.php

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")**
- [![pepecortez's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31475-pepecortez "View pepecortez's Profile") Topic Author
- [ Offline](/forum/user/31475-pepecortez)

Less More

- Posts: 171
- Thank you received: 9
-
-

10 years 5 months ago [\#242388](#242388) by [pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")  Replied by *[pepecortez](/forum/user/31475-pepecortez "View pepecortez's Profile")* on topic *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#242388 "-- 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!")*

Unfortunately I can not get it work the way you adviced. ![:(](/media/kunena/emoticons/22.png ":(")
It still do not counts with the userpoints dicount.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

10 years 5 months ago [\#242404](#242404) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[If coupon used, min-max price restrictions](/forum/28-shipping-methods/884893-if-coupon-used-min-max-price-restrictions#242404 "-- 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!")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI4LXNoaXBwaW5nLW1ldGhvZHMvODg0ODkzLWlmLWNvdXBvbi11c2VkLW1pbi1tYXgtcHJpY2UtcmVzdHJpY3Rpb25zP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.051 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
