Does anyone have a list of files that need to be edited to hide order history links?
A document similar to hiding wish list would be great.
How to hide Order History Button
Re: How to hide Order History Button
Here you go http://wiki.ablecommerce.com/index.php/ ... _-_AC_GoldTea-Dev wrote:Does anyone have a list of files that need to be edited to hide order history links?
A document similar to hiding wish list would be great.
Re: How to hide Order History Button
I had that link already to the wishlist. We were looking for one for hiding orders.
We ended up making teh following modifications to hide order history.
Website\Conlib/account/accounttabmenu.ascx.cs – remove orders from page_load
// construct links
NameValueCollection menuLinks = new NameValueCollection();
if (isRegistered)
{
//menuLinks.Add("Orders", "MyAccount.aspx");
//if (SubscriptionDataSource.CountForUser(user.Id) > 0)
//{
// menuLinks.Add("Subscriptions", "MySubscriptions.aspx");
//}
//if (OrderItemDigitalGoodDataSource.CountForUser(user.Id) > 0)
//{
// menuLinks.Add("Digital Goods", "MyDigitalGoods.aspx");
//}
}
//menuLinks.Add("Wishlist", "MyWishlist.aspx");
Website\Members\MyAccount.aspx – comment out the Grid
<div class="tabpane">
<%--
<asp:GridView ID="OrderGrid" runat="server" AutoGenerateColumns="False" Width="100%" SkinID="PagedList">
.
.
.
</EmptyDataTemplate>
</asp:GridView>
--%>
</div>
Website\ Members\MyAccount.aspx.c – comment orders grid in page_load
protected void Page_Load(object sender, EventArgs e)
{
//IList<Order> orders = AbleContext.Current.User.Orders;
//orders.Sort("OrderDate", CommerceBuilder.Common.SortDirection.DESC);
//OrderGrid.DataSource = orders;
//OrderGrid.DataBind();
}
We ended up making teh following modifications to hide order history.
Website\Conlib/account/accounttabmenu.ascx.cs – remove orders from page_load
// construct links
NameValueCollection menuLinks = new NameValueCollection();
if (isRegistered)
{
//menuLinks.Add("Orders", "MyAccount.aspx");
//if (SubscriptionDataSource.CountForUser(user.Id) > 0)
//{
// menuLinks.Add("Subscriptions", "MySubscriptions.aspx");
//}
//if (OrderItemDigitalGoodDataSource.CountForUser(user.Id) > 0)
//{
// menuLinks.Add("Digital Goods", "MyDigitalGoods.aspx");
//}
}
//menuLinks.Add("Wishlist", "MyWishlist.aspx");
Website\Members\MyAccount.aspx – comment out the Grid
<div class="tabpane">
<%--
<asp:GridView ID="OrderGrid" runat="server" AutoGenerateColumns="False" Width="100%" SkinID="PagedList">
.
.
.
</EmptyDataTemplate>
</asp:GridView>
--%>
</div>
Website\ Members\MyAccount.aspx.c – comment orders grid in page_load
protected void Page_Load(object sender, EventArgs e)
{
//IList<Order> orders = AbleContext.Current.User.Orders;
//orders.Sort("OrderDate", CommerceBuilder.Common.SortDirection.DESC);
//OrderGrid.DataSource = orders;
//OrderGrid.DataBind();
}