Dynamicweb 8 Documentation
ISupportPriceInfo Interface
Members  Example 

To completely take over price calculation from eCommerce, create a class that implements this interface and overwrites FindPriceInfo
Syntax
'Declaration
 
Public Interface ISupportPriceInfo 
public interface ISupportPriceInfo 
Example
Take over price calculation of a product.
using Dynamicweb.eCommerce.Common;
using Dynamicweb.eCommerce.International;
using Dynamicweb.eCommerce.Products;
using Dynamicweb.Frontend;

namespace eCommerce.Prices
{

       public class NettoPriceProvider : PriceProvider, ISupportPriceInfo
       {

              public PriceInfo FindPriceInfo(Product Product, double Quantity, string VariantID, Currency Currency, string UnitID, Extranet User)
              {

                     if ((Product.ID.Equals("PROD2"))) {
                           Prices.PriceInfo info = new Prices.PriceInfo();
                           info.Currency = Context.Currency;
                           info.PriceWithoutVAT = 1;
                           info.PriceWithVAT = 1.25;
                           info.VAT = 0.25;
                           info.VATPercent = 25;

                           return info;
                     } else {
                           return null;
                     }

              }
       }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ISupportPriceInfo Members
Dynamicweb.eCommerce.Prices Namespace

Send Feedback