Grid display order by stock?

Home Forums General Help Grid display order by stock?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4353
    Mike
    Guest

    Is there any way to order the grid on the product page by inventory, so products with current stock will show first? thanks.

    #4362
    Kelvin
    Keymaster

    Sadly, this is not there by default.

    We’re using the standard WordPress “orderby” functionality which only takes:
    -date
    -title
    -post ID

    This is a part of the WordPress ‘query posts’ function: http://codex.wordpress.org/Function_Reference/query_posts

    To do what you want to do, you might have to change this to use your own custom function.

    #4371
    Mike
    Guest

    wow, that opens up a whole new can or worms. I dont think i have the time to tackle that one. My limited knowledge on this would make it quite difficult to achieve.

    #4375
    Mike
    Guest

    have any idea how i would start working on this?

    #4388
    wham
    Guest

    Actually, I was thinking about this and it is not so difficult.

    The stock amounts are JUST another custom field attached to the products.

    It should be easily possible to use an ordinary WordPress ‘query posts’ function to list products and then order them by the stock custom field.

    Of course you’d need to actually write the code that does the ordering but being able to use query posts is a big + 🙂

    #4436
    Mike
    Guest

    Well maybe someone could write it as it could be very useful.

    #4460
    wham
    Guest

    No promises on delivery date but it was interesting enough that I am working on it. 🙂

    #4480
    Mike
    Guest

    I would love you forever if you did….

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Grid display order by stock?’ is closed to new replies.
© 2024 DukaPress. All rights reserved.
Design By Madoido.