• Hi

    I have a category that needs to show the products ordered by SKU number. The problem is my prodcuts have SKU number like this 11a, 11b, 11c, 12a, 12b 13c

    The ordering does not seem to take into account the letter part of the SKU number,also I have a SKU number that is 101 and this seems to come before the SKU 11a.

    How can I order these to how I mentioned above?

    Hope that makes sense.

    Really would appreciate help on this.

    Many Thanks

    https://ww.wp.xz.cn/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    When sorting by _sku you’d need to use orderby meta_value_num rather than meta_value. This would need changing in whatever code is powering your sku ordering – I don’t think thats WooCommerce core.

    Thread Starter davvam

    (@davvam)

    Hi Mike

    Thanks for the response. So would I have to edit a template file then?

    Thanks

    Plugin Contributor Mike Jolley

    (@mikejolley)

    I don’t know where the code would be. WC doesn’t sort by SKU on the frontend.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘SKU Ordering’ is closed to new replies.