Support » Plugin: WP-Table Reloaded » [Plugin: WP-Table Reloaded] Sorting doesn't work properly

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    your observation is totally correct, and the reason is simple: Currencies are initially detected as “text” and text and numbers are sorted differently.

    To have that column sort correctly, some extra JavaScript code is necessary. Please take a look at this thread for more information:
    http://wordpress.org/support/topic/wp-table-reloaded-sorting-doesnt-work-properly-in-ie

    Regards,
    Tobias

    aktive

    (@aktive)

    Hi Tobias, thanks so much for your reply! So to fix the problem I just have to upload the currency sorting plugin to wordpress and activate it? Sorry for the basic question – I’m not very technical.

    WP-Table Reloaded is an awesome plugin BTW – I’ve made a small donation as thanks for your great work.

    Thanks, Andrew

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Andrew,

    thanks for your donatin, I really appreciate it!

    Yes, uploading that plugin and activating it should be sufficient. If everything goes right, this will hook into WP-Table Reloaded and the currency sorting functions.

    Regards,
    Tobias

    Hi Tobias. Great plugin, as you know.

    I have installed the currency sorting extension, but my columns still aren’t sorting correctly. I saw in some previous posts you said to add some code like

    "aoColumnDefs": [ { "sType": "currency_sorting", "aTargets": [ "column-8" ] }

    Is that still necessary? And how do I adapt the parameters for different tables?

    Many thanks. Ed

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Ed,

    yes, you will need to install that currency sorting Extension (and don’t forget to activate it!).
    Then, each table that has currency values needs a command like you posted, in the “Custom Commands” textfield in the “DataTables JavaScript Features” section on the table’s “Edit” screen.
    The part like "column-8" defines which column has the currencies. Just adjust that properly. For several currency columns in one table, you would use "column-2", "column-3", "column-7" with the correct column numbers.

    If you still can’t get it to work, please post the URL of the page/post with the table that you are trying this on.

    Regards,
    Tobias

    Tobias: Thanks for the fast response. All is now working great.

    Now I see how to set the right columns and I added the closing “]” which I had missed and I’m set.

    Thanks for all your work on this.

    I’m off to donate right now.

    Ed

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Ed,

    great that this works now 🙂

    Yes, the code needs to be exact, with all []{} characters, as the JS otherwise breaks.

    And thanks for wanting to donate, I really appreciate it!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Sorting doesn't work properly’ is closed to new replies.