When I’m not working on my Rails app (which is most of the time now), one of the things I do is help out with technical stuff for my wife’s business. (She makes handmade cards focused on pastoral care. It’s really neat. Check it out at Weavino Cards.)
I set her up with WooCommerce and she started putting up card designs. Like most card folks, she wanted to show the design then give people an option to buy multiple cards at a varying per-card price. WooCommerce has a built-in way to do this using their variable product feature. It’s really quite simple. You can set up attributes on a per-product or global basis, tie those attributes to the “variable product” type, assign different prices to each product, and you’re done.
Except it didn’t work.
She got a global “quantity” attribute set up, created a product and pricing using that attribute, saved a draft, and clicked Preview. What came up was a box with “Select Option” where the quantity selection was supposed to go, but no actual quantities. After some frustration with it, she asked me to help.
Google searches suggested all sorts of helpful things. Maybe the variations didn’t have a price (they did). Maybe they were out of stock (they weren’t). Maybe a custom filter needed to be added to make it work. I tried that, set up a per-product attribute, and success! However, global attributes still didn’t work.
Now I’m frustrated (and slightly cursing WooCommerce and WordPress). Into Firebug I go. I don’t know Javascript that well, so it’s a pretty entertaining thing. Let’s just say I spend enough time to respect the code they wrote but not enough time to understand it.
One last Google search. Someone mentions that publishing the product will show the global attribute. No… it couldn’t be… but it is. Publish the product, and there are all the options.
Sigh.