• Resolved wirestyle

    (@wirestyle)


    When a customer uses a voucher on checkout, the cart shows an error message “Bad value: order_amount” and the Klarna payment options don’t show up.

    The vouchers worked perfectly fine for 2 years. I didn’t update the Klarna plugin in about 6 months, so I don’t know which version introduced this error.

    The vouchers were generated with WooCommerce PDF Produktgutscheine from Skyverge (currently 3.11.0). I’m on Woocommerce 7.40

    The voucher was sold as a multi-purpose voucher, meaning that the full value of the voucher was for example 100 Euros and 0% tax. When the voucher is redeemed, the value of the 120 Euro item is reduced by 100 Euros and the remaining value is 20 Euros. The final invoice contains the remaining 20 Euros of the item and also the full tax of the voucher. So the ratio of final amount of the order and the contained tax are very different compared to orders without any redeemed vouchers.

    In germany this is the standard procedure for “Mehrzweckgutschein” and worked flawlessly until some time ago.

    • This topic was modified 2 years ago by wirestyle.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Andreas – Krokedil

    (@boozebrorsan)

    Hi,

    Does it work if you rollback to the KP version 2.12.1?
    You can use the WP-rollback plugin to do this easily.
    https://sv.www.ads-software.com/plugins/wp-rollback/

    Would it be possible to email us on our?support@krokedil.com?with logs from your store from when the problem happened as those should not be posted here so we can see if we can find what caused this?

    In the meantime I suggest that you rollback to the version it worked with earlier.

    Thread Starter wirestyle

    (@wirestyle)

    Rolling back to 2.12.1 solved the problem. If a voucher is applied, there is no error message anymore, but Klarna is missing from the payment options. Our other payment options besides Klarna are still available and working.

    Before rolling back, the error message prevent the customer from confirming the cart even if Klarna was not selected as payment provider, making it impossible to order.

    We can live with this, this fix is good enough for now.

    I can send you the logs to help find the error, which logs do you need?

    Plugin Author Michael Bengtsson

    (@michaelbengtsson)

    @wirestyle Yes that is actually something we notices as well with the release. That there has always been a few issues with some calculations, just that the error message never showed and no one reported them to us. But now its also causing the orders to not be placeable. So we are discussing internally if we should go back to not displaying the errors, even if we considered that to be a bug before. We would just need to replace it with something else that still indicates an issue to the merchant, even if the customers never see it.

    The logs we would need can be found under WooCommerce->Status->Logs and then grab the logs from klarna payments.

    Just to repeat: do not send them here, since they can contain some sensitive information. Send them to the email that Andreas linked above.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error Bad value: order_amount when using voucher’ is closed to new replies.