Product navigation for products in same category

Post feature requests to this forum and a pre-configured poll will automatically be created for you.
Post Reply

How important is this enhancement to you?

It's a critical enhancement that I must have.
1
100%
It's an important enhancement but others are more critical.
0
No votes
I'd like to have it but it's not that important.
0
No votes
I'd never use this feature.
0
No votes
 
Total votes: 1

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Product navigation for products in same category

Post by jmestep » Mon Mar 24, 2008 5:49 am

This was very nice in 5.5--to show the product navigation on top of product display for all the ones in the same category. Right now, you have to click back in to the category to find the next product in category.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Will
Captain (CAPT)
Captain (CAPT)
Posts: 263
Joined: Fri Oct 05, 2007 8:02 am

Post by Will » Mon Mar 24, 2008 7:17 am

I second this request.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Post by jmestep » Mon Mar 24, 2008 9:33 am

If I ever figure it out, I'll post the code.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Post by m_plugables » Wed Mar 26, 2008 5:59 am

Edit Admin/Product/ProductMenu.ascx
and append the following html at the very end of the file

Code: Select all

<br />
<asp:Panel ID="MoreProductsPanel" runat="server">
<asp:GridView ID="OtherProductsGrid" runat="server" AutoGenerateColumns="False" 
        Width="100%" SkinID="PagedList"  AllowSorting="false" OnRowCreated="OtherProductsGrid_RowCreated"  >
        <Columns>                                
            <asp:TemplateField HeaderText="Other Products">
                <ItemTemplate>
                    <asp:HyperLink ID="ProductLink" runat="server"  />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>            
    </asp:GridView>
</asp:Panel>
locate following line of code

Code: Select all

private Product _Product;
and add following lines of code just below it

Code: Select all

private int _CategoryId = 0;
private Category _Category;
Locate following line of code in
protected void Page_Load(object sender, EventArgs e) function

Code: Select all

_Product = ProductDataSource.Load(_ProductId);
and add follwing lines of code udner founded line

Code: Select all

_CategoryId = PageHelper.GetCategoryId();
_Category = CategoryDataSource.Load(_CategoryId);
Add the following line of code inside the if (_Product != null) statement at the end

Code: Select all

OtherProducts();
after modification the if statement will look like

Code: Select all

if (_Product != null)
{
....
....
....
OtherProducts();
}
Now add the following functions

Code: Select all

private void OtherProducts() 
    {
        CatalogNodeCollection catalogItems = CatalogDataSource.LoadForCategory(_CategoryId, false);
        CatalogNodeCollection products = new CatalogNodeCollection();
        foreach (CatalogNode cni in catalogItems)
        {
            if (cni.CatalogNodeType == CatalogNodeType.Product)
                products.Add(cni);
        }
        OtherProductsGrid.DataSource = products;
        OtherProductsGrid.DataBind();
    }

protected void OtherProductsGrid_RowCreated(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            CatalogNode catalognNode = (CatalogNode)e.Row.DataItem;
            Control control = e.Row.FindControl("ProductLink");
            if (control != null)
            {
                HyperLink pLink = (HyperLink)control;
                pLink.Text = catalognNode.Name;
                pLink.NavigateUrl = "~/Admin/Products/EditProduct.aspx?CategoryId=" + catalognNode.CategoryId.ToString() + "&ProductId=" + catalognNode.CatalogNodeId.ToString();
            }
        }
    }

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Post by jmestep » Wed Mar 26, 2008 10:00 am

Wow, thank you, thank you, thank you. I was dreading trying to do it. I'm still trying to figure C# out.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Post by jmestep » Wed Mar 26, 2008 12:03 pm

This works in the admin by creating a menu under the normal left nav menu so it is easy to flip thru the products.
I was looking for something on the product display page of the store. In 5.5, Able had product paging where it would say something link Product 1 of 16 Next >> above the product image and under the breadcrumbs.
Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Post by jmestep » Wed Mar 26, 2008 1:26 pm

This works in the admin by creating a menu under the normal left nav menu so it is easy to flip thru the products.
I was looking for something on the product display page of the store. In 5.5, Able had product paging where it would say something link Product 1 of 16 Next >> above the product image and under the breadcrumbs.
Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Post by jmestep » Fri Mar 28, 2008 9:09 am

This is really a help to the merchant in the admin. After thinking about it, I might try to use it on the store product pages, only in several columns. The advantage it has over Product 1 of X Next>> is that it shows the product name to the customer.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Post Reply