example-modules icon indicating copy to clipboard operation
example-modules copied to clipboard

DemoGrid - add new columns and filter, add support for PS 1.7.7

Open leemyongpakvn opened this issue 3 years ago • 2 comments

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 avatar Aug 08 '22 07:08 leemyongpakvn

Reopen after Rename

leemyongpakvn avatar Aug 13 '22 13:08 leemyongpakvn

Reopen after Rename

leemyongpakvn avatar Aug 13 '22 13:08 leemyongpakvn

@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.

leemyongpakvn avatar Oct 07 '22 13:10 leemyongpakvn