Error with filter in products
Prestashop version : 1.7.39 Nuget Prestasharp version : 1.2.9 dependencies : .net framework v4.5.2 restsharp 106.11.4 .net standard v2.0
This the code with the filter on active Dictionary<string, string> filter = new Dictionary<string, string>(); filter.Add("Active", "1");
string Verif = string.Empty;
List<product> SelProducts = ProductFact.GetByFilter(filter,"reference_ASC","9999");
//List<product> SelProducts = ProductFact.GetAll();
And i receive error 👍 👍 Bukimedia.PrestaSharp.PrestaSharpException : ' display: full filter[Active]: 1 sort: reference_ASC limit: 9999
with details 👍 {"\r\ndisplay: full\r\nfilter[Active]: 1\r\nsort: reference_ASC\r\nlimit: 9999\r\ndate: 1\r\nws_key: UI3VEQPH1KBANWRKHY5Q65FW9EIBFUG2\r\n\r\n\n<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">\n\n
I dont understand, because this code works in another application.
Can you help ? Jean-Marie
Hi Jean-Marie,
The issue seems to be with the filter key. In the filter, try using "active" in lowercase instead of "Active": filter.Add("active", "1");
Hope this helps!
Hello, Thanks a lot, this was the problem.
Jean-Marie
Le jeu. 3 oct. 2024 à 13:27, sanctusmob @.***> a écrit :
Hi Jean-Marie,
The issue seems to be with the filter key. In the filter, try using "active" in lowercase instead of "Active": filter.Add("active", "1");
Hope this helps!
— Reply to this email directly, view it on GitHub https://github.com/Bukimedia/PrestaSharp/issues/466#issuecomment-2391180413, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4KBFMFFULN2N55JOOLSPLZZUS2BAVCNFSM6AAAAABPJSUCJGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJRGE4DANBRGM . You are receiving this because you authored the thread.Message ID: @.***>