Catalognode SortOrder

Vote:
 

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,

Jordan

#176284
Mar 15, 2017 6:21
Vote:
 

Hi,

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)

#176285
Mar 15, 2017 7:37
Vote:
 

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.

#176286
Mar 15, 2017 7:38
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.