BUG: Print My Order - Digital good.. fix included
Posted: Tue May 25, 2010 1:41 pm
Im evaluating this product for a client. I dont have a customer account to submit bugs..(seems like a dumb restriction.. customer account for support [good idea].. customer account for bugs [really bad idea])
This is relevant to AbleCommerce 7.0.4 build 13424
When viewing the print my order page with a digital good on the page, the links to the download, the readme, and the agreement are all bugged. Basically the url and the onclick event are built up using a concatenated string(i.e. "page.htm\" onclick=\"blah;\"" ..bad practice). The value of this string is then used to set to the NavigateUrl property of an asp:hyperlink control. This causes the quotes to be escaped and the links to not work properly(i.e. href="page.htm onclick=").
Fixes:
PrintMyOrderPage.ascx
This one is probably wrong.. are there instances where this wouldn't load in a POPUP?
This is relevant to AbleCommerce 7.0.4 build 13424
When viewing the print my order page with a digital good on the page, the links to the download, the readme, and the agreement are all bugged. Basically the url and the onclick event are built up using a concatenated string(i.e. "page.htm\" onclick=\"blah;\"" ..bad practice). The value of this string is then used to set to the NavigateUrl property of an asp:hyperlink control. This causes the quotes to be escaped and the links to not work properly(i.e. href="page.htm onclick=").
Fixes:
PrintMyOrderPage.ascx
ConLib/Utility/OrderItemDetail.ascx<asp:GridView ID="DigitalGoodsGrid" runat="server" Width="100%" AutoGenerateColumns="false" GridLines="none" SkinID="ItemList">
<Columns>
<asp:TemplateField HeaderText="Name" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<a href="<%#GetDownloadUrl(Container.DataItem)%>"><%#Eval("DigitalGood.Name")%></a>
<%--<asp:HyperLink ID="Name" runat="server" Text='<%#Eval("DigitalGood.Name")%>' NavigateUrl='<%# GetDownloadUrl(Container.DataItem) %>'></asp:HyperLink>--%>
</ItemTemplate>
</asp:TemplateField>
ConLib/Utility/OrderItemDetail.ascx.cs<asp:Panel ID="AssetsPanel" runat="server">
<ul>
<asp:Repeater ID="AssetLinkList" runat="server">
<ItemTemplate>
<li>
<a href="<%#Eval("NavigateUrl")%>"><%#Eval("Text")%></a>
<%--<asp:HyperLink ID="AssetLink" runat="server" NavigateUrl='<%#Eval("NavigateUrl")%>' Text='<%#Eval("Text")%>'></asp:HyperLink>--%>
</li>
</ItemTemplate>
This one is probably wrong.. are there instances where this wouldn't load in a POPUP?
Note: i didnt see any code references to these controls anyway, so I didnt put a runat=server or id on the controls//SHOW ASSETS
List<ProductAssetWrapper> assets = ProductHelper.GetAssets(this.Page, _OrderItem.Product, _OrderItem.OptionList, _OrderItem.KitList, "javascript:window.close();");//"~/Members/MyOrder.aspx?OrderNumber=" + _OrderItem.Order.OrderNumber.ToString() + "&OrderId=" + _OrderItem.OrderId.ToString()