How to hide Order History Button

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
Tea-Dev
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Wed Oct 12, 2011 11:15 am

How to hide Order History Button

Post by Tea-Dev » Wed Apr 03, 2013 10:32 am

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: How to hide Order History Button

Post by mazhar » Thu Apr 04, 2013 2:49 am

Tea-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.
Here you go http://wiki.ablecommerce.com/index.php/ ... _-_AC_Gold

Tea-Dev
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Wed Oct 12, 2011 11:15 am

Re: How to hide Order History Button

Post by Tea-Dev » Thu Apr 04, 2013 10:08 am

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();
}

Post Reply