lunarphp / lunar

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

Variant adds zeros at each price update #1988

Open ferdiunal opened 3 weeks ago

ferdiunal commented 3 weeks ago

Expected Behaviour:

When I update the price of a product variant, it adds a zero to the end of each variant price. ProductOptionsWidget.php#L405

https://github.com/user-attachments/assets/17a83e20-3aac-4fe2-beea-06ff3e483f7c

Actual Behaviour:

Steps To Reproduce:

ferdiunal commented 3 weeks ago

Solution:

I think that the price should be stored in a raw_price or equivalent column, and every time the price is updated it should reference the raw data in this column. ProductOptionsWidget.php#L405