Tiered Discounts

  • Posts: 52
  • Thank you received: 0
4 years 2 months ago #315179

-- url of the page with the problem -- : www.lesswatts.co.za
-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.14
-- PHP version -- : 7.2.26
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : None

Hi,

I have multiple tiers of discounts pertaining to different levels of user categories.

This question is related to two categories only: Registered and Resellers. Both these categories are defined as groups under the Joomla user manager.

For Registered users I would like to grant a 3% discount and for resellersm the discount needs to be much deeper - 25%.

What happens is that the discount for the Registered user is applied to all categories, and for the life of me I can;t seem to find a solution to it. Can you please assist?

Regards

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
4 years 2 months ago #315184

Hi,

For a product, you can only have one discount applying at a time.
So the system has to select which discount to use when several match for it.
Here is how the selection is done:
- if a discount is assigned directly to the product / variant the discount has the priority
- otherwise, if a discount is assigned to the main product while we're loading the prices of a variant, the discount has the priority
- otherwise, if a discount is assigned to a category of the product, the discount has the priority
- otherwise, the discount has the lowest priority
Now, if several discounts with the same priority are found, the one with the greater discount is selected.


So in your example, first, if the discounts and user groups are configured properly, the system shouldn't even have to select between the discount:
- if the user is attached to the "resellers" user group and not the "registered" user group and you restrict the 3% discount to the "registered" user group (with its "access level" setting), and the 25% discount to the "resellers" user group, then when the system loads the discounts for a reseller, it should only find the 25% discount and automatically use it.
Since you get a 3% as a resellers, it means that your user is also view as a "registered" user or that you didn't restrict the 3% discount to registered users only.
But even so, it also means that the 3% discount has a greater priority than the 25% discount because otherwise the 25% discount would be selected.

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

  • Posts: 52
  • Thank you received: 0
4 years 2 months ago #315199

Hi Nicolas,

Yes you are right. It does not seem though that the Discount priority can be changed. Does Hikashop look at the item ID to determine priority?

Regards

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
4 years 2 months ago #315205

Hi,

The priority cannot be changed unless you modify the code of the "selectDiscount" function in the file administrator/components/com_hikashop/classes/currency.php

The menu item ID plays no role in the selection of the discount or the priority.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum