Sami59100 Posted April 6, 2015 Share Posted April 6, 2015 Hi I have category page, with all its subcategories. And i'd like that when someone click on a subcategory, he is redirected automatically to the only product of a category. Because each subcategories has only one product, so I find it weird to arrive in a page with only one product listed, and having to click again. I want to delete a step. I've looked it up but can't find a way to do it, is it possible ? If yes, how ? Thanks ! Link to comment Share on other sites More sharing options...
amnesiak Posted April 7, 2015 Share Posted April 7, 2015 Maybe with url rewriting. You can modify your htacess file if you run your store on a Apache HTTP based server. Link to comment Share on other sites More sharing options...
Sami59100 Posted April 14, 2015 Author Share Posted April 14, 2015 Yes, but I'd have to do it manually for every product, and modify the .htaccess everytime I change products. I was looking for something to modify in the Category controller. I was thinking get the number of products in the subcategory in the controller, pass it to template, and in the template, if I see a subcategory with only one product, I directly link to the product instead of the category. But I don't know how to do this, or if there is a bette way to do it. Thanks ! Link to comment Share on other sites More sharing options...
Sami59100 Posted April 17, 2015 Author Share Posted April 17, 2015 No one knows ? Link to comment Share on other sites More sharing options...
Sami59100 Posted April 20, 2015 Author Share Posted April 20, 2015 Please. I use the htaccess technique for now, but it's not great as I explained... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now