Style DiscountList
Hallo all
We would like to style the discountlistview that are included in the checkout template, but we are unable to find where that is stored?
<orders:DiscountList runat="server" ID="discountRows"/>
Kind regards
Henrik Stensgaard
Hello Henrik,
Thank you for using Sitefinity.
Here is the template for that control. You can find all the templates for controls (frontend or backend) including the non-standard ones in the toolbox in the SDK.
<%@ Control Language="C#" %>
<%@ Import Namespace="Telerik.Sitefinity.Ecommerce" %>
<%@ Import Namespace="Telerik.Sitefinity.Modules.Ecommerce" %>
<%@ Register TagPrefix="orders" Namespace="Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI" Assembly="Telerik.Sitefinity.Ecommerce" %>
<
asp:Repeater
ID
=
"discountsListView"
runat
=
"server"
>
<
ItemTemplate
>
<
tr
>
<
th
>
<
div
>
<%# HttpUtility.HtmlEncode(DataBinder.Eval(Container.DataItem, "Title")) %>:
</
div
>
</
th
>
<
td
class
=
"sfDiscount"
>
<%# DataBinder.Eval(Container.DataItem, "SavingsAmountFormatted")%>
</
td
>
</
tr
>
<
orders:CouponCodeEntryListView
visible
=
"False"
ID
=
"changeCouponCodeEntryView"
runat
=
"server"
IsChangeMode
=
"True"
/>
</
ItemTemplate
>
</
asp:Repeater
>
<
orders:DiscountList
runat
=
"server"
ID
=
"discountRows"
LayoutTemplatePath
=
"~/YOURPATH/FileName.ascx"
/>
Hi Patrick
Many thanks for your reply. I think I get it, but I get the below error when i attach my own template. The template is the same as above also with the same names etc,, not changed yet?:
NullReferenceException: Object reference not set to an instance of an object.] Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.DiscountList.DiscountRepeater_ItemDataBound(Object sender, RepeaterItemEventArgs e) +121
How do I solve this with the ItemDatabound event?
Best regards
Henrik Stensgaard
Hallo again
Sorry I found the error. I had removed the CouponCodeEntryListView, that was causing the error.
Best regards
Henrik Stensgaard