Post by pixelartist » Thu Sep 16, 2010 7:40 pm

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

Its never easy ...


User avatar
Newbie

Posts

Joined
Thu Sep 16, 2010 7:13 pm
Location - Berlin, Germany

Post by Miguelito » Tue Sep 21, 2010 7:09 pm

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).

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by pixelartist » Tue Sep 21, 2010 8:03 pm

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

Its never easy ...


User avatar
Newbie

Posts

Joined
Thu Sep 16, 2010 7:13 pm
Location - Berlin, Germany

Post by billyggla » Wed Sep 22, 2010 5:28 am

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..

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by pixelartist » Fri Oct 15, 2010 1:47 am

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.

Its never easy ...


User avatar
Newbie

Posts

Joined
Thu Sep 16, 2010 7:13 pm
Location - Berlin, Germany

Post by pixelartist » Tue Nov 02, 2010 4:57 am

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!

Its never easy ...


User avatar
Newbie

Posts

Joined
Thu Sep 16, 2010 7:13 pm
Location - Berlin, Germany

Post by Digital Sushi » Wed May 04, 2011 8:50 pm

Did you ever get this to work correctly? I'm keen to do it as well.

Active Member

Posts

Joined
Mon Oct 18, 2010 10:23 pm
Location - South Africa

Post by rectro30 » Sun Jun 05, 2011 12:03 am

How is this done, can somone please give simple steps. Thanks.

Newbie

Posts

Joined
Tue May 31, 2011 5:21 pm
Who is online

Users browsing this forum: Semrush [Bot] and 218 guests