Post by STARS » Tue Apr 14, 2015 8:15 pm

I'm still in a shock... I can't believe there's NO download extension out there that could simply use "links" instead of grabbing files directly from the server.

I would really like to set the download "links" from my cloud server rather than putting all those files to my web host.

Isn't really there an extension that could do such a thing or simply a way to modify the default download scripts?!!

You would really save me if you could shed some light!
Last edited by STARS on Sun Apr 19, 2015 3:54 am, edited 1 time in total.

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by IP_CAM » Wed Apr 15, 2015 9:47 am

I assume, OC Users usually sell either real goods, or then downloadable goods. So, seemengly, as you wrote, nobody so far ever seemed to confronted with such a Task, just selling links.

I would encourage you to let the fellows here see your Site. It could make it easier, to decide, for some, if it's worth the task. You know, all those 'feelings' ... ???

just a feeling, too ;)
Good Luck
Ernie

For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by STARS » Wed Apr 15, 2015 3:01 pm

Well Ernie, you're dead right and that's why I said from the cloud server. I already have my products backed up on one of the cloud servers and no one would ever catch them until I share the links. I mean it's already secure and also there's no need to have that 32bit hash characters to prevent users from guessing your products.

I'm running my website offline for the time being but I'm gonna have it on a server with a limited space and bandwidth not to mention my mp3 digital products would take lots of space. that's why I can't have my website online before setting the links. I'm stuck!
You know I was kinda like, why not use the notepad ? I could simply put the links in the notepad and the problem's solved. but, it's so amateur and time-consuming. besides, customers wouldn't like that.

My friend was totally shocked when he heard that opencart has no link support. He told me, just come to think of it I have written a program and I wanna sell it. then I make some tutorials and put it on youtube to let my users learn how to use it. why on earth would I have my tutorials attached with my product while I could simply put the links there ?

You know that's one reason. It has also other utilities:

1. SEO friendly: definitely getting links from somewhere else can be more seo friendly.

2. Backup friendly: If you lose your backup and there's no backup on the server as well, then it would be a piece of cake to get everything back online.

2. Hack Protection: just think for a moment your website is hacked. it would definitely take a longer time for the hacker to steal your products one by one than having them all inside a folder on your server. consequently, you would have enough time to restrict the access.

3. Switching to other hosts: It would be very much easier to switch to other hosts on your own.

4. No pressure: no extra pressure on your website.
Last edited by STARS on Wed Apr 15, 2015 5:57 pm, edited 1 time in total.

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Wed Apr 15, 2015 3:34 pm

Just thinking out loud, it could be as simple as removing the upload field and controller mask/validation from the download section and copy the link in the file field?
That way clients would get your cloud link and not the ?download=file+mask in their email and account download section.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Wed Apr 15, 2015 5:59 pm

Yeah.. but the question is how ?

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Wed Apr 15, 2015 10:04 pm

downloads-as-extlinks.zip
Indeed it needed some changes to multiple files.
I attached a working solution tested on localhost, default template, version 1.5.6.4.
Backup or rename your original files first!

Use full link including http:// in the downloads catalog. I resized the link field so one can see the entire url. ;D

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Thu Apr 16, 2015 12:55 am

artcore that was absolutely artistic!

But here's an issue. it just downloads the last part of the link ignoring whatever the content is and is absolutely fine for direct download links...
However, say the link in question ain't a download link. say it's a youtube link. Now if I put the link there it would download the last part as a file!

For example : www.youtube.com/watch?v=aEuyC5S_oI

Download file: watch?v=aEuyC5S_oI

is it possible to open the link in a new tab to let the browser search for it ?

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by STARS » Thu Apr 16, 2015 1:17 am

oops! I got an error when I was deleting the customer's order list:

Fatal error: Call to a member function deleteOrder() on a non-object in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\store\vqmod\vqcache\vq2-admin_controller_sale_order.php on line 137

line 137: $this->openbay->deleteOrder($order_id);

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Thu Apr 16, 2015 1:57 am

Thanks!
You can download the youtube to your PC and then to your cloud. I use keepvid(google it) for this. I'll look into a programmatic option.
As for the admin/controller/sale it seems you don't have the library/openbay.php file which was introduced in version 1.5.6

Simply comment it out on that line 137 so it looks like this:

Code: Select all

//$this->openbay->deleteOrder($order_id);

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Thu Apr 16, 2015 10:11 pm

The error is gone. thanks artcore.

I'm not just talking about the youtube link or sth. Let's say it's a NetFrameWork or for whatever reason it's sth you don't necessarily have to upload anywhere. say, I dunno, it's a link to a help file from other websites or some information on your webpage for your product in question... it can be anything but a direct link if you know what I mean.

All in all, I'm not insisting on it.. you already did a great job and I can't thank you enough.

However if you managed to do such a thing put it for sale. xml would be a great idea btw. At least you have ONE customer ;) It's absolutely worth it.

Thanks again

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Thu Apr 16, 2015 11:34 pm

I hear you and you're welcome!
It sounds easier than it is in practice. Parsing a YouTube is possible but has a lot of options to test for. I don't want to think about all the other download link possibilities to cater for :)
And I don't enjoy creating vqmods also, so probably not gonna happen. Maybe for OC2 using the Event system...

Cheers

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Fri Apr 17, 2015 12:22 am

hands up and I surrender ;) I never asked for a free vqmod.. .I just simply said if, and only if, for whatever reason you decided to wrap it up for sale, then xml would be a good idea. apologies if it sounded otherwise.

Anyway, thanks again for your help and above all, thanks for sharing it for free...

I made 3 backups just in case... If I lose it then I would never find it anywhere else. :)

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Fri Apr 17, 2015 1:00 am

No apologies needed! You're right an xml would've been a better choice. I simply don't have the experience writing them and prefer PHP :) Sorry for that, I understand replacing files can be a nightmare!

I'll try to create an vqmod/xml for these changes, give me a couple of days as I have some work piled up.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by artcore » Sat Apr 18, 2015 2:11 am

VQmod version ready. It's my first ever so critique welcomed.
Limitations:
128 character limit for the url field as implemented by the database. So be advised.
External link needs to be pointing directly to a public file.
No support for YouTube, RTMP streams and others alike.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Sat Apr 18, 2015 5:07 am

WOW Bingo! ... seriously, I never expected this one. So one step closer to the Higgs Boson ... :)

However, this vqmod had a minor issue on the line below and I could simple fix it by replacing the "\" with "/"...

<file path="admin\view\template\catalog\" name="download_form.tpl">

But then I was like, now that I don't have my website online to take a real-time test why not just give it a try on free hosts and unfortunately the result was exactly the way I experienced on my offline server! :-[ It seems like it DOES grab the last part of any download link ignoring other parts (no matter if it's direct or indirect) as though it's a file located on the server. (I always thought it was all due to the offline mode)

When I hover my mouse over the download icon I get this:

http://127.0.0.1/store/index.php?route= ... load_id=34

Well I guess that simply explains why it can't use the links as direct or indirect cause it just adds that specified ID.
Last edited by STARS on Sat Apr 18, 2015 5:09 pm, edited 1 time in total.

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Sat Apr 18, 2015 2:10 pm

The link without download_id is no problem, but this does prevent your customers from giving out the links to others without the need to login as the paying customer.

Oh yes, the dir separators are from Windows, sorry. I'll Linuxify them

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Sat Apr 18, 2015 5:06 pm

I said it because I wasn't sure whether or not the id was the culprit. and besides If the customer ever wanted to do such a thing, then they would simply put their purchased product on other cloud servers and share it with anyone. Normally when a customer pays for something, the security firewall of their mind convince them not to share what you payed for, unless we're talking about some maniacs who have no other purposes than sabotage!

I mean there's no a 100% security in this universe. there are always other alternatives to bypass any rule. so be it.

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Sat Apr 18, 2015 10:05 pm

Here you go. A version without a download_id

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by STARS » Sun Apr 19, 2015 3:52 am

artcore ? That is exactly the God Particle. :D Excellent!

I would like to extend my sincerest thanks and appreciation to you who helped this mission impossible come true ;)

Now I can have my direct and indirect links without any problem.

note: download links must have http:// included or the search bar would appear something like this showing up a not found page:

127.0.0.1(yourdomain)/whatever-website-link.com

Great Job!

New member

Posts

Joined
Thu Jan 08, 2015 2:10 pm

Post by artcore » Sun Apr 19, 2015 4:28 am

Yes always include http://
If you wanna gain these 8 characters change $result['filename'] to 'http://' . $result['filename]
That way you can/have to omit it from the download link.

You're welcome. It got me into vqmodding, so thank you too :)

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: I moved on to Laravel ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 5 guests