pimcore / ecommerce-framework-bundle

Ecommerce Framework community bundle provides e-commerce functionality such as product listing and filtering, pricing, carts and checkouts for Pimcore.
https://pimcore.com/docs/platform/Ecommerce_Framework/
Other
11 stars 33 forks source link

Bugfix(PricingRules): Prevent Error when adding a new Pricing Rule with a name that exists #216

Open ctippler opened 13 hours ago

ctippler commented 13 hours ago

When you create a Pricing Rule with an name that already exists in the backend, a invalid Database entry is added. Therefore the admin interface is not loading the pricing rules anymore.

The reason is because the create() call is successfully but in the update() call you get an error because a pricing Rule with that name already exists. Solution -> wrap it into a transaction so both queries have to be executed successfully