Shortcode for 'Product price/cart button' to allow support 'attributes and variations'
Allow the WooCommerce Shortcode for 'Product price/cart button' support 'attributes and variations'. Ideally I would like somthing like the following:
[add_to_cart id="" sku=SKU0001"",attributes id=""sides=both"",variation id="" qty=2000"",variation id="" price=76.00""]
If this was possible, then a button could be placed, on any page/post, or in a ideally in a pricing table.
Products could exist but not display in the shop.
This method would allow for pricing tables where multiple variations exist. Eg, if a customer wants a book printing, they need to choose, number number of pages in the book, the paper style and the quantity required. A pricing table for this product is the easiest way to display this infomration.
Shortcodes support variation IDs.
Diego Meozzi commented
Hello there, it seems Mike Jolley does know something we don't. Would you be so kind to share your knowledge and specify how we can add a variation ID to a WooCommerce shortcode?
Jake Weston commented
Hi Mike. Could you provide an example of how to use variation IDs in shortcodes? I'm not seeing in the documentation how to do so.
Like the original question, I would like to do something like [add_to_cart id="xxx" variation_id="xxx"]
Guys, a better alternative is custom "Add to Cart" URLs. I wrote a tutorial here, and explained how to create custom buttons that can add variations, grouped and single products to cart: http://businessbloomer.com/woocommerce-custom-add-cart-urls-ultimate-guide/
Hope this helps :)
Plus One for me!
Definitely need this asap!
Need this... Seriously!
please please add this, it will make woocommerce the best system for setting up music stores or digital stores out there and I know after months of testing all solutions etc!
I think this is the sort of thing I need, as I want to be able to have descriptions between each variation. I have a customizable product where there is a couple of steps and each step or variation needs explaining to help the customer make their choice. A way to single out the variations would be ideal. Seems an essential feature, I have been looking for it expecting it to be available!
Has this been implemented yet?
Yep. I third this request. It's clumsy as is, where a buyer has to be redirected to the shop page to select attributes... an extra step that seems unnecessary.
So is this possible? How do we add variations with shortcodes??
YES!!! ; this would be great ; it would be BEST if the product doesn't even have to exist in your woocommerce listings. Like all ecommerce engines, we should be able to add a product to cart (via shortcode) via URL or specs. For example [add_to_cart="product name", "price", "specs"]