0

I have a single product and I'd like to link straight to it from the category button is this possible?

For example I have a category called "custom Cut Board"

I only have one product attached to the category. To reduce clicks I would like it when they click the category title it goes straight into the product page.

Any ideas?

Thank you.

1 Answer 1

0

Yes this can be done by using the URL Rewrite Management option in Magento Admin.

In Magento Admin:

  1. Select from menu bar Catalog > URL Rewrite Management.
  2. Click on the Add URLRewrite button.
  3. Select the category you want to redirect from.
  4. Make a note of the ID Path (e.g.: category/10) and the Request Path (e.g.: flowerpots.html)
  5. Repeat steps 1 & 2, but this time select Custom from the Create Urlrewrite dropdown box.
  6. Enter the values in each field:

    • ID Path (from step 4)
    • Request Path (from step 4)
    • Target Path - enter path of your product (or the page you want to redirect to).
      • example 1: for product url www.myswebsite.co.uk/flowers.html enter flowers.html.
      • example 2: for product url www.myswebsite.co.uk/sale/garden/flowers.html enter sale/garden/flowers.html.
  7. Select Redirect Permanent (301) from the Redirect dropdown.

  8. Save.

Now when the category is clicked on on your website it will re-direct to the product. For more see here.

OR

You can can do this by creating observer controller_action_predispatch_catalog_category_view

5
  • Thank you for the detailed answer. Unfortunately it still doesn't go directly into the product page it just takes you to the original category page? Any ideas? Commented Nov 12, 2017 at 9:21
  • Ok. Redirect works until a re-index and cache clear is done. Once this is done and I go back into the custom URL rewrite it reverts the target patch to category/id/484 or what ever it was before Commented Nov 12, 2017 at 9:38
  • If, its not worked then try by creating a module with mentioned observer. Please check your rewrite rule again and make sure your created rule still exists there.
    – Arunendra
    Commented Nov 12, 2017 at 9:43
  • Hello, how do I create an observer? I've never worked with that before? Commented Nov 12, 2017 at 9:44
  • You can get the example from here magento.stackexchange.com/a/41280/21339
    – Arunendra
    Commented Nov 12, 2017 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.