PrestaShop icon indicating copy to clipboard operation
PrestaShop copied to clipboard

FO : Fix bug when a gift cart rule is in the cart

Open idnovate opened this issue 2 years ago • 5 comments

Questions Answers
Branch? develop
Description? https://github.com/PrestaShop/PrestaShop/issues/34085
Type? bug fix
Category? FO
BC breaks? no
Deprecations? no
How to test? https://github.com/PrestaShop/PrestaShop/issues/34085
Fixed issue or discussion? Fixes #34085
Sponsor company idnovate.com

EDIT @Hlavtox - QA, please try to add Hummingbird printed sweater (the gifted product) to the cart also normally, to check if the table still works.

idnovate avatar Sep 28 '23 09:09 idnovate

Hi, thanks for this contribution!

I found some issues with the Pull Request description:

  • Your pull request does not seem to fix any issue, consider creating one (see note below) and linking it by writing Fixes #1234.

Would you mind having a look at it? This will help us understand how interesting your contribution is, thank you very much!

About linked issues

Please consider opening an issue before submitting a Pull Request:

  • If it's a bug fix, it helps maintainers verify that the bug is effectively due to a defect in the code, and that it hasn't been fixed already.
  • It can help trigger a discussion about the best implementation path before a single line of code is written.
  • It may lead the Core Product team to mark that issue as a priority, further attracting the maintainers' attention.

(Note: this is an automated message, but answering it will reach a real human)

prestonBot avatar Sep 28 '23 09:09 prestonBot

Before the fix: image

After the fix: image

idnovate avatar Sep 28 '23 09:09 idnovate

Ok, I'm new to this :)

I understand that this is the documentation: https://devdocs.prestashop-project.org/8/testing/integration-tests/how-to-create-your-own-behat-tests/

Where can I find the repo for this file? tests/Integration/Behaviour/Features/Scenario/Order/order_gift_cart_rule.feature

idnovate avatar Oct 03 '23 08:10 idnovate

Where can I find the repo for this file? tests/Integration/Behaviour/Features/Scenario/Order/order_gift_cart_rule.feature

Hello @idnovate! 🙂

You can find this file directly on the Prestashop/Prestashop repository and also on your fork: https://github.com/idnovate/PrestaShop/blob/8e3072bebc630a935baaf0104c8d21ad59bc6eb6/tests/Integration/Behaviour/Features/Scenario/Order/order_gift_cart_rule.feature

boherm avatar Oct 03 '23 14:10 boherm

Hello @idnovate

Do you think you could add the missing tests?

A few tips, the base tests for this feature are here: https://github.com/idnovate/PrestaShop/blob/develop/tests/Integration/Behaviour/Features/Scenario/Order/order_gift_cart_rule.feature

You can add a new test where you add two products with different tax rates. If you search for example how to add two products with different tax rate, you can find here adding a product with selected tax: https://github.com/idnovate/PrestaShop/blob/develop/tests/Integration/Behaviour/Features/Scenario/Order/order_odd_tax.feature

or here

https://github.com/idnovate/PrestaShop/blob/develop/tests/Integration/Behaviour/Features/Scenario/Order/order_french_tax.feature

where there's tax_rule added and then tax rule applied to the product

Let me know what you think, it would be great to have your bugfix in the core.

kpodemski avatar Feb 25 '24 19:02 kpodemski