Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Custom Seo Type Rate Topic   - - - - -

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 223 posts

Posted 28 September 2020 - 01:31 AM #1

Hi, 

 

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:

 

/knowledgebase/env1h-ss/my-fridge-is-not-turning-on

 

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. 

 

E.g.

 

'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:

 

/knowledgebase/env1h-ss/my-fridge-is-not-turning-on

 

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?

 

Thanks...

 

For this to work

 

 



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11807 posts

Posted 28 September 2020 - 03:52 PM #2

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.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 223 posts

Posted 30 September 2020 - 12:56 AM #3

Thanks... 

 

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...