Page 1 of 1

BUG: Print My Order - Digital good.. fix included

Posted: Tue May 25, 2010 1:41 pm
by werD
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
<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
<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>
ConLib/Utility/OrderItemDetail.ascx.cs

This one is probably wrong.. are there instances where this wouldn't load in a POPUP?
//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()
Note: i didnt see any code references to these controls anyway, so I didnt put a runat=server or id on the controls

Re: BUG: Print My Order - Digital good.. fix included

Posted: Tue May 25, 2010 6:42 pm
by Shopping Cart Admin
Howdy,

We use digital goods a lot in our store, so I'm not sure you've actually found an issue, but thank you for your detailed report. I'm sure one of our developers will have comments.

Re: BUG: Print My Order - Digital good.. fix included

Posted: Wed May 26, 2010 7:14 am
by werD
Shopping Cart Admin wrote:Howdy,

We use digital goods a lot in our store, so I'm not sure you've actually found an issue, but thank you for your detailed report. I'm sure one of our developers will have comments.
Most people probably wouldnt notice it because you have to purchase a digital good, then hit the print button, then try to click a license agreement

Re: BUG: Print My Order - Digital good.. fix included

Posted: Wed May 26, 2010 11:56 am
by mazhar
Hi Drew, thanks for letting us know about this. I can see in my development install that these are not working on print page. I have crated a new issue in our logs you can track progress on it here http://bugs.ablecommerce.com/show_bug.cgi?id=8907

Re: BUG: Print My Order - Digital good.. fix included

Posted: Wed May 26, 2010 12:47 pm
by werD
mazhar wrote:Hi Drew, thanks for letting us know about this. I can see in my development install that these are not working on print page. I have crated a new issue in our logs you can track progress on it here http://bugs.ablecommerce.com/show_bug.cgi?id=8907
Thanks Mazhar!