• Resolved daveyk182

    (@daveyk182)


    When I try to sort by stock, it basically sorts them one character at a time instead of by the full number. Here is an example of how it sorts.

    146 In Stock
    1498 In Stock
    1566 In Stock
    167 In Stock
    1676 In Stock
    173 In Stock

    So it sorts one character at a time instead of the entire stock number.
    I couldn’t find a function dedicated to stock sorting in here, but thought if I added this code to the sortingData function in your custom.js file it would work, but it doesn’t seem to help.

    if(target_class === ‘.wptf_stock’ || target_class === ‘.wptf_stock.this_column_sorted’) {

    a = ( a.match(/\d+/);
    a = a[0];
    b = ( b.match(/\d+/);
    b = b[0];
    }

    Hope you can help. Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Sort by Stock’ is closed to new replies.