Developer forum

Forum » Ecommerce - Standard features » Sorting products in Favorite lists

Sorting products in Favorite lists

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Is there any way I can allow the users to sort their favorite products?

Is this a supported functionality? I can see a SortOrder field in the EcomCustomerFavoriteProducts table but I am not sure if I can control this value from the front-end.

Thank you,

Adrian


Replies

 
Olga Shedko Dynamicweb Employee
Olga Shedko
Reply

Hello Adrian,

You can see the example how frontend sorting implemented in favorites on Rapido sites (attached screenshot). There is a sorting dropdown with options for frontend users. Also sorting should work on non-Rapido sites if you enter SortOrder in URL (e.g. /products?ListID=27&ListName=Christmas%20wishes&SortBy=NameForSort&SortOrder=DESC)

Best regards,

Olga | QA

Favorites_Sorting.png
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Olga,

Thank you for the response.

I believe my definition was not explicit enough.

What I am looking for is a way to allow the user to define a specific sort order for his products.

For example, if I add Product001 to my favorites list and then Product002 to the same favorites list, Product001 will have SortOrder=1 and Product002 will have SortOrder=2.
I want to allow the user to change the value of the sort order if they want to have Product002 with SortOrder=1.

Does it make sense?

This request comes from a B2B project where the users have rather big lists and they want to control the products that are at the top of the list since they are ordered more frequently.

Thank you,
Adrian

 

 
Nicolai Pedersen
Reply

There is no built in feature to change sorting from the frontend. You would have to built something custom that updates the sort value.

 
Olga Shedko Dynamicweb Employee
Olga Shedko
Reply
 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Thank you both.
From Nicolai's response, I understand that we will have to build it.

Thank you,
Adrian

 
Nicolai Pedersen
Reply

Correction: If you are using the old customer center module, you can update a favoritelist items sort order using the updateproductsortorder command:

/customerCenterPage?CC1=updateproductsortorder&SortOrder=10&ListId=23&ProductId=prod1

CC1 means the CC and the ID of the paragraph, like other customer center commands.

In the new customer center using the viewmodels, it is not supported.

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you very much. We are still using the old Customer Center.

This is very good news!

Thank you very much,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

Just in case somebody else tries this approach, the correct syntax is this: 

/customerCenterPage?CC1=UpdateProductSortOrder&SortOrder=10&ListId=23&ProductId=prod1

The Parameter is case sensitive.

Thank you,


Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

We have implemented your suggestion and the sorting is indeed updated.

The only problem is that the sorting information is cached and we cannot get the information back in the interface after adjusting the sorting.

Is there any way we can force an update of this information after making the update?

Thank you,

Adrian

 

You must be logged in to post in the forum