Dynamicweb 8 Documentation
RenderDiscount Method
Example 

The discount.
The template.
Renders the discount.
Syntax
'Declaration
 
Public Shared Sub RenderDiscount( _ 
   ByRef Discount As Discount, _ 
   ByRef Template As Template _ 
) 
public static void RenderDiscount( 
   ref Discount Discount,
   ref Template Template 
)

Parameters

Discount
The discount.
Template
The template.
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();
          }
      }
   }
}
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 Class
Discount Members

Send Feedback