Add to Cart on CategoryDetailsPage
Posted: Fri Oct 23, 2009 10:48 am
I am trying to add an AddToCartLink to the CategoryDetailsPage by doing something like this:
But the catalogNode object doesn't have the property ProductId, so the above won't work. Is there a better way to do this?
Code: Select all
<asp:PlaceHolder ID="phCategoryContents" runat="server">
<!-- Top Bar -->
<div class="catalogWrapper" style="padding:0px;">
<asp:Repeater ID="CatalogNodeList" runat="server" OnItemDataBound="CatalogNodeList_ItemDataBound" EnableViewState="false">
<HeaderTemplate>
<table width="100%">
</HeaderTemplate>
<ItemTemplate>
<asp:PlaceHolder ID="phItemTemplate1" runat="server"></asp:PlaceHolder>
<uc:AddToCartLink ID="Add2Cart" runat="server" ProductId='<%#Eval("ProductId")%>' />
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
<SeparatorTemplate>
<tr><td colspan="2"><hr /></td></tr>
</SeparatorTemplate>
</asp:Repeater>
</div>
</asp:PlaceHolder>