SEF URL creation for products and categories

  • Posts: 61
  • Thank you received: 1
8 years 9 months ago #210614

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

Our store has 6 categories of products. An example of one category is clocks

When the user clicks into the clocks category we want the SEF URL to be ourdomain.com/clocks where the range of clock products are displayed. But at the moment, it displays ourdomain.com/category/clocks - how can we remove the "category" portion of this URL?

When the user clicks on of the clock products (for this example let's call it a "Big Red Clock", we wan the SEF URL to be ourdomain.com/clocks/big-red-clock. But at the moment, it displays ourdomain.com/product/5-big-red-clock - how can we remove the "product" portion of this URL and instead have it show the category of the product - in this case "clocks".

NB. Also, for some reason the product alias is including the ID number even though we have the SEF configuration setting for "Remove products and categories id in URLs" set to Yes. What is the product ID (in this case 5) not being removed?

Thanks in advance.

Last edit: 8 years 9 months ago by miwhel. Reason: Additional info

Please Log in or Create an account to join the conversation.

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
8 years 9 months ago #210627

Hi,

Create a hikashop category menu item named Clocks and with its associated category set to your Clocks category via the Joomla menu manager. Make sure that it is not below another menu item. The link of that menu item should be ourdomain.com/clocks
Then, enter that URL in the "canonical URL" field of your category and make sure that the "force canonical URLs on listings" setting of the HikaShop configuration is turned on.
You should then have the URL you want.
Then, if you have the "product sef name" setting emptied and the "remove products and categories id in URLs" setting turned on, you should automatically get the URLs you want for your products.
If you don't, it's probably that you already have another canonical URL entered in your products and you'll want to remove it in your products settings. That's also probably why you still have the id of the product in the URL even though the setting to remove it is turned on.

The following user(s) said Thank You: miwhel

Please Log in or Create an account to join the conversation.

  • Posts: 250
  • Thank you received: 7
8 years 9 months ago #210698

niwhel good luck with that! I wanted to do exactly the same as you, with the URL's reflecting the shop's category heirarchy. I have had to manually construct a menu linking all the shop categories together, then manually set the canonical URL''s of all the categories. I have 58 categories.

I haven't found the "force use of canonical URL" to help and abandoned the Hikashop content module in favour of a custom html module with the correct links (the left sidebar on my shop), this is a screenshot of my SEF configuration in Hikashop (Configuration menu | Features )



I am using SH404SEF but it doesn't support Hikashop so I have that set to use the joomla router, you should get the same results just using Joomla SEF.

There are a lot of posts regarding SEF in these forums and it is something that doesn't work at all well in Hikashop, and I would love the developers to acknowledge this and sort it out as it's almost been a deal breaker for me. These manual solutions are just not practicable on a large shop.

However - I have got it working now, my shop is www.artistpapers.co.uk It can be done and the URL's reflect the category structure (although it's still not entirely consistent). Setting it up shouldn't be too painful with a relatively small number of categories.

I'd be interested to hear if you can make Nicolas's suggestion work for you.

Ian

Attachments:
Last edit: 8 years 9 months ago by iedwards.
The following user(s) said Thank You: miwhel

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 1
8 years 8 months ago #211316

Thank you Nicolas and IEdwards.

It took a little time, but with your help I have got this working now.

Much appreciated.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds
Powered by Kunena Forum