The plugin Shipment for Virtual Products allows you to ship virtual products (software, music, videos, books) to your customers. It is a custom field product plugin. This tutorial explains how to install and configure the plugin Shipment for Virtual Products.
- Go inthe menu Extensions > Entension Manager, and install the plugin
- Go in the Extensions > Plug-in Manager, and enable the plugin named Virtuemart 2 | product download
Create a custom field
- Go to Components > VirtueMart
- Select the menu Products > Custom Fields
- Click on the button New
- Select for the field Custom Field Type: Plug-ins
- Enter a Title
- Select for the field Cart Attribute the value Yes
- For the field Select a plug-in, select Virtuemart 2 | product download
- Click on Save
Configure your Safe Path
The files to sell are stored in the folder Safe Path given in the VirtueMart configuration.
- Select the menu Configuration > Configuration
- Select the Templates tab
- The parameter Safe Path is the folder where the files to sell are stored. It should be a path outside your web directory.
Upload your files to sell
- In VirtueMart administration, choose the menu Shop > Media Files.
- Click on the button New, to create a new media.
- Set the role to "for Sale". Set the "Image Action" to "Upload" and press save/store.
When your files are too big for the http upload, use your ftp client. Upload the files into the directory to your safe path. And then use Synchronise media button in your media view
Attach your media to your product
- Select the menu Products > Products
- Click on the product you would like to add a file to sale
- Select the tab Custom Fields
- In the Custom Field Type area, select the custom field you created to attach a downloadable file
- In the downloadable area, select the file you want to attach to your product
- Check the box Provide as stream, if you want to provide the download as a stream.
- If you provide the download as a stream, change the parameter For the field Maximum speed in kb.
- Click on Save & Close
When your customers should be able to get files which you do connect later to your product, then it is very important that you never delete your custom and that your first product customfield stays the same. Change the used files, just do not delete it, else prior shoppers are not able to access the download anylonger.
To replace existing file we recommend replace action in vmbe > shop > mediafiles.
Configuration of limits, restrictions and timeframes
- Maximum Downloads means all downloads alltogether
- Maximum downloads per interval in days means how often people are allowed to download your product when you enter a time intervall
- Interval in days is the time in days for the interval
- Maximum number of days for download after the first download is the time how long someone is allowed to download it
- You can set a start or/and a end date for a timeframe
Test your downloadable plugin
On the frontend, select your product, and checkout.
Q: On cart I cannot checkout, instead message appears:
"We are sorry, no shipment method matches the characteristics of your order."
A: Create at least one shipment method named e.g. Download.
Q: I sell virtual and real products. What shall I do?
A: For all your virtual products, set the weigth to 0. For the other products, set the weigth to a value different from 0.
Create at least two shipment methods:
- one free of charge with the weigth condition =0. This shipment will be selected when the shopper only buys virtual products
- one or more other shipment methods for weigth different from 0. Those shipment methods will be selected when non virtual products are in the cart.
Once the order has been confirmed, your client will receive an order containg a link to downloadable file. He can also download the file via his account using his order number and order password.
The download is created using streaming technics. Be aware that the streaming option does not prevent people using “save target as ...”
Important: the download is activated when the order status is set to confirmed/shipped. Downloading the file changes the status of the order item to shipped.
Q: I wanna give free downloads
Adjust your configured paymentmethods and add, if not already set a minimum value of 0.01. Then create another default payment (method: standard) and set the maximum to 0.001 and the "Order Status for Pending transactions" to "confirmed by shopper". Then your customers will recieve an email with the link.
Q: I want to reenable a download
A: You can do this with the the version 2.0.20, but the core needs a small adjustment (wil be in the core with the next release), just search for administrator\components\com_virtuemart\controllers\plugin.php go to line 49 and replace the word getWord with getString, line 49 should look like this then: $name = JRequest::getString('name','');
Another variant to reenable download: View the order (VM > Orders) and click on the green symbol to reset the download counter.
Q: I cannot find my media in the dropdown of the plugin
A: You did not upload your media as “file for sale”
Q: I get file, which size is too small (1-2 kb).
A: Rename the file and add a .html, then open it in a browser, there you can see the error message. Most likely the safe path is not set correctly. Check if your safepath has an ending slash (windows machines a backslash)
Q: How do I set the correct safe path?
Q: The download link does not appear in the email to the client.
A: The download link should be in the email to the client, where the product is listed. Furthermore your client can find the link, checking the order online.
If the link does not appear in the email and/or the order, then this happens almost anytime due a template override of the email or the product details layout. Sometimes people say the link is sometimes there, sometimes not, in this case they have a template providing not correct "add to cart" buttons in the category view.
Q: I get a blank page when clicking on downloading link.
A: The reason can be your bandwidth lowering your server ram usage. Try again with lower value in the Field Maximum speed in kb (1024 = 1MB php RAM) in your Product customfield view.
Q: I moved from VM2 to VM3, on Download plugin now I get error message: 1054-Unknown column 'virtuemart_product_id' in 'field list' SQL=INSERT INTO `'#_virtuemart_product_custom_plg_st42_download` (`id`, ...
What shall I do?
A: Browse in VMBE to the customfields and save the customfield proto, the column is added then.
Q: In the email to vendor there is no download link - is it missing?
A: Currently the download link appears only in shopper email. As admin you can access the download via the order details view.