Jump to content

Plugin Frontend URL


Recommended Posts


While diving into the world of plugins, i was just wondering if there is a hook/function or method for plugins to use "pretty" urls on the customer facing side when loading a plugin created page

So instead of "?_a=plugin&plugin=plugin_name" it'd be "plugin/plugin_name" or just "plugin_name" getting added to the store URL




Link to comment
Share on other sites

Interesting. The 'friendly' URL would have to pass through the web server's rewrite feature to get:

Then, there must be that 'path' in the CubeCart_seo_urls database table. The query must return a 'type' of thing to go looking for. And if there is more than one of that type, the query must return an integer that identifies which one of that type to find.

CubeCart already knows how to process _a=plugin. So, one issue is getting the plugin to insert a record in CubeCart_seo_urls.

As with a product, the friendly path is associated with an item_id value.

The question remaining is, how to differentiate which plugin.

Link to comment
Share on other sites

If the plugin has an ID number. For example, this:

has a Ref:173/271, which means: Merchant #173, Product #271.

The plugin, when it uses the "class.cubecart.display_content" hook, first checks if it is the matching "item_id" from the database query.

So, I think it's entirely do-able, but the plugin needs to be coded to check for its name or item_id before running.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...