PrestaShop / example-modules

Example PrestaShop modules
Academic Free License v3.0
177 stars 118 forks source link

DemoGrid - add new columns and filters, add support for PS 1.7.7 #100

Closed leemyongpakvn closed 2 years ago

leemyongpakvn commented 2 years ago

Problem: const SqlFilters::MIN_MAX in demo_grid/src/Grid/Query/ProductQueryBuilder.php is not available before PS 8.0, so using it in PS 1.7 will create a FatalThrowableError.

Questions Answers
Description? Solution: Only use SqlFilters::MIN_MAX when PS_VERSION >= 8.0, else use pure andWhere of QueryBuilder
Improvement: add Product name and price columns and filters.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/example-modules/issues/94
How to test? In PS 8.0 BO > Modules > Demo Grid > Configure: before PR there is a FatalThrowableError, after PR the error is gone.
Possible impacts? Please indicate what parts of the software we need to check to make sure everything is alright.
leemyongpakvn commented 2 years ago

Reopen after Rename

leemyongpakvn commented 2 years ago

Reopen after Rename

leemyongpakvn commented 2 years ago

@mflasquin This PR is mainly adding support for PS 1.7.7. I have no problem with install this module via Back Office and use it in PS 8.0.0 (as in the screenshot) demo_grid_in_PS8 0 Please try Clear Cache in Back Office > Performance to see if it helps to solve the problem, before you open an issue for PS 8 compatibility.