Sorry! Internet Explorer is not supported on this site. Please view on Chrome, Firefox, or Edge.

Having fun at Zao is one of our values. We’ve put limited animated flourishes throughout our site to communicate our love of levity. We also recognize that onscreen movement is not fun or possible for everyone. We've turned off all our animations for you per your browser's request to limit motion. That said, we don't want you to miss out on the party.

Here's a funny joke to enjoy!

What’s a pirate’s favorite letter?

You think it’s R, but it be the C.

How To: Sort Variations in WP eCommerce

One of the neat things about WP e-Commerce is the vast array of filters and actions available.  I had a client ask me this week for a custom sorting routine for their variations on the front-end.

For anyone unaware – variations are essentially different attributes of a product.  If the product were a T-shirt, for example, variations would be Size (with Small, Medium and Large) as options or Color (Black, Red, Green), etc.

The code below would allow you to sort each group (and options within that group) according to a custom sorting algorithm.  A pretty handy little code snippet!

Leave a comment

Your email address will not be published. Required fields are marked *