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
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."
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.
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
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.
Does this mean you could point me to snippets or whatever you have seen, which someone already tried before?Haven't seen a complete module for this
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 ...
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..
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..
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.
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 ...
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!
- 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 ...
Who is online
Users browsing this forum: Semrush [Bot] and 218 guests