KonaKart Community Forum

Installation / Configuration => Configuration of KonaKart => Topic started by: ryanlynch on April 07, 2008, 10:24:24 pm

Title: Multiple files for a Digital Download
Post by: ryanlynch on April 07, 2008, 10:24:24 pm
Hi there -
I am hoping someone can kindly tell me the best way to do this. I need to have the ability to include multiple files and multiple content types in a single digital download. For example, I might have an audio download product, but I want the customer to be able to choose which format they want to download the file in (mp3, m4b,etc) --many of the digital downloads might also include a Table of Contents in PDF. My question is how difficult will it be to extent KonaKart to include this functionality and how should I go about doing it?
Any help would be really great.
Thanks,
Ryan
Title: Re: Multiple files for a Digital Download
Post by: kate on April 08, 2008, 05:54:26 am
Hi,

Can't you put all the required files in a single zip archive for download?

Regards
Kate
Title: Re: Multiple files for a Digital Download
Post by: ryanlynch on April 08, 2008, 05:56:52 am
Thanks for the reply, but unfortunately that would not fulfill our requirements. We would like to give our customers the ability to choose which format they want after the purchase.
Thanks!
-Ryan
Title: Re: Multiple files for a Digital Download
Post by: ryan on April 09, 2008, 01:04:26 pm
Hi,

Take a look at com.konakart.bl.OrderIntegrationMgr.java which is where the digital downloads are added:

              for (int i = 0; i < order.getOrderProducts().length; i++)
                {
                    OrderProductIf op = order.getOrderProducts();
                    if (op.getType() == ProductMgr.DIGITAL_DOWNLOAD)
                    {
                        if (productMgr == null)
                        {
                            productMgr = new ProductMgr();
                        }
                        productMgr.insertDigitalDownload(order.getCustomerId(), op.getProductId());
                        numDownloadsCreated++;
                    }
                }

Since you have the source code for it, you could add other products that are related to the one in the order. i.e. You could have a bunch of products in a category which you never display and add these to the digital download list based on information that connects them to the product in the order.