We are considering to build a custom PriceProvider which would plug into a ERP-type-of gateway. One of the requirements is that we can provide multiple prices for a given product (per user context).
1. When implementing a custom PriceProvider, I am able to override Product.Prices PriceCollection, allowing me to set any list of prices I want. Is this correct way to do this?
2. What is PreparePrices(Dictionary<Product, double> products) overload used for? As I understand it's a "high level" method where we would implement price caching for a product collection. What does the double stand for? Does it represent a dictionary of product and it's price? If so, we would also modify Product.Prices for multiple prices here? This method does not seem to take logged in user into account though?
3. What's the difference between PreparePrices(Dictionary<Product, double> products) and PreparePrices(ProductCollection products) overloads? Are they called from different contexts, and if so, what are they?
4. One of the FindPrice overloads accepts additional parameter of "double quantityAllVariants", what does that mean and how it should be utilized?
5. None of PreparePrices overloads takes user context as parameter - does this mean the prices here should not be loaded per user context, or do we need to fetch it from elsewhere? Solution we are building will consist only of user specific prices.
I am sorry but I find api documentation on this a bit lacking. http://doc.dynamicweb.com/api/html/46b0e0a8-5a77-3712-038d-c7fbc4e96346.htm
Thank you in advance,
Evaldas Raisutis