Hi,
Thank you for your report.
There is an issue with the multiple serial and the download.
The system can manage when there are several files to download in the way that the customer bought more than one item.
But there is no parameter to handle the "position" of the serial you want to download when the pack link is more than one.
I was trying to implement a patch but I have a little issue with both information ; because I can't know how many files a product have or how many serials a product have.
So I have to investigate more on that point and maybe some modification in HikaShop would be required.
Right now I can propose you a small patch but I know that it will not work if the user have several items.
If, just after the content :
if(substr($params, 0, 1) == ':')
$params = substr($params, 1);
You add
$serial_position = 1;
if(strpos($params, ':') !== false) {
list($params, $serial_position) = explode(':', $params, 2);
$serial_position = (int)$serial_position;
}
You will be able to add a "position" in the attach serial virtual file ( #attachserial:1:1 / #attachserial:1:2 / ...)
So it means that you'll have to create several virtual files depending the pack link.
Then you have a line which load the first serial
$serial = reset($serials);
and then, there is the support of the "file_pos", which is handle by HikaShop to indicate which file is downloaded (when the item quantity is more than 1).
You can add
$file->file_pos = !empty($file->file_pos) ? $file->file_pos : $serial_position;
so it will handle partially the serial position.
I hope that I will be able to fix that issue without modifying the HikaShop core (to get more details of the files and the items).
Regards,