lunarphp / lunar

An open-source package that brings the power of modern headless e-commerce functionality to Laravel.
https://lunarphp.io
MIT License
2.7k stars 356 forks source link

Crash on add to cart #2019

Open yasirmturk opened 5 hours ago

yasirmturk commented 5 hours ago

Expected Behaviour:

Product should be added to the cart

Actual Behaviour:

Crash with ErrorException Attempt to read property "id" on null

Steps To Reproduce:

Product created with 1 variant, 1 product option (Size) and one option (Small), Add to Card on Product page

yasirmturk commented 4 hours ago

Once this crash happens, the app goes to unstable state, and now even the home page is not loading and crashes

Screenshot 2024-11-17 at 20 54 43
yasirmturk commented 4 hours ago

Underlying reason for this crash is that, Tax Zone is not set in the admin.

So the checkout does not work without setting tax zone while it is an optional configuration

Screenshot 2024-11-17 at 22 18 14