Hi. I'm a little at my wits end with a client and I'm not sure how to set this all up.

My client is selling UPC Barcodes on his site. So, essentially, he has 1,000s of these barcodes for sale, each would come in a zip file containing 3 formats, and he wants for people to go to his site and be able to purchase these zip files. They can purchase in bundles ranging from 1 to 200. But, once a user purchases and downloads that zip file, it can't be available to anyone else at all - they have to remain unique.

And for that matter, if someone purchases 200, they need to get 200 different, unique files to download. Eek.

So I'm going through how I can get this to work? I'm figuring something between this, workflow and rules? But short of creating a new node / product for each separate zip file and / or each separate bundle of zip files and unpublishing that node after purchase is complete, I'm not sure how I can do this?

Ideally, he wants to be able to upload the different zip files via FTP to a protected folder, and then when someone purchases their files (however many) they will receive an email with the links to download these files and the files would then be deleted from the server.

Anyone that can help me get this set up?

Comments

tvilms’s picture

Hey there. Check out the progress on a related issue. Hope it helps. Follow this link for a new update on the concept of a Commerce File Bundle, which may help in your scenario. http://drupal.org/node/1372950#comment-5901398

dkgiles’s picture

I'm also trying to solve the same problem. Subscribing to this and will let you know if I'm able to resolve anything myself.

bojanz’s picture

Status: Active » Fixed

You can prevent a product from being purchased by returning NULL from the price calculation event.
This will hide the product from the add to cart form.

Then all you need to do is check if an existing license already exists (something like #1992152: Easiest way to check whether user has file license in 7.x-1.x, or commerce_license_exists() in 7.x-2.x)

That will ensure that once a product with a zip gets purchased, it is no longer available.
And yes, you need to generate a product for each zip.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.