Prestashop: Discount and Vouchers improvement suggestions

Created on 30 Jan 2020  路  4Comments  路  Source: PrestaShop/PrestaShop

From what @arouiadib shared in #16842

Describe the solution you'd like
I think some functionalities are not yet added in develop:

  • There should be a column in database that stores the configuration value of "Apply discount to:" for each cart rule. I unfortunately don't find it (but the value is correctly sent from BO, see picture )
    image

  • Retrieve this value from database inside cart voucher object.

  • A function that checks if this value is equal to "cheapest" and apply the appropriate equation.

  • Unit tests.

Improvement waiting for PM

Most helpful comment

No worries 馃檪
Thank you @arouiadib for your help on the regression!

I'll close this issue then

All 4 comments

Hello @arouiadib, I created the issue about your suggestions, feel free to give more details 馃檪

It will then be reviewed by a PM with experience on this topic to see what can/should be implemented, and write specifications.

Then you will be able to contribute and propose a Pull Request 馃憤

Perfect @sam-pires , thank you very much.

My bad, the points I have mentioned the last month are incorrect.
After a second reading of source code, I have found that almost all the list is implemented.

  • database column exists (product_reduction =
    -1 if cheapest product
    -2 for selected products
    0 for whole order
    strictly positive if for specific product
  • persistence and retrieval from database is already implemented for BO.
  • For front office retrieval and tests against that value are done.

The only problem is in calculation which I tried to fix by a PR, that still needs some enhancements :)

Thank you @sam-pires for your time

No worries 馃檪
Thank you @arouiadib for your help on the regression!

I'll close this issue then

Was this page helpful?
0 / 5 - 0 ratings