How to add a maximum fee

  • Posts: 128
  • Thank you received: 2
7 years 10 months ago #258351

-- HikaShop version -- : 2.6.4
-- HikaMarket version -- : 1.7.2
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6

Hi there,

I hope you can help me clarify how to achieve the following.

On the Vendor fees I can add a flat fee that will be added per product bought and a percentage fee that will be on the total amount.

But can I cap the total fee to maximum value?

For example the flat fee per product is 1 euro and the percentage fee is 10%, but I would like to cap the vendor fee to a maximum of 10 euros.

That means if a customer buys 3 products of 20 euros the vendor fee will be (3x1 euro)+(3x20x10%) = 9 euros

But if the customer buys 4 products of 20 euros, I would like the vendor fee to be 10 euros ( the maximum cap ) instead of 12 euros (calculated)

How can this be achieved?

Many thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258367

Hi,

In order to implement such kind of rules for the fees, the best is to use a little custom plugin with the trigger "onAfterMarketCalculateVendorPrice"
www.hikashop.com/support/documentation/1...CalculateVendorPrice
It allow you to have a control on the vendor price after the fee processing ; so you can place a maximum limitation and force the price to not be higher than X euros.

I think it will be the best for you needs.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.043 seconds
Powered by Kunena Forum