Posted on 12/11/2020 09:06:52
Hi Adrian,
I think you need to handle this in your template by looping through the order lines and group them by product id and variant id / variant options.
This can be done by using dictionaries or some LINQ-fu. Once you have the information grouped then it should be simple to traverse this and render the matrix view.
You might be able to use the VariantInfos loop, which is rendered for each product, but I think you need an upgrade in order to use that.
It seems that your example would only work if...
- All products have two levels of variants (color and size).
- All variants of a product has the same unit price (850,00).
- Units and stock locations are not being used.
- There is no other important information on each order line, like points or custom order line details.
You should also consider how to present additional order lines, like discounts and taxes, if you are using any of those.
Best regards,
Morten