Try our conversational search powered by Generative AI!

SEO URL for the catalog contents

Vote:
 

Hi,

I am using EPI Commerce 8.5 and have enabled the seo friendly urls using  the CatalogRouteHelper.MapDefaultHierarchialRouter(routes, true);.

Now I have an Action that will change the page number of the category page. I have 

actionlink pionting the the action, but when change paging, it throws 404 execption. 

without CatalogRouteHelper.MapDefaultHierarchialRouter(routes, true); in initialization module, it just works fine.

Anything missing?

Thanks,

Syed

#114839
Dec 23, 2014 21:46
Vote:
 

The SEO flag turns on addresses like localhost/this-is-my-product.aspx. Is that the kind of URL's you are looking for?

Turning off the flag enabled addresses like localhost/my-catalog/category/subcategory/productname instead.

/T

#114842
Dec 23, 2014 23:18
Vote:
 

I am looking for  localhost/this-is-my-product.

But now the actions on the controller are not reachable anymore. E.g. I have more than 20 products on the category landing page and I want to switch to page 2. When I click on page 2, it goes to the same seo page /changepage action but returns a 404. 

e.g.  localhost/this-is-my-product/Changepage?pagenumber=2 returns 404. If I have the SEO flag off, then the /changepage?pagenumber=2 works fine.

#114843
Dec 23, 2014 23:38
Vote:
 

If you are looking for localhost/this-is-my-product you want the SEO flag on that's correct.

My guess is that the SEO route for Commerce does not allow an action after a SEO url (reflector the assemblies to check what the route is). You need to register your own route that allows for an action to be part of the URL.

One thing you can try is to use the index method (as that is the default action) and let it take in a page query parameter.

/T 

#114844
Edited, Dec 23, 2014 23:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.