(moving a discussion that started in an issue queue to here so it can continue)

Key previous comments in the discussion:

Wilgrace: The problem is I'm working with Audio files, and you can't preview the song until after you've paid for it (at which point you can also download it). 4.x seems to have resolved this issue, so I'm stuck in the middle

Reply from me:

Hi wilgrace..

It's worth noting that the audio module + private files (under site config-> FILE SETTINGS) doesn't stop people downloading the mp3s.

"Stream catchers" are almost default downloads now with products like real player (which includes a one-click "download this video/audio" link wherever there's music/video being previewed) or songbird...my new favourite browser, which goes a step further and automatically rips audio from a webpage and plonks it into your music folder.

The only drupal site with audio that I've come across with well protected audio streams is here: http://www.the4ofus.com/classified_personal (there's a thread about it here: http://groups.drupal.org/node/10869 ).However, even that album preview page is limited to 2:00 minutes per song..it's still pretty easy to guess the link to the audio by looking at source.

So, the only workaround I can see is to create file products with an attached audio preview (2:00 minutes) with a file attachment for the file product (the item people buy) in either zip or mp3 format. Or create the previews seperately from the file productsand use the views.module to dynamically create the cart link to the file product nodes.

not sure if that makes sense or not..it's late. but, I hope it is of some use.

Follow up from wilgrace

Actually, hang on a second - you can't create an audio node as a file product, attach a file to the same node and have different priviliges on the audio to the attachment.

In which case your second suggestion might well be the one, but I'm not so versed in views - is this what you're saying:

1. Create an audio node - not a product. This is the 30sec preview that will feature on the homepage or wherever.

2. Create a separate file product and attach the full length track (possibly zipped up).

3. Create a link to the file product on the audio node using views. This is the bit I don't get - any way you can tell me how to go about it?

--------------------------------------------------------------------------------

Hi again wilgrace...I've moved the discussion here, out of the issue queue.

Try this:

  1. Under ADMIN -> SITE BUILDING -> MODULES enable the AUDIO_ATTACH.MODULE
  2. Go to ADMIN -> CONTENT-> CONTENT TYPES -> FILE PRODUCT and enabled the 'audio attach' option for file products
  3. Now you can use VIEWS to display the 'attached audio' as a preview,alongside the 'add to cart' option

In other words, the audio_attach.module allows you to attach your 30 second audio clip to the file product...in the same way as you might attach an image. You use views then to control which fields are displayed in your album preview page...

hope that helps

Comments

wilgrace’s picture

Thanks for persisting with this mate, much appreciated.

I reckon you've got a good approach here - attaching the preview (30sec) audio to a Product (file download) lets you play the audio in teaser and node (without even using Views), which is perfect. So now all I need is to enter the file path of the full length track so that people can pay for and download it.

Problem is I'm up against the same old problem with file download product in ecommerce 5.x-3.4 - No matter what I do I can't get the link to the downloadable file to show up after a transaction goes through. I'm imagining it'll appear as a link (like an attachment) at the bottom of the node - but no show.

To test, I've been creating the product on browser 1, adding it to my cart and 'paying' for it in browser 2, then going to browser 1 at admin/store and changing the latest payments pending to 'completed'. I then refresh browser 2 but it still just shows the 30sec flash audio player. No download link.

Is this a problem in 3.4? I've looked around the forums but can't find a similar problem.

thanks again

Phillip Mc’s picture

When you've paid for the song..it should appear under MY ACCOUNT -> MY FILES.

If you're using the COD module to test the payment system..., go to the COD settings page...and select MARK AS COMPLETED for each transaction. That means Drupal ecommerce automatically marks the transaction as completed...so the files should be there and available for downloadafter you submit the order and run CRON.php (www.example.com/cron.php) - running Cron is important as it updates all the ecommerce tables and transactions. If you are not sure how to setup cron jobs with your host...download and install the poormanscron.module which is very lightweight (small in size) and is very useful for that.

to recap...

(a) if you're testing using the COD module, go to the COD settings page and select MARK AS COMPLETED
(b) go through your test transactions
(c) run cron, by pointing your browser to www.yourdrupalsite.com/cron.php (or download the poormanscron.module)

I was playing around with the file product module a while back (with ecommerce version 3.x-dev) and it worked very well. I really liked the option to automatically generate the user account and login for anonymous purchases.

post back up here if you get stuck.

wilgrace’s picture

Still going strong...

Everything you've got me to do so far has been magic, and works a charm for registered users. However, the crux of the whole thing is in getting anonymous purchases working (this is why I've been going round in circles, as I was only testing anonymous).

I go through the steps above and run cron, but I neither get an email confirmation nor access to the file - how exactly should an anonymous user be able to view/download the file without access to 'My Files'? The link doesn't appear on the node. Should it be in the confirmation email?

I feel like I'm mere moments away from glory, what with your audio attach solution and COD testing method. Now the final anonymous hurdle - if this doesn't work I'm tempted to just make people create accounts.

Phillip Mc’s picture

When I was testing it (ecommerce 3.x-dev), it automatically logged me in when doing an anonymous purchase with a customer_number username. From memory...I think it was the eC User Account.module that did that for me.

When eC User Account.module is installed you should have an option in the file product (just edit any fileproduct node) and select "create account on purchase".. (or words to that effect).

I'm not sure why your COD purchases aren't automatically being moved along in the queue. Under the COD settings page...have you set the options to be the following?

Mark transaction as paid?: YES
Mark transaction workflow as completed?: YES

Marking those as YES, should automatically complete an order.

It's a while ago since I tested it...and I may have applied a patch to the COD module for automatic transaction completion. I can't remember if that's the case, but, if you search through the BUG reports on the ecommerce module page, it might help. I distinctly remember applying the order notifications to admin patch...but, I can't remember if I had to patch the COD.module.

Sorry I can't be of more help than that. If you get stuck, I can dig out the cod.module I'm using and see if that's been changed.

wilgrace’s picture

Purely the problem now is just with anonymous purchasing - I can't get an account created. I've installed One Click Login and will see if that works - I'll let you know how I get on.

Incidentally, what happens is after clicking through checkout the anonymous user is taken back to the cart, which is now empty, and it says 'Your item has been removed'. It very much seems as though an account hasn't been created, and no email is sent.

Anyway, I'll report back here.

wilgrace’s picture

It's alive!

Man, I finally got it working - what a massive relief. I'm knackered right now so I'll come and post back the steps for other users tomorrow, but for now just wanted to say a big thanks - wouldn't have happened without your patience.

later

Phillip Mc’s picture

when you have afew moments it would be great if you could type up a post explaining the steps....

the ideal place to put a post like that would be over here:

http://groups.drupal.org/art-music

glad to be of help by the way...

wilgrace’s picture

Sorry it's taken a while to get round to this, work's been hell...

So, to go through the steps i went through to get the site live (www.3m30.com - I didn't do the design, and won't share my views right now...).

1. Install a clean version of Drupal 5.7 (audio is still not supported on 6)

2. Download and enable the following modules:
- Audio 5.x-2.x-dev (this has audio attach included)
- Poormanscron (makes sure the database is constantly updated, if you dont have cron on your server)
- Sitepass 5.x-1.x-dev
- Token
- Views
- ec one click login

3. Download and install the ECommerce module, which has loads of modules within. I think it's important to enable the modules in a specific order, but I can't completely remember the order now - i think it's:
- Store
- File Product
- The rest that you want (Paypal, COD, etc)

4. Change the permissions for Anonymous Users, making sure they can
- download audio
- play audio
- use sitepass
- view uploaded files
- access views

5. Under Content Types, edit the Product type and enable 'attach Audio files'

6. Create a Product piece of content, FTP an audio track to your server and point to it under File Path, attach a 30 sec snippet of the same song and fill in the rest of the details.

7. I used Cash on Demand (COD) to test and make sure it was working, and under the COD settings set the transaction to mark as complete when done, meaning an email is sent to the user. Now, when the user clicks the link in the email it should take them to %myfiles (make sure that's in the default customer invoice) and log them in at the same time. Sometimes it doesnt work like that, and they have to click My Files.

8. Enable Paypal and get the basic settings working - main thing is putting the IPN (mine is http://www.3m30.com/paypal/ipn) into your paypal profile settings, under Instant Payment Notification Preferences

It took a bit of working out to get the email and the link right, so that users are logged in and sent to the right place, but it worked out in the end.

If you need any help wiht this drop me a line - PhilK was a legend in helping me work through it, and am happy to try to do the same for someone else. Phil I'm gonna post this over where you said too - it's here: http://groups.drupal.org/node/11718

wil

jjjames’s picture

Man...I have been trying to do this same thing for sooo long. You pretty much have exactly what I need, with the exception of iTunes/PodCast stuff. I know when you create an audio content type, there is specific itunes feed information. Subtitle, summary, explicit, block to be exact. Also, I'm not sure that your method produces itunes compatible feeds? I would really like some more info regarding itunes podcasting using your method. Can anybody help?
Thanks so much for this...hopefully I will be up and running too (it's only been 8 months trying)

ps: what is- ec one click login? I can't find that module anywhere.

Phillip Mc’s picture

It sounds like the ec user account.module...which automatically generates an account *and* logs the customer in when they buy the download.

wilgrace’s picture

Yeah, that's right - it allows a user to click one link in their email, it logs them in and then takes them to their file downloads. It's not a proper module I don't think, I got it here:
http://drupal.org/node/172845

This means, after paying on Paypal, users are taken back to a designated page on your site and you post a message saying 'check your mail'. Job done.

As for podcasts, I've managed to get that working on my own podcast (http://www.dangradio.com/ ) using the normal audio feed, running it through Feedburner to get the extra metadata exactly as I want it, and then submit the Feedburner feed to iTunes (means you can also track subscribers). Mine is completely open though - no payment - and I don't think itunes allow payment for podcasts.

So what you could do is have a teaser podcast of shortened tracks, referring people back to your site to buy the full length track using the method I'm using.

jjjames’s picture

Thanks for the explaination! This is good stuff :) Someone should make an installation profile for this because I know it could be so useful for others. This is a great recipe for a site.
Thanks so much!

Phillip Mc’s picture

Hi Wil...

Great work. and thanks for posting up your experience....so many on the forum ask for help and then never come back to explain in simple steps, like you have, how they achieved their result.

I assume the themeing of the shopping bits on that site are a work in progress....for what it's worth, I quite like the emusic interface....and the amazon downloads interface is good as well. As your catalogue begins to grow..it maybe worth checking out this alternative to the default Drupal audio players. The example linked is for previewing albums and I know your project is all about 3minutes 30 so it might not be relevant..but I thought I would give you the heads up anyway.

phil

wilgrace’s picture

Thanks phil. Yeah, the theme was a nightmare - I was only doing the build on this, and someone else on the design, but he was a print designer and what I was given was impossible to work with. To be honest I'm backing off now (other projects to move onto) and handing the maintenance to them - they're ok with the basic ecommerece interface.

Yeah, I've been watching what Dub is up to - looks like he may be onto a good thing with that, may try integrating in the future

thanks again

jjjames’s picture

I have songs that I want people to listen to, but not purchase until it's "officially released". I'd like to be able to "convert" it into a product once it goes for sale. The reason I want to convert it rather than just make a new product is because I want to keep all of the comments, ratings etc. I thought about making it a product set to $0.00 at first but that will only confuse the people and also a file is required when creating a product.

I hope I'm making sense here. Basically I just want to give a preview now, but sell that same song at a later date while retaining the comments and ratings.

Any advice?

thanks!

Phillip Mc’s picture

(I assume you're using drupal ecommerce.)

You should be able to keep the comments when you convert your node to a product.

To make sure, what you can do is go to ADMINISTER ->CONTENT -> CONTENT TYPES and edit the product content type. There whould be an option there for comments...make sure that comments are on for product nodes, prior to converting your "preview" node.

I'm 99% certain that the comments will stay....try a quick test with a dummy node..with some dummy comments and then convert the node to a product and see what happens.

jjjames’s picture

Yes I'm using ecommerce. I have followed the steps above to create the site. Thanks for your response...but I don't see any way to convert an audio node into a product node. The method above is about attaching audio files to a product...but since I'm not ready to sell the audio file yet, I can't make a product, I must make an audio node instead. But when I'm ready to sell the audio file, I need to convert it into a product somehow. Do you understand what I mean?

Ideally, I should just be able to create an Audio content and then use the product expander within the node to make it a product, but it doesn't work..hence the alternative method described above.

Any ideas?
Thanks!

Phillip Mc’s picture

You should be able to convert an audio node to a product, according to this thread, do you have the ec_media.module enabled?

jjjames’s picture

Thanks so much for helping, but that seems to be for Drupal 4.7? Wow, this is such a pain! Can I pay someone to fix/patch the audio/ecommerce problem? All I want to do is make Audio Nodes become products and to have a preview all wrapped into one node :( It just seems like so much work to get around this bug. They say ecommerce 4 fixes the issue, but it's unstable and who knows when it will be released. Any takers?!

Phillip Mc’s picture

jjjames’s picture

Thanks for the link...but I just can't seem to find a solution in there. There's a bunch of suggestions and then at the end it says it's fixed, but there is no link to the fix or how to solve the problem. I feel like I just keep going around in circles with this! What was the solution...quickfile? Ahhh...I'm pulling my hair out! Sorry to be such a pain, but I just feel like I"m on a wild goose chase with no end in sight!

jjjames’s picture

Wow...I disabled the ec_media module and what do you know!? I CAN FINALLY CHOOSE A FILE when I create a product out of an audio module!! This was KILLING me! I really don't see why ec_media is even needed? The only thing it did was make it so I couldn't select a file download product.

Very strange...is there an explaination to this?

Well, anyways...thanks alot :) I "think" I've got what I need..even though it seems like a strange solution by disabling ec_media.

wisemas’s picture

Hi, has anyone achieved this with ubercart. Am currently working on a website for a band who wish to sell their music in MP3 format, but wish to allow visitors to hear a sample of the MP3 before purchasing it.

Thanks in advance,

Wisemas

McGeezy’s picture

I don't know what I am doing wrong but this is where I am at:

I can create the file download product. I then attach the audio node to the product. The only thing I want to add to my view is the Audio Player Button, but for some reason the player does not show up in my view. All of the product info shows up, but not the Audio Player... Anyone know what my problem may be?

Phillip Mc’s picture

Here's a simple but slick music downloads + physical shop built using drupal

http://shop.septictigerrecords.com

I checked and it was developed by dublin drupaller using ecommerce and amazon s3 to deliver the downloads. I notice they are offering mp3, WAV and AIFF. nice touch.

k300m’s picture

hey guys

i've followed your steps and now its almost working.

but i have made a test:
tried to buy a track using paypal , but when i go to last step -> check out , then i get a message that my order has been submitted.
also i get an email notifying me it. but never got link for downloading the track.

p.s. i've set the price to 0.00$ , so it even didn't forwarded me to paypal homepage for paying , it completed the order successfully after making "check-out".

do you have any idea why didn't i get the download link?

thanks alot
A