Developer forum

Forum » Ecommerce - Standard features » Sort by for products

Sort by for products

Sofia Soje
Reply

Hi! How do I create a sort by function to show products? Etc. Lowest price, highest price, name, newest.

Tried Google and this forum but as I am fairly new to DynamicWeb I can't wrap my head around it all yet.


Replies

 
Nicolai Pedersen
Reply

Hi Sofia

Try look at this thread. http://doc.dynamicweb.com/forum/ecommerce-standard-features/multiple-sortby-in-list-querystring

BR Nicolai

 
Sofia Soje
Reply

Thank you for answering, Nicolai, but sadly that thread did not help me with how to implement the sort by function.

 
Nicolai Pedersen
Reply

So what kind of help do you need?

Do you i.e. know what a product list template is?

 
Sofia Soje
Reply

Yes, the site has a fully functional ecommerce, and filter function. Only a function to sort by price, name etc. is missing.

 
Nicolai Pedersen
Reply
This post has been marked as an answer

So on the product list page, if you add &sortby=price&sortorder=desc to the querystring, will that sort the products?

Then you just need to change the product list template to be able to handle sorting and sortorder querystring parameter choices.

You can see the implementation on WRAP: http://wrap.dynamicweb-cms.com/produkter?eComQuery=&SortBy=Price&SortOrder=Desc

You can download wrap with templates which implements the feature from here: http://doc.dynamicweb.com/releases-and-downloads/releases#4045

Hope this helps you further.

BR Nicolai

Votes for this answer: 1
 
Sofia Soje
Reply

Thank you, I got it to work!

 

You must be logged in to post in the forum