- Posts: 237
- Thank you received: 5
Include category AND product in URL
9 months 4 weeks ago #369555
by ltempest
Include category AND product in URL was created by ltempest
-- HikaShop version -- : 6.x
-- Joomla version -- : 6.x
-- PHP version -- : 8.3.x
Hello,
So I have a menu category setup which when viewed on the frontend looks like:
/products/blowers-and-fans
When I go through to the actual product I get:
products/product/p24v-spal-twin-blower-005-b46-02-1019/category_pathway-19
The breadcrumb trail shows:
Products / Blowers and Fans / Twin Blowers / 005-B46-02 24v SPAL TWIN BLOWER 24v
How can I have the SEF browser url to reflect the breadcrumb trail as the url?
Thanks
-- Joomla version -- : 6.x
-- PHP version -- : 8.3.x
Hello,
So I have a menu category setup which when viewed on the frontend looks like:
/products/blowers-and-fans
When I go through to the actual product I get:
products/product/p24v-spal-twin-blower-005-b46-02-1019/category_pathway-19
The breadcrumb trail shows:
Products / Blowers and Fans / Twin Blowers / 005-B46-02 24v SPAL TWIN BLOWER 24v
How can I have the SEF browser url to reflect the breadcrumb trail as the url?
Thanks
Please Log in or Create an account to join the conversation.
9 months 3 weeks ago #369556
by nicolas
Replied by nicolas on topic Include category AND product in URL
Hi,
So, let's suppose that you have a menu item "Products", and then a sub menu item "Blowers and Fans".
By default, if you click on a product of that menu item, the link will be products/blowers-and-fans/product/xxxx
where xxxx is the alias of the product.
So, if you want the link to also include the "Twin Blowers" alias, you need to create a sub menu item with that category selected in its "main category" setting, and the "Blowers and Fans" menu item selected in its parent menu item setting.
This will give you the link products/blowers-and-fans/twin-blowers/product/xxxx
And the "product" part comes from the "Product SEF name" setting of the HikaShop configuration, so you can empty that setting if you don't want it. That will give you the link you want.
Note that this only applies when the "Force canonical URLs on listings" setting is turned off, or if you don't have a canonical URL in the product. Otherwise, the system will use the canonical URL of the product and not generate it dynamically based on the menu items structure.
So, let's suppose that you have a menu item "Products", and then a sub menu item "Blowers and Fans".
By default, if you click on a product of that menu item, the link will be products/blowers-and-fans/product/xxxx
where xxxx is the alias of the product.
So, if you want the link to also include the "Twin Blowers" alias, you need to create a sub menu item with that category selected in its "main category" setting, and the "Blowers and Fans" menu item selected in its parent menu item setting.
This will give you the link products/blowers-and-fans/twin-blowers/product/xxxx
And the "product" part comes from the "Product SEF name" setting of the HikaShop configuration, so you can empty that setting if you don't want it. That will give you the link you want.
Note that this only applies when the "Force canonical URLs on listings" setting is turned off, or if you don't have a canonical URL in the product. Otherwise, the system will use the canonical URL of the product and not generate it dynamically based on the menu items structure.
Please Log in or Create an account to join the conversation.
9 months 3 weeks ago #369574
by ltempest
Replied by ltempest on topic Include category AND product in URL
Great thanks that makes sense, I have now created sub menus for each category and the URL now is how I would prefer.
Thanks
Thanks
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.321 seconds