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!

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.