Custom Seo Type


Has anyone got any experience with creating custom SEO types?

I am writing a knowledgebase addon for our backend that allows our service staff to record common issues with our products.

I want to have the following URL structure:

/knowledgebase - this is the root knowledgebase page (could use a page for this)

/product name - uses the product SKU

/question - the issue

Put together it would look like this:


I have had partial solutions working, but nothing that won't require modification of core SEO code.

The first approach that I took was to create a custom SEO schema for products and questions that adds onto the base SEO schema created by the SEO addon. But the issue appears to be that there can only be one SEO type above the base item in the tree.


'a' - is the SEO type used for a CS-CART page

'k' -is a custom type that I created for a knowledgebase product with a parent type of 'a'

'q' - is a custom type that I created for a knowledgebase question with a parent type of 'k'

The issue is if I go the the following URL:


It would look up the parent type for the question 'q' (which is k) and expect that all parents are of type 'k'... therefore to fails to match against the root knowledgebase page (type a) and the SEO lookup fails..

Without a core modification to the SEO code, to look up the parent type for each section of the hierarchy, this solution will not work.

The other solution I have tried is to use the custom type - 's' - that is defined by CS-CART and modify this schema to support a tree structure ('tree' => true) and use the dispatch column of the ?:seo_names table to render the appropriate templates. The other change made to the 's' schema is that the parent type is also 's'... That way custom types can be chained together.

But it requires me to modify the default CS-CART seo schema for 's' type to support the tree structure which might not work with future CS-CART upgrades...

I think the first approach makes sense to me, but I can't quite get it working...

Does anyone else have any experience with meeting the CS-CART requirements around this?


For this to work

Generally SEO isn't used in the backend.

I would suggest you utilize a separte piece of software that is geared toward that type of operation. You could then modify your '.htaccess' to launch it from your 'knowledgebase' path element.


But to me it makes sense to keep the operations for our products inside CS-CART rather than maintaining another piece of software.

The other advantage of using the backend for this is that you have access to all CS-CART functions and data so that data can be retrieved and modified, plus it keeps the UI consistent for non tech users

I ended up scrapping trying to utilise the built in CS-CART seo schema and reverted to my previous SEO methods of using 'get_route' hook to detect the URLs I am interested in - which is the way that the SEO addon does it...