• Welcome to KonaKart Community Forum. Please login or sign up.
 

Multiple files for a Digital Download

Started by ryanlynch, April 07, 2008, 10:24:24 pm

Previous topic - Next topic

ryanlynch

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

kate

Hi,

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

Regards
Kate

ryanlynch

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

ryan

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.