Concurrent Downloads

  • Posts: 32
  • Thank you received: 1
  • Hikaserial Standard Hikashop Essential
2 years 5 months ago #337187

-- url of the page with the problem -- : ssavp.com
-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4.25
-- Browser(s) name and version -- : Chrome

If a product has multiple files associated with it, would it be possible to add functionality where the customer can click download once and be able to download all of the files associated with that product?

Right now, if a customer orders an item with say 4 files associated with it, they get 4 separate download links in the Download Space. Would it be possible so they only have 1 link and the system pushes down all 4 files either at once or one after the other?

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13062
  • MODERATOR
2 years 4 months ago #337206

It's not possible to send multiple files for one link.
One link can only send one file. That's how browsers, HTTP and HTML work.
So the only solution is to provide an extra link with a zip of all the files.
In fact, you could do that manually without any development by just manually zipping the files for each product and adding the resulting zip file to each product.
Doing that automatically could be done with the development of a custom plugin which would automatically add the extra link and dynamically compress the files. This however suppose that the files are not too big as compression can be slow and if it takes more than the "max execution time" limit of your php.ini the download link for that zip would result in an error as the process would be halted by PHP itself.
I can see you only have a handful of products on your website so I think the manual approach of zipping the files for each product and uploading the zip file as an extra file is the best way forward for what you want to do.

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
  • Hikaserial Standard Hikashop Essential
2 years 4 months ago #337229

Zipping up the files is an option, but when that zip file could be in excess of 20GB in size, the issue of download times becomes an issue. The number of products on the store is irrelevant, the size of the downloads are.

There's no scripting logic that could be developed to say when this file's finished, start downloading this one?

Please Log in or Create an account to join the conversation.

  • Posts: 81478
  • Thank you received: 13062
  • MODERATOR
2 years 4 months ago #337230

Hi,

There is no such mechanism in browsers.
Just look at Gmail. If you have an account there and you receive an email with several attachments, it will allow you to download each one with its own link and you'll also have a link to download all of them at once. That link will actually run a process on Gmail's servers to zip the attachments into one file and then send to the browser that one zip file.
And if they didn't do what you're talking about in Gmail, and since I also don't know of any such existing capability in browsers, I don't think you'll be able to do what you want.
If the files are big, I recommend you leave it like it is by default as I don't think you'll be able to improve the situation.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum