Dear Dynamicweb,
We have converted some of our product lists to the new ProductViewModel (9.8), but now our subscriber: Ecommerce.Querying.BeforeQuery is not hit anymore.
Where should we place this?
Best regards, Anders
Dear Dynamicweb,
We have converted some of our product lists to the new ProductViewModel (9.8), but now our subscriber: Ecommerce.Querying.BeforeQuery is not hit anymore.
Where should we place this?
Best regards, Anders
Hi Anders,
You can use the equivalent notification from Dynamicweb.Indexing. You'll find it here: Dynamicweb.Indexing.Notifications.Query.BeforeQuery.
- Jeppe
Dear DW,
We also use subscriber: Ecommerce.Querying.BeforeQuery in an old project with success, like the tread:
https://doc.dynamicweb.com/forum/development/development/productlist-notificationsubscriber
We have change the subscriber to: Dynamicweb.Indexing.Notifications.Query.BeforeQuery in a newer
project and it hit but it's not take effect when we try use code like the tread abowe: notificationArgs.Settings.Parameters.Add("MP", true);
to change parametetrs, why?
Hi Johan,
I checked the issue with parameter overriding - on the first view all is fine.
Please make sure that:
1. The parameter actually is used in a query
2. The name is the same - note, case is important!
3. The type is correct - i.e. MP is Boolean, not a String.
If everything is right, send a file with a description of the query and the request code. Let's look it together.
But please create a simple example for testing purposes! :)
Best regards,
Vladimir
PS: Query definisions are stored in \Files\System\Repositories\{name of repository}
Hi Vladimir,
Yes, please reply my email and book a time when it suit you and we look at it together.
Best regards.
Johan
No Emails please. Keep it in forum.... :-)
hmm... didn't yet receive a mail:(
Best regards,
Vladimir
Hi Vladimir,
Ok, does any time after 1 pm suit on monday or tuesday?
Please, let us look at it toghether then.
Nice weekend!
Best regards
Johan
Johan - post your code here - and we will fix it here. No meetings, no mails please - otherwise you have to contact Dynamicweb Care at care@dynamicweb.com
Thank you for your understanding.
Hi Johan,
I'm sorry! I expressed myself wrongly and almost violated company policy!
I meant, let I try to test, debug your example, which you will post on the forum of course :)
Best regards,
Vladimir
Ok!
Hello again!
See code debug in action:
Hi Johan,
There is no standard parameter for SortBy, but the frontend app uses that for compatibility -- Product Catalog existed before indexing and therefore used a different way to sort. Product Catalog for ViewModels uses the same facade for consistensy's sake. Changing a parameter value and overriding the sort order are not the same thing at a query level.
Sorting is defined using the Settings.SortOrder property. To change the sort order, you must change this property. The order in which you specify the sorting is important as it affects the result.
- Jeppe
You must be logged in to post in the forum