Page 1 of 1

Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Thu Sep 16, 2010 7:40 pm
by pixelartist
Hi,

i tried to find it via Search, but i could not find anything.
What i want to do is - i want to enter a Link for a File as Digital Download, instead of uploading a File.

I know that this is possible, but maybe some already did a modification like that or could even provide a plugin/module.

Just to make it clear, i do not want to replace the upload process of files, i just want to add the option to put a Linkt o a file if the file is not hosted on the same server.

Interested in your ideas,

Manuel

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Tue Sep 21, 2010 7:09 pm
by Miguelito
Haven't seen a complete module for this so requires custom mod of OpenCart (new field in the database for this and needed changes to controllers and templates).

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Tue Sep 21, 2010 8:03 pm
by pixelartist
Hi,

thank you for your answer. As i was sniffing through the code, i guessed the same. I think it requires more than i thought in the first place, because the filepath is not stored in the database, its just its name.

Correct me if i am wrong, but here is what i need to do:

1. create a field for the link in the database
2. modify the download (catalog) template to have an field where to enter the url and check if there is a file to upload or an url to enter
3. modify the download (catalog) template display options, to show the urls from the database as downloads, which can be linked to products.

I am not sure, cause i did not take a look at it, but do you think i should use the download encoding for the urls?

And of course it has to be build as an plugin or module, because it would require modifications to the core files, which may be overwritten in the next updates.
Haven't seen a complete module for this
Does this mean you could point me to snippets or whatever you have seen, which someone already tried before?

Could anyone with OC experience take a look at that and just push me if i am going in the right direction with this?

Kind regards,

Manuel

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Wed Sep 22, 2010 5:28 am
by billyggla
you could add an extra text field to the form and db table, then have it display this field on the account page.

Only thing is.. how are you going to control the download limit, expiry etc if you are giving a direct link to the file.
Unless its pay once = lifetime access..

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Fri Oct 15, 2010 1:47 am
by pixelartist
Hi,

to keep you updated with the progress i made so far:

- You can refer a file now by providing the link
- the download is tracked and handled by opencart as an usual download
- the already build in "encoding" works
- download limits are working

Basically everything works but i encountered a problem with the filesize, cause the file is not physically available.
I am going to use php5 (filesizeheader) to work around that - but this is still in development.
Because my modifications are not 100 % working, i am not displaying any code to distract people.

Stay tunend.

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Tue Nov 02, 2010 4:57 am
by pixelartist
and again a small update:

- everything is working !!

I just need to fix the display of the download size :/ & need to put it into an module, if someone can give me information on how this could be done, i would appreciate it.

M!

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Wed May 04, 2011 8:50 pm
by Digital Sushi
Did you ever get this to work correctly? I'm keen to do it as well.

Re: Enter a Link as Digital Download (V1.4.9/clean install)

Posted: Sun Jun 05, 2011 12:03 am
by rectro30
How is this done, can somone please give simple steps. Thanks.