On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I need some advice for a lightweight and fast Ajax tree view being easy to integrate with a database.

    It must be independant from MODx and Wayfinder.

    The tree must display categories and a [+] sign let access subcategories.

    When a category is clicked, the products in it must be listed, as well as all those in subcategories. A comma separated list of products id would be ok.

    If for the products the tree already includes the possibility to retrieve some fields from the database and display them using templates and placeholders it would be very nice.

    A feature to move categories by drag and drop would be welcome, but this is not absolutely necessary. Furthermore, this functionnality should be switched off for the frontend.

    Currently, I'm using some nice software having such tree but it's a client/server standalone which is written in Java. I'm looking for the same feature in PHP. The database is PostgreSQL, but MySQL wouldn't be an issue as I can adapt the code.

    The categories in my database as stored with three columns:
    CODE: eg. 1.4.5.16.80.81
    CAT: eg. 81
    PARENT: 80

    The CODE field tells how the categories are chained.
    eg. 1 > 4 > 5 > 16 > 80 > 81
    I like this because it is relatively easy to understand how the categories are chained by looking at the database.
    Also, I assume that this makes faster to list all products from the sub categories.

    So, if you know some "Javascript (ajax) / PHP / Database" component storing the structure in a similar manner, it would be very nice, as making easier interfacing the standalone client that I'm using with the web client the I'm writing, linking the same database.

    Of course, free is better, but paid component would not be an issue if not too expensive.

    Last thing, I don't want to install a whole framework.

    Thank you very much for your suggestions. [ed. note: Jul last edited this post 3 years, 4 months ago.]