# Purchase Collection Shortcode

The `[[purchase_collection]]` shortcode 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 add-ons. 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.

### Input

This shortcode has some required input and some optional input.

##### Required

- **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&#039;s an example with only the required input:

```
[purchase_collection taxonomy=&#039;download_category&#039; terms=&#039;California Photos&#039;]
```

##### Optional

- **text**: This is the text that will appear on the button. It defaults to &#039;Purchase All Items&#039;
- **style**: This refers to the Buy button style. It defaults to `button`. Your choices for this option are in the [Style Settings document](https://easydigitaldownloads.com/docs/misc-settings/#general).
- **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](https://easydigitaldownloads.com/docs/misc-settings/#general).

Here&#039;s an example with all variables possible:

```
[purchase_collection taxonomy=&#039;download_category&#039; terms=&#039;California Photos&#039; text=&#039;Buy All California Pictures&#039; style=&#039;button&#039; color=&#039;red&#039; class=&#039;buy-all-button&#039;]
```

### Output

The above shortcode outputs a button that looks like this:
![](https://easydigitaldownloads.com/wp-content/uploads/2022/07/6184cc28b459e.png)

You can override the CSS to make it look like anything of course, but that&#039;s the default.

**NOTE**: the shortcode doesn&#039;t render any product info or description of the products other than the button label. To use this properly please make sure you have a good description of what will happen when people click the button.