Change product order (product listing page)

Hi,

This seems like an obvious question but I cannot find a way to order products so the most important ones are at the top of the product and category pages.

When adding a product listing widget to the homepage, which is cool, there is an option to order by product ID, but I cannot find anyway of setting the ID, which is clearly generated automatically. Changing the SKU doesn’t have any effect.

I could go into the database, of course and change it there, but is there not an easier way of controlling the order products appear?

Thanks!

Arthur

  • DavidM
    • DEV MAN’s Mascot

    Hi Arthur and welcome to WPMU DEV!

    Those types of things can be done one of two ways really, either by creating template files where you utilize MarketPress template functions or by creating separate pages where you use shortcodes to present a customized list.

    The shortcodes for MarketPress are all detailed in Products > Store Settings > Shortcodes tab. You can include them in any of your content.

    However, to actually customize the standard Product page listing as well as category archives, you’ll have to create template files from your theme’s template files, then use MarketPress template functions, similarly to using shortcodes.

    This process is detailed in the file Themeing_MarketPress.txt, which resides in the MarketPress folder and also here for a quicker reference.

    http://plugins.svn.wordpress.org/wordpress-ecommerce/trunk/marketpress-includes/themes/Themeing_MarketPress.txt

    Hope that helps, please let us know any further questions you have on this!

    Thanks,

    David

  • Arthur
    • The Incredible Code Injector

    Thanks for the detailed reply, David.

    Can I log this as a feature request, as I don’t particularly want to be customising themes and I think listing products in a non-random way (without having to delete and re-enter them in a specific order every time you launch a new product) is a logical and reasonable requirement.

    My limit has been to create a custom css to comment out the buy now button as the “Product listing only” function doesn’t work. I don’t remember seeing specific instructions on this so maybe I should write some myself and post them on the forum..:slight_smile:

    Arthur

  • fitoussi
    • The Incredible Code Injector

    Hi Arthur

    I was looking to do a similar thing in a project I was working on. My first thought was to create a custom filed for example “my_product_Id” and to each product give this field a value as a number. Then I could probabley modify the posts query using “orderby=meta_value&meta_key=my_product_id” to display the product by the numbers you gave to each of them. I didn’t acomplished that as I disided not to do it this way. But it may be the way you could do it.

  • Arthur
    • The Incredible Code Injector

    Thanks, @fitoussi – that’s certainly an option, though it would mean reverting to using posts instead of the MarketPress plugin, as products don’t currently support custom fields (though I guess if one is modifying the query anyway, it’s probably just as viable to modify the plugin itself). I’m a bit nervous about doing either to honest, not least because of the extra effort when upgrade time comes.

    Maybe the nice people at WPMU Dev could build that idea in..!

  • fitoussi
    • The Incredible Code Injector

    Yeah, sometimes it takes a little affort to archive what you want. But I always find my self digging into plugins to modify things so I could get it to work the way I want. A New plugin comes out and hour later there are already lots of Wanted new features that people posting. Its never enough. It’s also kinda “fun” to get your hands little dirty and you get to learn alot.

    Marketplace works with custome post type so you can do and modify it in many ways.

    Drop the line below to the functions.php file:

    <?php add_post_type_support( 'product', 'custom-fields' ) ?>

    this will “turn on” you product custom fields. You can add new fields but don’t mess with the custom fields that are already there.

  • baselb5
    • Flash Drive

    Is there an update for this? I was going into the individual product and manually changing the publish date in order to achieve a specific product order. That does not seem to be working anymore. Random order looks really silly. I can barely manage the updates every few months. I’m not able to go in and modify. A drag and drop option would be super… like re-ordering photos in FaceBook, Picasa, etc.

    Thanks

    Cara

  • fordrm
    • Site Builder, Child of Zeus

    Any update on getting this one resolved?

    The ability to manage the display sequence of products is something that should be standard functionality, I think. As it is, it is hard to explain to a client, and impossible for them to do on their own.

    Thanks in advance,

    Robert Ford

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.