We still don't have code samples for most of the ECommerce parts, as it is a relatively new addition to Sitefinity and is being developed and changed with each release. However, you can share exactly what difficulties you are experiencing with the ECommerce API (the attributes in particular) and I will assist you in solving the problem.
Here's a sample code that gets a single product, then gets its variations for a specific attribute ("size") and for each variation gets the its relevant value. You can then add the values to a collection and bind it to the desired control. The same can be done for all the other variations.
CatalogManager mng = CatalogManager.GetManager();
var product = mng
.Where(p => p.Title ==
var variations2 = mng
.Where(v => v
var val = item.ProductVariationDetail.ProductAttributeValueParent.Title;
CatalogManager catMan = CatalogManager.GetManager();
var singleOptions = catMan.GetProductVariations(ProductItem.Id).Where(v => v.ProductVariationDetail.ProductAttributeParent.Name == "single-box");
But this gives me the following error:
I apologize, I skipped a part of the code when I pasted it. You should call .ToList() for the IQueryable collection, before filtering, as Open Access currently does not support nested Where clauses, here's the whole correct code:
The product variations in the Backend are ordered by their LastModified property, as far as I can see from my project. I cannot move/reorder them manually. Are you sure you can do that? If so, can you send me a video of that behavior so I can reproduce it locally? Thanks in advance.
I understand now. If you want to sort the attributes, then you will have to sort the collection that consists of attribute items values (which is actually the second collection that you are going to create). This means that you need to sort the final collection that you will create. You can do something like that:
List<ProductAttributeValue> list =
var val = item.ProductVariationDetail.ProductAttributeValueParent;
list.OrderBy(i => i.Ordinal);