Post by lukeketchum1 » Thu Jul 12, 2018 9:31 pm

Hello all, me again!

I have an issue with some products urls in OpenCart 3,

Here is an example URL
https://www.titancards.co.uk/pokemon/ca ... eroes-Card
This is correct, and how I want it to be. It shows the category tree that it belongs to then the card name.

Here is another example URL which also works
https://www.titancards.co.uk/Lt-Surges- ... eroes-Card
This excludes the category tree that it belongs to, yet still it works and loads the page.

Another example, with the same link
https://www.titancards.co.uk/pokemon/Lt ... eroes-Card
This includes the sort of parent category of the one that the product actually belongs to, and it also works

If you go to the products page (from any of those links, doesnt matter which) you will see related products block at the top right. The related product link always completely excludes the category name(s) from the url.

I faced a similar issue with menu's, when told to link to category pokemon > card singles > gym heroes, the category link would simply show as url.com/gym-heroes. instead of url.com/pokemon/card-singles/gym-heroes. Haad to do the menu links automatically in html as a result.

Is there a way to make it simply recognise the product/url from its most specific category? and a way for a sub category to only be referenced when first mentioning its parent categories?

Hopefully I didn't completely bodge that explanation :-) Please help!

Thanks

Luke

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by Qphoria » Thu Jul 12, 2018 10:21 pm

These are just canonical links. See this thread
viewtopic.php?f=190&t=185460&p=678651

Basically since a product can belong to multiple categories, it makes more sense to just direct link it

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by lukeketchum1 » Fri Jul 13, 2018 9:04 pm

Thanks for reply - I had a read that thread, and I am indeed trying to achieve the very exact thing that KDNovelties was talking about, the canonical link being set to always show a category, rather than always being set to just sitename.com/product-name i would want sitename.com/categoryname/product name, again for the exact same reasons.

I may have a go with the code that they posted, just not entirely sure where to put it?

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am

Post by lukeketchum1 » Fri Jul 13, 2018 9:15 pm

Another weird little point of note on this

I have other sections in my menu's which DO link properly (and they aren't manual links)
If you check the top menu of titan cards, and mouse over "Pokemon TCG" you will see links under 'Sealed Products' and 'Accessories & Other' - these actually link properly. Infact for that matter everything under all the other menu's has its full structured maincat/subcat/subcat urls too, its just literally the stuff under 'Card Singles' that decided it would link to a page that cannot be displayed :-S My small brain is badly wounded.

New member

Posts

Joined
Tue Jan 23, 2018 12:30 am
Who is online

Users browsing this forum: No registered users and 17 guests