Blog Sections Open

Sorting pdoResources by Integer TV Values Correctly

A small but important pdoResources sorting fix for Evolution CMS catalogs and listings that use numeric TV fields.

If numeric TV values are sorted as strings, the result looks obviously wrong: 1, 10, 15, 4, 5, 9 instead of true ascending or descending numeric order. This is not a content issue. It is a type issue.

Typical symptom

A sort such as &sortby=`{"column":"DESC"}` produces lexicographic order because the TV is treated like text.

Correct direction

Tell the listing layer that the TV should be treated as an integer. In pdoResources and related tools, the fix is usually to set the sorting type explicitly rather than hoping the raw value will be interpreted numerically.

For Evo projects with price, quantity, weight, or ranking TVs, this is essential. Numeric data must be stored cleanly and sorted with the correct type, otherwise all higher-level listing logic becomes unreliable.

Newer post

Exporting Products to XML from Evolution CMS

How to think through XML product exports in Evolution CMS so the data structure, field mapping, and downstream consumer format all stay under control.

Older post

Making ajaxSubmit and eForm Work Together Reliably

How to combine ajaxSubmit and eForm in Evolution CMS so that validation, resubmission, and success states still behave predictably.