Sorting Product order in WP-Ecommerce with Short Code

This is a quick little snippet I am sharing because it helped me out alot and was VERY difficult to find actual documentation on it.  I had been trying to sort the products on a client’s website for some time now and the built in product sorter on WP-Ecommerce was not working at all . The goal was to sort the products in alphabetical order starting from “A” and going down.  For some reason the site had them in reverse alphabetical order and I do not know why. So, here is how to sort your products by using shortcode with WP-Ecommerce:

If your product shortcode looks like this: [wpsc_products category_id=’2 ‘]

You will want to simply add this: order=’name’

So your final product would be [wpsc_products category_id=’12 ‘ order=’name’]

That’s it! Should work. You may be able to use other “order” functions but I have not tried that out. Hope this helps!

This Post Has 3 Comments

  1. Andrew Miller

    I have not been able to get this to work.

    WP-Ecommerce 3.8.7.5
    WordPress 3.3.1

    I would like to sort all products alphabetically by name, ascending. I cannot make this happen when viewing a category.

    Like this category: ‘Poetry’ http://www.bannerbooks.ie/shop/poetry/

    1. Anonymous

      Looks like you got it sorted alphabetically from my end. Did you use the shortcode above or did you have to do something else?

  2. Anonymous

    Looks like you got it sorted alphabetically from my end. Did you use the shortcode above or did you have to do something else?

Leave a Reply

Get in Touch

Please fill out the form below and we will get back to you ASAP

  • This field is for validation purposes and should be left unchanged.