- Hello I am building a intervaled price list table using Product.prices
When i have more than one price defined to a same quantity, it is necessary to Filter the loop, to avoid inconsistent data in Output (like in the attached image of test Product )
- I resolved that problem by ordering the loop by value and qty, ending with a distinctby to remove the duplicate qty
GetLoop("Product.Prices").OrderBy(x => x.GetInteger("Ecom:Product.Prices.Quantity")).ThenBy(x => x.GetInteger("Ecom:Product.Prices.AmountWithVATFormatted")).DistinctBy(x=> x.GetInteger("Ecom:Product.Prices.Quantity")).ToList();
This apparently resolves my problem, but i am assuming that when having multiple prices, the lowest is prioritary.
Is that a correct assumption?
Another question - does this the prices table reflect on "Ecom:Product.Price" tag? I added a few different prices assigned to qty=1, and none of them equal to the main product price.
Should we allow/show display of this data to a qty ==1, if that will not match the Main price presented in the PDP / PDL?
Best regards