Author Topic: Order download emails / Remote file downloads  (Read 28493 times)

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Order download emails / Remote file downloads
« on: April 14, 2009, 03:49:02 am »
Hello,

I hope someone here can help out.

Ok so I've been searching for hours for an answer to this...

I figured out how to use a diffrent server to use for downloads. I set the DOWNLOADROOT to the external server (link removed), then when adding the file to download I put the full url to the file, so far so good.

I then tested the purchase and got the download email, but the email is showing the following:

(link removed)

Now the first url showing in the email is a direct link to the file on the other server (BAD).

The second link is the correct link to the download page (GOOD).

Both links work correctly, but I don't want the first url to show in the email as I will not be able to control the ammount of times a file can be downloaded.

I'm not 100% sure on this, but I am assuming I need to edit ps_order.php to remove the first url, but I don't know where or what to edit.

PLEASE HELP!

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Oredr download emails/remote file downloads
« Reply #1 on: April 14, 2009, 17:53:30 pm »
Did I post this in the wrong category?

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Oredr download emails/remote file downloads
« Reply #2 on: April 15, 2009, 19:40:04 pm »
Anybody?

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Oredr download emails/remote file downloads
« Reply #3 on: April 16, 2009, 07:02:37 am »
Are there any moderators in this forum?

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Oredr download emails/remote file downloads
« Reply #4 on: April 16, 2009, 22:09:21 pm »
Daily bump

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Oredr download emails/remote file downloads
« Reply #5 on: April 18, 2009, 00:32:16 am »
bump

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Order download emails / Remote file downloads
« Reply #6 on: April 18, 2009, 03:04:03 am »
I'm sorry for the virtuemart project & anyone else who runs up against this problem (and lack of documentation) that this question was too difficult for the mods/support staff here to answer, but me being a noob I guess I just didn't warrant any support. After all it would have just gone over my head anyway, right?

Well don't worry about me (like you did anyway), I figured it out on my own.


macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: Order download emails / Remote file downloads
« Reply #7 on: April 18, 2009, 03:24:38 am »
Nice, you complain about lack of support on a user forum, you eventually work out the answer and then you don't share.

Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Order download emails / Remote file downloads
« Reply #8 on: April 18, 2009, 03:43:51 am »
I was waiting for some kind of responce before I share.

Like I stated in another post, I do help out the open source community when I can.

Before I share though, tell me why I only get a responce after I figure it out on my own. I didn't even get a sorry we don't know. Instead I was left to stew.

Answer that question and I'll post all steps involved to get remote file downloads working properly.

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Order download emails / Remote file downloads
« Reply #9 on: April 18, 2009, 04:01:33 am »
You know Mark, I've seen your posts going back a few years now and I've got a lot of respect for you. You are one of the most helpful people on this forum. You actually post usefull answers instead of just saying read the manual (which is more of an overview than a manual) to every post like some others in this forum do. I'm sorry about my attitude but after spending so much time in this forum quietly searching for fixes to the many bugs in VM, when I finally do post a question it gets ignored. Wouldn't you be pissed too?

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: Order download emails / Remote file downloads
« Reply #10 on: April 18, 2009, 04:14:41 am »
Your post went up 4 days ago, along with 100's of others.

If you look through a lot of the child boards you will see that I am answering 10-20 posts a day, sometimes these take some research to get a correct answer.

I am not going to post on each one that I don't know the answer to, sorry I don't know the answer! I'll be researching to find an answer. I'm not going to apologise to not getting round to your problem before everyone else's.

I rank responses in relevance to other users needs. Most VM users will be hosting their files on their own server, not another, so not as high priority as others. Although to you, personally, it probably is the most important!

So do I spend my time researching a problem that will help a handful of people or one that will help 10's of people?

On top of that , I am bug fixing the current release and working on the next version. There is only so much time I have and I can't possibly answer everything.

You got a response because you complained so I checked your posts to see what was not answered and how long they were unanswered for. Some paid support and bought products responses can take more than a week, if you get a response at all. So I think for an opensource project with about 5 developers we are doing the best we can and we do rely on forum members to help each other out. So withholding a solution, because you were waiting for a response is really not in the spirit of opensource, is it?

p.s. On top of that I have been up 17 hours and have spent a good 10 hours working out an ssl redirect problem that could affect 100's of users! So I got a bit pissed too!
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Order download emails / Remote file downloads
« Reply #11 on: April 18, 2009, 04:32:15 am »
Mark, I was not aware that there were only 5 developers on this project. I assumed there were many more. If I had known this before hand I would probably have been more patient.

I was not looking for an apology from you, just an explination as to why my question went unanswered and you have given it to me, so I will uphold my part of the bargin and post my method of getting remote file downloads to work.

Although I have not made any direct donations to the project, I have purchased Vrtuemart related commercial software through this sites affiliate link (VM Affiliate)and I do click on banners here as well, so I do support the project in a small way.

The steps involved to get this to work are quite a few so I will have compile all the steps into a coherent post. I'll post answer later tonight.

macallf

  • Full Member
  • ***
  • Posts: 2411
    • Mark Callf Design
Re: Order download emails / Remote file downloads
« Reply #12 on: April 18, 2009, 04:49:08 am »
Thank you, I think most are unaware of the few developers we have!

Some have a lot of other commitments too and help when they can, but at most we have 10 but only about 5 who active most of the time. We have several testers that give us bugs to fix constantly and a gallant few who are moderators and they are not necessarily developers or coders, just users who have helped by having encyclopaedic memory of problems and their cures!

I admit we do rely on the community to help each other and useful solutions to problems are investigated and added if they are useful and cure a problem.

We are striving to make VM the best opensource ecommerce system, the next release 1.2 will include many new features and improvements. Some gained by scouring the forums for fixes and inspiration!

So believe me, we do respect and appreciate the communities involvement.
Mark
All of My old mods are now available on my website.
Mark Callf Designs

If you like the work I've done for VM please fell free to Donate

Please Note: I am no longer actively developing or involved with VM development.

Bill Bohn

  • Beginner
  • *
  • Posts: 34
Re: Order download emails / Remote file downloads
« Reply #13 on: April 18, 2009, 05:24:32 am »
Ok, here it is for what it's worth. It does however work for me and it also got rid of the direct link too.

Step 1. Sign up for Scalable Media Hosting with Amazon S3: http://aws.amazon.com/

Step 2. create a bucket in your Amazon S3 account following the directions found here: http://developer.amazonwebservices.com/connect/entry!default.jspa?categoryID=55&externalID=1073&fromSearchPage=true

Step 3. Upload your files to your bucket

Step 4: create a sub-domain pointing to the files located in Amazon S3. This is done by using a CNAME entry on your hosting provider. Instructions can be found a little further down in the link above. Doing this will give you a url like the following: http://media.your-sub-domain.com. This is important because the url you would have without doing this would be something like http://media.your-sub-domain.com.s3.amazonaws.com and this does not work (I tried).

Step 5. In the VM configuration go to the downloads tab and change the DOWNLOADROOT to: http://media.your-sub-domain.com/ (don't forget the trailing slash)

Step 6. Create a product and save it.

Step 7. In the product list click on the media link for the new product just like you would do if you were going to add extra images.

Step 8. click the new button.

Step 9. For file type select Downloadable Product File (to be sold).

Step 10. In the File URL (optional) field input only the file name (I.e. somefile.jpg)

Step 11. Click Save and close the window.

Step 12. Here is the important part if you don't want a direct link to the remote file to be shown in the email the customer gets, DO NOT PUBLISH THE NEW FILE DOWNLOAD. You will also notice that the resulting filename says public_htmlsomefile.jpg. Just ignore this as it will work properly and your customer will get a properly formatted email with the correct link to your VM shop download area and with the correct download link.

Step 13. set your acl to the following for all files in your bucket that you want people to download:

Owner: read write full control.
Authenticated users: read
Everyone: read


More info:

Aparantly your remotely hosted files have to look like they are on the same server, hence the need for a sub domain (at least in my case) because when I used the full url: http://media.your-sub-domain.com.s3.amazonaws.com in the DOWNLOADROOT field it did not work when adding only the file name in file manager.

I would assume that any remote server will work as long as your sub domain's CNAME is pointing to it, so Amazon may not be the only working choice.

I hope this wasn't too confusing. I will try to answer any questions if it was hard to follow.

As I stated in the other thread, I have stuck with VM although it has been a bumpy ride and I hope this thread will help answer some of the other unanswered posts about remote file downloads.

Please keep up the good work you are doing here Mark.

sanjeewasam

  • Beginner
  • *
  • Posts: 25
Re: Order download emails / Remote file downloads
« Reply #14 on: April 28, 2009, 06:04:11 am »
Hi,
Thanks a million guys. This is great news for many. I have been searching for this for a long time. I will try this out immediately and will give my feedback- I have some hacks to VM but hope it would still work.

Could u please clarify one small thing- is it to sell down loadable products via VM where the digital file is amazon s3? well that is what I am after.

Hope with this solution no one could see the path via page source.

Are the ACL setting as per the http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1073?

cheers