Single Product in Category - Can We Skip the Category Page?

Hi All -



Maybe I am missing some simple setting somewhere, not sure.



If I have a category with only one product in it, and it will only have one product, forever… is there a way to skip the category display page, so when a user clicks on the menu item, it takes them direct to the single product?



Currently -



Root > Category of Products > Product



I need this for all other categories - but for this single category, I need:



Root > Product



I have already tried a 301 redirect, but as you can imagine, it loops.



Any advice is appareciated in advance,



MH

In case anyone is interested in my solution / workaround.



1 - I created a new category, and set it to hidden.

2 - I moved the single product to the new category, removing it from the original.

3 - I used a rewriterule to redirect and 301 the link in the catlog menu, to the product.



Again - this was a category in our store that will always and forever ONLY have ONE PRODUCT. I felt no need to stop at a category page…



For the end user - it goes from:



Home > Category > Product



URL: home.com/catagory/product.html



to



Home > Product (But the url string remains the same)



URL: home.com/catagory/product.html



Mark

Hi



Has anyone else come up with a non hard coded way to do this?



I need exactly the same thing but at some point may need to add another product or 2





I was pondering using php to do a location change if there is one one item in the product count, anyone have any suggestions on this?





Thanks



Lee

I just posted a similar message earlier today! Very strange. Could do with a mod when adding a category so you can apply a url to the category instead and then you could link directly to the single product.



I am still waiting for a solution to this!

How I would do this is:

create a addons/my_changes/controllers/customer/categories.post.php



Inside that file look to see if the count of products is zero and that there are no sub categories. If both those cases are true then redirect to dispatch=products.view&product_id=.



So if you’re at a leaf-node and there is only one product, go to the product detail page.