Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong cart calculation using rules with free Gift #13232

Merged
merged 1 commit into from Apr 10, 2019

Conversation

123monsite-regis
Copy link
Contributor

@123monsite-regis 123monsite-regis commented Apr 8, 2019

Questions Answers
Branch? develop
Description? Wrong calculation of "cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS", using rules whith free Gift
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? -
How to test? please see below
  • the discount is applied before sending his amount to the calculator, so the amount discounted of a free gift is always 0 whereas it souhld be gift'price
  • to test, create a Cart Rule, offering a free gift, on your front shop create an order, and watch on BO the "reduction total" for the created order
  • side effect : PaymentModule::validateOrder( does not correctly register , $order->total_discount On : https://github.com/PrestaShop/PrestaShop/blob/develop/classes/PaymentModule.php#L980

This change is Reviewable

@prestonBot prestonBot added develop Branch Bug Type: Bug labels Apr 8, 2019
Copy link
Contributor

@tomlev tomlev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@tomlev tomlev added the Waiting for QA Status: action required, waiting for test feedback label Apr 8, 2019
@marionf marionf self-assigned this Apr 8, 2019
@marionf marionf added QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Apr 8, 2019
@marionf marionf removed their assignment Apr 8, 2019
@mickaelandrieu mickaelandrieu added this to the 1.7.7.0 milestone Apr 10, 2019
@mickaelandrieu
Copy link
Contributor

LGTM, thanks, everyone!

@mickaelandrieu mickaelandrieu merged commit 61e5958 into PrestaShop:develop Apr 10, 2019
@eternoendless eternoendless changed the title [CO] Wrong calculation, free Gift Fix wrong cart calculation using rules with free Gift Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Type: Bug develop Branch QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants