Selling individual tracks and albums in the same listing
For this we are using a third party plugin called AudioIgniter. It also has a pro version that can add even more functionality, so well worth checking out.
Much of the below has been taken from their support article here
Each track will be a separate product that will be hidden from the catalog view in order to avoid cluttering the shop listing pages. Let’s see how we can achieve this.
Creating the productsThe album product
We will start by creating a WooCommerce product which will be the entire album, this can be a physical product which will result in you sending the customer a physical copy of the album upon purchase, or a virtual/downloadable one, in case you only sell digital goods.
There is nothing special about this product for the moment, just create it, fill it in and publish it, more info on creating products can be found here.The track products
Now that the album product is done we need to create the track products. These will be downloadable products. Before publishing this product we will need to change its catalog visibility in order to hide it from product listings. To do that click the edit link under Catalog Visibility in the Publish metabox and select Search results only.
This will hide the product from the shop pages but it will be available in search results, in case someone looks for it. Now you can publish the product. Repeat this procedure for each album track.Creating the playlist
Now that we have created all our products we have to create the AudioIgniter playlist. If you haven’t created a playlist with AudioIgniter read below or if you need more detail then read the full article here. For this tutorial we need to focus on the Buy link metabox of each track in the playlist.
The following boxes need filling out (see image below) Title, Artist, Audio file or Radio Stream (for the preview) and Buy Link. Do not add a download URL here unless it is for free. There is more information on the buy link below.
To make this work what you need to add there is ?add-to-cart=ID where ID will be replaced with the numeric ID of each track product you created earlier. For info on how to find a product’s ID then hover over the item back on the product page and the ID will pop up. It also appears in the url string when you are editing that product.
After a visitor clicks the buy link the track product will be added to their cart and they will remain on the same page.It is preferable to leave the Open buy links in new window checkbox unchecked for this playlist.Finishing up
Once you are done adding all your tracks to the playlist, publish it, get the shortcode and paste it in the album product’s description box. What you will end up is something similar to this:
If you need any help just drop us a mail or use the chat widget.
Once again do check out the AudioIgniter Pro plugin iff you want even more functionality