Posted on 09/09/2014 11:24:47
I tried making a proof of concept on the solutionset with version 8.4.1.15.
I am having different results but not good. This is driving me nuts.
1. First FindPrice is called and then
2. PreparePrices(Dictionary<Product, double> Products) with correct quantities but this is too late!
What is happening here?
Used the following dummy code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dynamicweb.eCommerce.Prices;
using Dynamicweb.eCommerce.Products;
namespace DummyPriceProvider
{
public class DummyPriceProvider : PriceProvider
{
public override PriceRaw FindPrice(Product Product, double Quantity, string VariantID, Dynamicweb.eCommerce.International.Currency Currency, string UnitID, Dynamicweb.Frontend.Extranet User)
{
return null;//base.FindPrice(Product, Quantity, VariantID, Currency, UnitID, User);
}
public override void PreparePrices(Dictionary<Product, double> Products)
{
//base.PreparePrices(Products);
foreach (var item in Products)
{
var val = item.Value;
}
}
public override void PreparePrices(ProductCollection Products)
{
foreach (var item in Products)
{
var val = item.Name;
}
}
}
}