Dynamicweb 8 Documentation
FindVatPercent Method (VatProvider)
Example 

The default vat percent.
The product.
Finds the vat percent for the product that should replace standard one.
Syntax
'Declaration
 
Public Overridable Function FindVatPercent( _ 
   ByVal DefaultVatPercent As Double, _ 
   ByVal Product As Product _ 
) As Double
public virtual double FindVatPercent( 
   double DefaultVatPercent,
   Product Product 
)

Parameters

DefaultVatPercent
The default vat percent.
Product
The product.

Return Value

Vat percent for the specified product
Example
The following example demonstrates how to create a VAT on luxury products (a sign that the product is a luxury suite will be the presence of the 'LUX' word in MetaKeywords field).
public class MyVatProvider:Dynamicweb.eCommerce.Orders.VatProvider
{
    public override Double
    FindVatPercent(Double defaultVatPercent, Product product)
    {
        Dynamicweb.eCommerce.Prices.PriceRaw ReturnFee = null;
        if (Product.Meta.Keywords.IndexOf("LUX") > -1)
            return 20;
        else
            return defaultVatPercent;
    }
}
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

VatProvider Class
VatProvider Members

Send Feedback