Product navigation Next/Prev for products in same category

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Product navigation Next/Prev for products in same category

Post by jmestep » Sat Dec 20, 2008 12:38 pm

I'm working on some code someone else had written to put Next/Prev links on top of a product page for navigation to other products in that category. He has used a for each(CommerceBuilder.Catalog.CatalogNode ) in the code and that puts the Cxx Category number in the URL and I am trying to remove that. How do I turn that node.NavigateUrl into a product NavigateUrl?
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
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Product navigation Next/Prev for products in same category

Post by mazhar » Mon Dec 22, 2008 4:39 am

Try following

Code: Select all

node.ChildObject.NavigateUrl
Or

Code: Select all

switch (node.CatalogNodeType)
        { 
            case CatalogNodeType.Product:
                Product product = ProductDataSource.Load(node.CatalogNodeId);
                Response.Redirect(product.NavigateUrl);
                break;
        }

Post Reply