Magento Sort Attribute by Decimal not Alphanumerically

后端 未结 6 1686
刺人心
刺人心 2021-02-05 22:08

So I\'ve Googled like crazy to try and find a solution to this problem that actually works properly but have come up empty handed.

When using the Sort By function on a

6条回答
  •  攒了一身酷
    2021-02-05 22:39

    Regarding the "Attribute with Numerical Value" situation above. I had the same problem and what I did was adding ceros "0" in front of my values.

    For ex, my values were: 208, 209, 355, 1152 and 1153.

    I added ceros: 00208, 00209, 00355, 01152 and 01153.

    It works now!

    This post also helped me:

    http://blog.adin.pro/2014-04-30/magento-custom-sort-on-grid-sort-increment_id-by-numeric-not-alpha/

    Hope this help!

提交回复
热议问题