Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default a new URL router (SEO URL if you will) on it's way

    Hello all,

    I started working on a new URL router (some might call it SEO URLs).

    The router itself is already pretty much working, turning:

    http://www.example.com/index.php?mai...&products_id=1

    to

    http://www.example.com/product/products-name

    Notice, that there is no products ID visible...

    Same goes for categories

    http://www.example.com/index.php?cPath=12_20

    to

    http://www.example.com/products/hardware/mouses

    Again without category ID's.

    There is no need for upkeeping a complex database for the url aliases. The different id's are parsed automatically from names (I will be implementing a cache for this, which will cut back on the SQL queries). Also it does not require complex .htaccess rules, simply point all non-physical paths to index.php (~4 lines in .htaccess)

    Thus far it's a drop-in type of plugin and doesn't overwrite any core files.... It is only active when $_GET['main_page'] is not set (at the time the router is initialized), so the old style URLs will work. It does not interfere with normal zencart operation in any way. Non aliased parameters still get passed to the page normally, so sorting can still happen with the normal sort=a20 URL parameter (but this can be customized too if you want!)

    It also features URL aliasing, so you could make example.com/contact_us page show up as just example.com/contact if you wanted to.

    AND the biggest benefit (and why I started writing this), is that it supports TRANSLATING THE URLS...

    So I can have URL's in Finnish like:
    www.example.com/yhteystiedot open up index.php?main_page=contact us page, or
    www.example.com/tuotteet/laitteet/hiiret open up index.php?cPath=12_20

    The system uses a simple 3 column database (path, destination, language) as a routing table, which is needed for aliasing and language support... but if a native zencart page exists in includes/modules/pages/ with the same name as the requested route, it will use it automatically so you don't need to add pages to the database if you really don't want to.

    Further parameters (like cPath and products_id) are handled in a routing class that is attached to a static routing class on request, so they can be customized on page basis.


    Everything mentioned above is WORKING... What is not yet functional is generating the URL's with the default zencart url generating function and adding additional parameter parsing to pages that require it (ezPages etc...). I will start working on these on January 2014.


    But before then, I'd like to call out for a few testers that could start testing the plug-in when it's ready enough.

    Please contact me with private message.

    Oh, and merry christmas and a happy new year 2014 :)
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  2. #2
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: a new URL router (SEO URL if you will) on it's way

    Link generator now works, but still requires page specific routing classes implemented to generate proper links for products etc... (Product group links work already).

    Feel free to check out the progress at https://github.com/xpasi/ZenCart-smart-router

    There's no notifier "hook" in the zen_href_link() link generating function, so one core file edit is needed.
    Last edited by pasi; 9 Jan 2014 at 03:17 PM.
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  3. #3
    Join Date
    Sep 2008
    Posts
    210
    Plugin Contributions
    21

    Default Re: a new URL router (SEO URL if you will) on it's way

    I think this is a good plugin although there are some similar. Thank you.

    Also, I have quick view the code and you should add code for your to do list :)) it's very important.

    Chu
    Last edited by cvhainb; 9 Jan 2014 at 04:46 PM.
    Our Site: http://zucando.com
    Marketing Plugins: Marketing Modules
    Free Response Templates: Responsive Templates

  4. #4
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: a new URL router (SEO URL if you will) on it's way

    Thanks for the feedback.

    I'd consider this project as "not even released yet" state. So the actual todo list is written in a piece of paper and updated when I figure stuff out ;)

    Also currently the github page doesn't include an SQL file to create the routing table ... I'll add this later, when I'mcertain I don't need to alter it.
    Last edited by pasi; 10 Jan 2014 at 08:21 AM.
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

 

 

Similar Threads

  1. v139h I use seo url . can i install ultimate seo url ?
    By dmagic in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 6 Feb 2014, 11:38 PM
  2. v151 with ultimate seo Url,how to change the ez-page url ?
    By whywell in forum General Questions
    Replies: 1
    Last Post: 17 Jan 2013, 09:12 AM
  3. Do I use seo URL or normal URL when adding an internal link?
    By gaffettape in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 24 Oct 2009, 01:22 PM
  4. Ultimate SEO URL / General SEO URL question
    By fortune81 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 8 Jul 2009, 11:37 PM
  5. Magic SEO URL vs Ultimate SEO URL vs SEO_G
    By rmowles in forum All Other Contributions/Addons
    Replies: 142
    Last Post: 21 Sep 2008, 12:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg