Dynamicweb 8 Documentation
Discount Class
Members  Example 

Represents information about discount.
Object Model
Discount ClassPriceInfo ClassProduct Class
Syntax
'Declaration
 
<SerializableAttribute()> 
Public NotInheritable Class Discount 
   Implements Dynamicweb.eCommerce.Prices.IWithPrice 
Example
class MyPage : System.Web.UI.Page
{
   public void RenderDicountLoop(Dynamicweb.Rendering.Template template, Product product)
   {
       if (template.LoopExists("ProductDiscounts"))
       {
          Dynamicweb.Rendering.Template discountTemplate = template.GetLoop("ProductDiscounts");
          foreach (Dynamicweb.eCommerce.Discounts.Discount d in product.Discounts)
          {
              Dynamicweb.eCommerce.Discounts.Discount discount = d;
              Dynamicweb.eCommerce.Discounts.Discount.RenderDiscount(ref discount, ref discountTemplate);
              discountTemplate.CommitLoop();
          }
      }
   }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Discounts.Discount

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

Discount Members
Dynamicweb.eCommerce.Discounts Namespace

Send Feedback