Steps to reproduce:
- Add a product and set its price
- On CoreShopProduct set "allowInherit" and "allowVariants" to true
- Add a product variant and change its price
- The price of parent product will be set to 0
This appears to be a regression of #1486
This patch fixed the issue previously in CoreShop 2.2: https://github.com/coreshop/CoreShop/pull/1491/files
In the current version I've replaced the $storeValuesEntity = clone $storeValuesEntity; with $storeValuesEntity = new ProductStoreValues() and it seems to work correctly in my local environment. However, I don’t fully understand why "clone" doesn't work as expected.
I’m also not sure what the consequences might be if a completely new ProductStoreValues instance is created.
I can create a PR if my changes make sense.