Music Importer
Posted by jghazally | Filed under wordpress, wp-e-commerce
Here it is folks my first solo Wp-e-Commerce music module. It’s been a great little summer project and I hope you think so too! So what does it do and how does it work? In short, you plonk your folder of music tracks and album cover in your `wp-content/uploads/music/` directory along with a couple of other files. You plonk the musicModule folder in the `wp-content/uploads/wpsc/upgrades’ directory. Login to your wp-admin click on the new Products Sidebar Link ‘-Music’ check the checkbox for the folders you want imported in as products, set a price for the tracks. Click Import and Presto! Your Wp-e-Commerce Website is now populated with all your tracks!
No Duplicating Products, or manually adding individual tracks required. A couple of clicks, and your almost out the door!
Requirements:
- Apache Servers only, I haven’t tested on IIS and don’t want to either~ Unless someones willing to pay me for the amount of stress and hair loss.
- PHP5 (I don’t think its a DEFINITE show stopper, but I don’t check every php function I use to see if it works in php4).
- WordPress 2.9 and Wp-e-Commerce 3.7.5 and above (what I developed and tested on)
- Basic Knowledge in WordPress, and FTP.
Recommended:
- I’m working on an mp3 music player and Wp-e-Commerce theme (not a WordPress theme just a Wp-e-Commerce theme) that will take advantage of this module. Until that’s complete I recommend coupling this up with the mp3 module by Instinct.
INSTALLATION
** This section requires users to login to their website using FTP to upload the module and music folders.**
- Make sure you are running WordPress 2.9 and Wp-e-Commerce 3.7.5 (or Higher)
- Unzip musicImporter folder, copy the folder to wp-content/uploads/wpsc/upgrades
- Create a folder called `music` in wp-content/uploads
- Add your albums into the `wp-content/uploads/music` folder you have just created
- Your Albums should follow these conventions:
- Folder Name = Album Name
- Track Name = Song Name
- One .jpg Image in each folder = Album Category Image
- NEW!Add a .zip file in your folder and that will create a product for your entire album!
- Login to the back-end of WordPress and follow setup instructions bellow.
SETUP
** This section requires users to login to the back-end of their website as an admin**
- From the wp-admin sidebar choose the link called `-Music` in the Products Section (Note if you don’t see this please check you have Installed the module as per Installation Instruction #2)
- Select a Parent Category for your albums, (I recommend `Albums` or `Tracks`
- You should see a list of Albums you have uploaded to `wp-content/uploads/music` with checkboxes. Select the albums you wish to upload (Try with a small amount say 1 or 2 albums first, some servers might have low memory usage limits which will return errors)
- Choose a track price (Omit the $ Currency symbol, only use numbers, say ‘1.75′.
- NEW!Choose an album price (Omit the currency symbol like above)
- Hit Import, don’t click twice, just wait a moment or two, you should be prompted with a ‘Success!’ message shortly.
Once all that’s done and over, you should checkout your `Products` page and check your tracks have been uploaded correctly!
The price for this module is $15.00 a small price to pay for something that saves you good time,
February 17, 2010 at 8:46 pm
This looks great, but I have a few questions:
1. Am I able to sell a complete album, or just tracks at a time?
2. Does each song reside on it’s own page, or are they all on an “album” page?
3. Can I preview each song using Instincts player module?
4. Do you offer free upgrades as time goes on?
Thanks!
February 17, 2010 at 10:09 pm
Hi thanks for the comment,
You just gave me a great idea! Thanks
1. & 2. The script is meant only to assist in the importing of tracks, it doesn’t compile a zip file to be sold as an album (which is the only way to do it at the moment)
You can have multiple tracks in multiple folders, each folders name will be used to make a category for the tracks inside it.
Then depending on your setup of the base plugin wp-e-commerce you’ll be able to view tracks on single product view and view them by ‘album’
If you check out vorn.co.nz that’s the site that inspired the script. All the tracks were uploaded using this music importer. The full albums were .zip files I uploaded seperately.
I guess I could make the script find a zip file and add that as an album,, I’ll do that when I get the chance.
3. Yes if you. Check out the above link the site uses instincts .mp3 module as well.
4. As for upgrades, sure if you keep your receipt with the download link you should be able to download the newer files at your leisure.
Thanks for the tip. Happy wp-e-commercing
February 23, 2010 at 9:12 pm
Nice work Jeff. Very interesting addon to the eCommerce plugin.
February 23, 2010 at 11:40 pm
The music folder should *NOT* be created in wp-content, but in wp-content/uploads ! Otherwise this script will not work
Jeff, would you allow me to alter this script for use with photos ?
February 24, 2010 at 6:46 am
Duh~ Thanks for spotting that, I’ve updated the Post and am reuploading the .zip file with correct readme now. Sure go ahead and alter the script, just note that for images you might have to change how the albumcover / category images get added.
February 28, 2010 at 5:32 pm
Hey Jeff,
Great plugin! Definitely thinking of using this on a client website.
One question:
Will it also work with PDF files? If not then can you give me an idea on how hard it is to make it work with PDF files instead of Mp3s?
The rest of the functions should be the same. But doesn’t require the instinct’s MP3 module.
Thanks and look forward to your reply!
February 28, 2010 at 6:32 pm
Hi Lee,
Should be easy enough to make it work with pdfs, you’d just comment out the preview file section and change the condition to .pdf instead of .mp3
March 1, 2010 at 11:14 pm
Hey sounds good!
I am no programmer, but I do understand some wordpress code. Would it be hard for me to comment out the preview section or messing it up?
I only have one day to make this work otherwise I will need to do everything manually. Client can’t wait
Thanks
March 17, 2010 at 3:12 pm
No hope for a reply?
March 17, 2010 at 7:49 pm
Sorry Lee,
Been really busy and thought you must have moved on. I don’t know how much experience you have with editting code, so I can’t confidently tell you how easy / hard you would find modifying the code , but if your just trying to import downloadable files exactly how it works for .mp3s then it shouldn’t be too hard at all.
Best
Jeff
May 13, 2010 at 10:41 pm
Hi Jeff,
I’m having a bit of problem getting the plugin to work.
Uploading folders with songs in it work fine and it can be selected in the admin page. But when I select a category it doesn’t show up on the products page. It does, however, come up on the products page in the admin.
Initially, it worked with only one of the categories, but I deleted the categories and made new ones, that’s when it stopped working…
Hopefully with a bit more poking around.. I can get to the bottom of this.
Thanks,
Roy
May 14, 2010 at 8:30 am
Hi are you sure you have your settings>presentation options correctly configured? I.e display all products? It sounds as though you have display only one category set somewhere.
May 15, 2010 at 7:21 am
I’m also having some trouble today. I feel like I tested this module in the past and it worked as described but now… not so much. Perhaps there’s an issue with the latest wpsc? Here is what hapens (while following your readme):
1. create folder “Album Name”
2. folder containers each “Track Name”.mp3 and a jpeg of the album cover
3. upload folder “Album Name” to uploads/music/
4. wp-admin -> Store -> -Music
5. select parent category, select the album (checkbox), add prices, click Import (once)
6. view Store -> Products and see all the tracks there
– all good up to here –
7. No product or subcategory created for the album
it’s likely that i’m overlooking or forgetting the extent of the module functionality. is the module just an importer for the tracks? I feel like something must be wrong, since we’ve set up the “album name”. or, is the solution to manually create a subcategory page that has display settings set to list the products w/ buy buttons?
thanks for your time on writing this module and any time you might have to respond here.
May 15, 2010 at 2:54 pm
Hi in unclear as to the problem? So the tracks get imported? That’s what the modules made to do,,, I extended it so u can add a .zip file I’m the album name folder and that gets added as a new product (full album product) is that what’s not working?
May 15, 2010 at 5:39 pm
Hi, yes that’s right. I can add all those. The folders show up in the admin. Choosing the folder, categories, price all work fine. And if you go into the products page in the admin, they’re all there, but just not assigned to a category (despite me choosing a category via the music module), thus not showing on the front end. Hopefully I’m making more sense?
May 19, 2010 at 8:49 am
Does this product also help to store ISRC codes? My music label customers absolutely require this in order to manage royalty payments to artists. I cannot find any reference to ISRC on the getshopped.com site and will also post to their forum.
From the wikipedia: The International Standard Recording Code (ISRC), defined by ISO 3901, is an international standard code for uniquely identifying sound recordings and music video recordings. IFPI has been appointed by ISO as registration authority for this standard.
http://en.wikipedia.org/wiki/Isrc
May 19, 2010 at 11:23 am
Hi I am unfamiliar with the ISRC so would have to say no,,, I am assuming it is a function rather than a download (my music importer only uploads the products, it doesnt serve any other function) However this is very interesting and will forward it to Dan the main project manager of Wp-e-Commerce and getshopped to see if we can work on this at some later date… I see huge benefits on integrating ISR with wp-e-commerce.
May 21, 2010 at 11:22 pm
Jeff,
Just wondering if you’ve had a chance to think about this problem… just this module is going to be a life-saver. would be a shame if it didn’t work properly.
Thanks for your help so far.
Roy
May 26, 2010 at 1:52 pm
Please disregard my earlier post (May 15, 2010 at 7:21 am) — it must have been a fluke. Categories are indeed being created. However, things fall apart if the album or song titles contain characters that need to be escaped. A urlencode() took care of things.
thanks for the helpful tool!
May 27, 2010 at 11:13 pm
How about WAV files. this plug is working with them?
June 2, 2010 at 5:45 pm
Well not this one but within this week I will be adding a new product to replace the music importer which will deal with wavs as well,, however with wavs you will not be able to have preview files using the instinct music previewer.
June 2, 2010 at 5:45 pm
Your welcome Im glad it worked for you.
best
jeff
June 16, 2010 at 7:27 am
I am also having problems with this plugin.
It should all be installed correctly.
After installation, I added a few albums, the first one worked splendidly, album art displayed next to each track, a subcategory was created for the album name.. Then I added another, a subcategory was created, but no album art.
I decided to delete all my products and categories and restructure the storefront.
Now when I upload an album (using the same files as the first time) the products are created with no album art, and not assigned to a parent category.
Also, even though my folders contain a zip file of the complete album, and I set a complete album price… no complete album product is created.
I hope this is just something silly.. otherwise, maybe it would be wise to consider not charging for it yet until it’s ready… especially since it’s marketed as a time saver. I’m going to end up going through each track individually anyway (with my pocket $15 lighter).
June 16, 2010 at 7:46 am
My issues seem related to the fact that instinct’s plugin doesn’t actually delete deleted products. Even after they’re deleted, the records remain in the wp_wpsc tables, this appears to be causing the issue.
June 16, 2010 at 11:15 pm
Hi Luke
Hmm that is very odd,
As I mentioned in my email to you, my music importer does not upload product images so don’t know how that worked for you to begin with, it uploads category images but not product images, the download manager however does upload images.
As for the issue with wpec and not deleting files I do not think that would be the issue, however I cannot say for certain yet since I have not had the chance to investigate, I was tied up till 9pm with work and am winding down after prepping myself for tomorrow ( going to a workshop to ‘flexing my wordpress muscles’ by an automattic WordPress developer!)
I’m sorry you felt this module was not $15 dollars well spent, it makes me sad that you feel that way, however the number of satisfied customers I do have makes me feel like my product does serve a purpose.
Best
Jeff
June 25, 2010 at 2:07 am
Hi Jeff,
I’m having some issues with the plugin; It’s installed, and does a great job of importing mp3’s (although sadly not if the file extension is uppercase) and grouping them etc, however, it’s creating some issues for me.
I’m using WP 3.0 and wp-ecommerce 3.7.6.5, on a MAMP local host, although I believe the issue was present prior to a 3.0 upgrade.
It seems the products aren’t being given a product id when uploaded with your plugin. This means that I can’t edit the products (or delete them!) that have been uploaded using the plugin. They don’t appear in the products list, unless I filter them by category. More crucially, it also seems to be throwing the checkout, adding 2 of the same product instead of 1. None of these issues arise when a product is manually uploaded… I wonder if you could share any light on how to rectify this?
Thanks,
Xander
July 3, 2010 at 1:16 am
I just need to know if this will display the prieview file in list view, which doesnt happen with the standard goldcart/mp3module combo.
jeff, i saw you posted a solution to getting the preview file to show in list view, but i must admit im not having any luck ;(
ive spoken to dan about this and took a premium token support ticket, but im not sure hell fix it.
im willing to pay a bit for help sorting out having your music downloader, plus preview AND donate ability with the list view.
please email me
regards
Anton
July 3, 2010 at 3:43 am
just bought music importer,
((
the catergory images dont show, and no list view with preview
could you spare some help jeff?
kin regards
Anton
July 9, 2010 at 7:22 pm
That is very peculiar it could be an issue with wpec as my code doesn’t add an ID since te I’d is automatically generated,, saying that I’ll be deprecating (discontinuing my music importer since it is pretty much a weak version of the download importer which kicks ass) it adds product images (one per album / folder) and does all sorts of files not just mp3s!!
Best
Jeff