WSOD when currency is changed, while having order items with overriden unit price set to 0 in cart

Created on 3 March 2023, almost 2 years ago

Problem/Motivation

The site breaks when I have items in the cart and I try to change the currency on the currency block.
The currencies work as cookies and use the Automatic conversion source.

Specifically, if the item has overriden unit price, and the price is set to 0.

Steps to reproduce

  1. You must have some kind of custom code and at least one of the items unit price has to be set to overriden and to 0
  2. Go to cart page
  3. Change the price from the currency block

Proposed resolution

I have written a custom patch that prevents the WSOD, but sometimes it still messes up the currencies...

Without the patch, I have just edited the cookie storage and reverted back to the currency that was previously set

In the worst case if the site still breaks I had to programmatically delete order.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇷🇸Serbia darko_antunovic

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

Comments & Activities

Production build 0.71.5 2024