Hello,Does anybody know how can I programmatically get/set the data in the SortOrder column on the dbo.CatalogNode table?
Is it possible? We are trying to order the product categories displayed on our website and were under impression that using this field was the best way to do so, since it is managable through the commerce manager and will apparently be managable through the catalog UI in Commerce 11.
Thanks in advance,
You can use CatalogNodeRelation/ICatalogSystem in the old way, or NodeRelation/IRelationRepository in the new way, they will affect how the nodes are ordered in CM.
I don't think the SortOrder in CatalogNode table is really used/set (I need to check again to be 100% sure, but that's from my memory)
It is not exposed on the NodeContent representation of the nodes. You'll have to use the low-level DTO API on ICatalogSystem: GetCatalogNodeDto, SaveCatalogNode.
However, I'm not sure the sort order will be used correctly e.g. when using IContentRepository.GetChildren to get the nodes. But it should be, and we'll make sure it is for Commerce 11.