I have a situation where I have product list pages on which I show products, bom products and variant masters (I don't show variants here) all mixed together.
There is also price filtering (min-max) and list sorting by price functionality available on the product lists.
On the product tiles of the standard products I show the price as it is: €XX,xx.
On the product tiles of the bom products I dont show a price at all because the products it consists of need to be configured (opted in/out, quantity, variant, etc) on the product detail page and no sensible amount for the package can be mentioned on the list page.
On the product tiles of the variant masters I show the lowest variant price: Prices from €XX,xx.
Now my problem:
The price values which I show on the product tiles must also become the value on which the sorting and filtering is done.
If not, the result will be akward an illogical. (the situation I'm in now)
I added a new column to the index, named ListPrice, which I now use for these functionalities in stead of the standard Price.
For regular products the price is simply copied to the new column
For bom products the value of the new column is set to 0
But for variants I can't get the price of the lowest variant to be set in the new column!
Nicolai told me WHY I cant get to product data to resolve such a price, that is because the IndexBuilder runs in a seperate thread and does not have access to System.Web.HttpContext, see: http://developer.dynamicweb.com/forum/ecommerce-standard-features/indexbuilderextender-keeps-giving-me-nullreferenceexceptions.aspx
But I have no idea how to achieve the desired funcitonality now.
I can't set the price of the variant master to the price of its lowest variant, because this price field is already used for other functionality.
This very sample was used during the technical sessions in Alkmaar last december (with Lars Hejgaard Sørensen) and adding a column to the index was opted as the solution ...
If I didn't have such custom bom products and just want the price slider to work with bom prices, wouldn't I run into the same problem?
Because the min and max prices used for this functionality also don't take bomitem prices into account and you have to do your own magic somewhere ...
How would you approach this problem?