Developer forum

Forum » Development » VariantCombinations on ProductViemModel returns list of empty combinations (version 9.7.2)

VariantCombinations on ProductViemModel returns list of empty combinations (version 9.7.2)

Roald Haahr Jensen
Reply

Hi,

Running 9.7.2, we are trying to show variant combinations for a product using a ProductViewModel with the property VariantCombinations. The list does contain the amount of variant combinations, but all properties on the VariantCombination's are set to null. Also, the list Variants is empty.

Best regards,
Roald


Replies

 
Martin Vang
Martin Vang
Reply

Hi Roald,

I can reproduce the problem related to VariantCombinations and have create a bug for that:

Bug 71093: Product view models does not correctly initialize it's own properties

Variants being empty seems like it might be related to Extended vs Simple variants? Simple variants are not part of that list. Is that what you expected?

BR

Martin

 
Roald Haahr Jensen
Reply

Hi Martin,

It sounds good with the variant combinations.

What is the reason that Simple variants are not included in that list? Both types of variants serves the same purpose, the only difference being that Extended variants offer more information.

Anyhow, using Model.Variants does not fit well in our scenario, where we want to list all variants for a product sorted by variant group. In this case, it would be nice if the view model had offered a list of variant groups, e.g. Model.VariantGroups.

Our workaround so far is to retrieve the product itself with Dynamicweb.Ecommerce.Services.Products.GetProductById(...) and then calling the .VariantGroups list on the product, but this approach makes the view model redundant. Therefore, let me make a feature request for making the VariantGroups available on the view model.

Best regards,
Roald

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Roald

The bugfix regarding #71093 has been released in hotfix version 9.7.3

To upgrade please choose this version from download:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

Votes for this answer: 1

 

You must be logged in to post in the forum