Developer forum

Forum » Development » Mising handling of sortorder in VariantGroups

Mising handling of sortorder in VariantGroups

Anders Ebdrup
Reply

Hi Dynamicweb,

I have identified what appears to be an issue in the variant group handling in administration - at least in DW version 10.22.15.

It seems that Dynamicweb does not use the database field VariantGroupProductRelationSorting when loading a product’s variant groups. Instead, the system appears to depend on the order in which rows are returned from EcomVariantGroupProductRelation.

This causes a problem when the row order in the table does not match the order of the variant IDs on the product. In those cases, the product’s variant list is not displayed correctly in administration.

A likely fix would be to explicitly sort the variant groups for the product by VariantGroupProductRelationSorting before they are used, rather than relying on the table row order.

So the issue is essentially:

  • the sort order is stored in the database
  • but it is not respected in code
  • and this can prevent the variant list from being shown correctly in administration when the row order differs from the variant ID order

The issue in the administration can be solved with this change:

You are very welcome to reach out to me if you would like me to test this on a concrete solution.

Best regards,
Anders


Replies

 

You must be logged in to post in the forum