OrderFixedAmount still applies adjustement on arderitems

Created on 13 November 2023, about 1 year ago

Hi we are using commerce fee to add additional amount to an order when customer are using a specific payment gateway.

For some product variations where the price is 0 (free event registration) we get an error comming from the commerce price splitter about trying to divide by zero.

Indeed in the OrderFixedAmount.php class the fee amount is split between order items. I guess there is a problem with commerce_price splitter that should take into account that a order subtotal could be zero but anyways I don't understand why the fee here is split upon order items on a plugin that seems to be made specifically to apply fixed amount adjustment on order total? What am I missing?

Thank you

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium davidiio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @davidiio
  • 🇮🇱Israel jsacksick

    That is how promotions are implemented in Commerce too. Everything is split accross order items for tax/refund purposes mainly.

  • 🇧🇪Belgium davidiio

    Thanks for your answer.
    I thought avoiding splitting would be the solution but since it is how it is supposed to be done I have looked somewhere else and configuring the fee to be applied only when order amount is greater than 0 solves the problem for us now.

Production build 0.71.5 2024