[purchase_collection] allows you to make a unique category-based collection of products to be sold as a package. Here are some examples:
- You sell a plugin that has some suggested addons. Put them all in a category and use
[purchase_collection]to show them all on one page. The customer can add them all to their cart with one click.
- You have a collection of documents or mp3s all grouped by category. You could make a page and show all the items in one category and the customer can add them all to their cart with one click.
- You have a collection of photos organized by category. You could make a page of just the photos from one category and the customer could add them all to their cart with one click.
This shortcode has some required input and some optional input.
- taxonomy: EDD comes with two built-in taxonomies, download_category and download_tag, you may use either of these.
- terms: These are the actual category terms you want to use. You may use more than one, comma separated.
Here's an example with only the required input.
[purchase_collection taxonomy='download_category' terms='California Photos']
- text: This is the text that will appear on the button. It defaults to 'Purchase All Items'
- style: This refers to Buy button style. It defaults to
button. Your choices for this option are in the Style Settings document.
- color: This refers to the color of the Buy button. It defaults to
blue. Your choices for this option are in the Style Settings document.
Here's an example with all variables possible.
[purchase_collection taxonomy='download_category' terms='California Photos' text='Buy All California Pictures' style='button' color='red' class='buy-all-button']
The above extended shortcode makes a button that looks like this:
You can over-ride the CSS to make it look like anything of course, but that's the default.
NOTE: the shortcode doesn't render any product info or description of the products other than the button label. To use this properly please make sure you have some good description of what will happen when people click the button.