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

Set amount to the subtotal when the discount amount exceeds the subtotal #200

Closed jan888adams closed 1 month ago

jan888adams commented 1 month ago

The cart discount reduces the total cart price, including price modifications like shipping costs. This behavior differs from percentage discounts, which only apply to the subtotal and do not affect additional costs.

This is fixed by setting the discount amount to the subtotal when the discount amount exceeds the subtotal.

Resolves: #199

fashxp commented 1 month ago

Not sure, if we should make that behavior configurable? Or at least we merge that for the next minor and add a upgrade note to it - since it is a change in behavior that someone could use the way it is right now.

WDYT?

jan888adams commented 1 month ago

That sounds like a good idea. I would implement the current behavior as the default, with an option to switch to the new calculation. Additionally, I would apply the change only to the fixed amount and deprecate the old method of calculating cart discounts with fixed amounts.

fashxp commented 1 month ago

please just update the english translation file. the rest is translated via poeditor, see also https://pimcore.com/docs/platform/Pimcore/Multi_Language_i18n/Admin_Translations/#adding-your-own-admin-languages-since-v636

fashxp commented 1 month ago

thanks again!