• Resolved rickaahz

    (@rickaahz)


    Hi,

    I’m using WordPress Web Grabber in combination with Tablepress to make a comparison table of product prices.

    The Web Grabber works with a shortcode – this shortcode is in the Tablepress ‘price’ column. At page load Web Grabber places the prices (AJAX load) in the table. But after the prices are filled in, the column is not sortable (price low to high).

    The DataTables Javascript has been setup this way: “order”: [[ 1, ‘asc’ ]]
    Which is correct I assume because the table is sortable with normal prices (not shortcodes).

    Is there any way to fix this?

    Example found here.

    Thanks in advance!

    Rick

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    The problem likely is that these Shortcodes add more to the cells than just the price, for example extra HTML code. Also, they probably execute their JS code for the AJAX requests only after the sorting has been initialized. Due to that, the sorting algorithm simply doesn’t have access to the actual data that is to be sorted when it’s initialized 🙁

    Unfortunately, I’m not aware of an easy workaround here, sorry.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Tablepress Sorting’ is closed to new replies.