Developer forum

Forum » Ecommerce - Standard features » Sorting (Question Edited)

Sorting (Question Edited)

Daniel Linder
Reply

Hi we are using DW 8.7.2.8 for a customer and I am wondering what DW sorts products by as a second parameter?
I know you can select, say that to sort after product reseller, but what does DW sort inside each sort? Is it possible to add a sort by and then by to the sorting?


Replies

 
Nicolai Pedersen
Reply

Hi Daniel

Not sure I understand. On the catalog you can set the field to order by and the direction (Asc or desc).

You can override that in querystring using sortby=&sortorder - see the manual: http://doc.dynamicweb.com/documentation-9/ecommerce/product-catalog/product-catalog-app#sideNavTitle1-4-2

 
Daniel Linder
Reply

Yes but say that you sort by say "name" and then say that several products share teh same name. How would these with the same name be sorted?

 
Nicolai Pedersen
Reply

That is handled by the database, so it depends on the index in the database.

Swtiching to the index instead, you can specify as many sort fields/orders as you like and it also supports ?sortby=name,number,price,whatever&sortorder=asc,desc,asc,desc

BR Nicolai

 
Daniel Linder
Reply

But isnt the functionality with multiple sortby for version 8.9?

Also, is the "index" something that is a standard field in DW?

 
Nicolai Pedersen
Reply

Yes, that is 8.9

The index is how SQL decides to index its data.

 

You must be logged in to post in the forum