Have a question here, :-)
I am trying to implement a custom price provider here
But something is wrong with "product.price.price" method.
Every single time I am trying to use it - it just brakes. :-?
I am using DW8 Pro 8.1.0.0
Here is the implementation...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Dynamicweb.eCommerce.Prices;
using Dynamicweb.Extensibility;
using Dynamicweb.Frontend;
using System.Data.SqlClient;
public class CustomDiscountPriceProvider : PriceProvider
{
public override PriceRaw FindPrice(Dynamicweb.eCommerce.Products.Product Product, double Quantity, string VariantID, Dynamicweb.eCommerce.International.Currency Currency, string UnitID, Dynamicweb.Frontend.Extranet User)
{
PriceRaw priceRaw = null;
if (User.LoggedIn && Product.Name.StartsWith("Ø"))
{
priceRaw = new PriceRaw(Product.Price.Price*0.75, Currency);
}
return priceRaw;
}
// ERROR MESSAGE
private void errorMessage(string status)
{
// Error message code...
}
}
Anything I am doing wrong here / suggestions?
Thanks in advance!
Regards,
Dmitrij