Product navigation for products in same category
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Product navigation for products in same category
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
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
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
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
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
- m_plugables
- Commander (CMDR)
- Posts: 149
- Joined: Tue Mar 11, 2008 12:44 am
- Contact:
Edit Admin/Product/ProductMenu.ascx
and append the following html at the very end of the file
locate following line of code
and add following lines of code just below it
Locate following line of code in
protected void Page_Load(object sender, EventArgs e) function
and add follwing lines of code udner founded line
Add the following line of code inside the if (_Product != null) statement at the end
after modification the if statement will look like
Now add the following functions
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>
Code: Select all
private Product _Product;
Code: Select all
private int _CategoryId = 0;
private Category _Category;
protected void Page_Load(object sender, EventArgs e) function
Code: Select all
_Product = ProductDataSource.Load(_ProductId);
Code: Select all
_CategoryId = PageHelper.GetCategoryId();
_Category = CategoryDataSource.Load(_CategoryId);
Code: Select all
OtherProducts();
Code: Select all
if (_Product != null)
{
....
....
....
OtherProducts();
}
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();
}
}
}
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
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
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
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
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
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
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
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
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
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
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
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
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
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