VP File Upload Custom Field User Guide

VP File Upload is a Custom Field plugin for VirtueMart. You can allow users to upload any files and attach them to the products while adding products to the cart. You can also use it as a read-only field and attach desired files to the products. The plugin is highly secured. It validates every file before uploading to the site. The following documentation explains the VP File Upload Custom Field installation and configuration steps.

Installation

You can download the latest installation packages from our site's VP File Upload Custom Field download page. If you have an older version of Joomla!, VirtueMart or PHP, please check the compatibility section to find the version of VP File Upload Custom Field compatible with your Joomla!, VirtueMart, and PHP versions.

All VP File Upload Custom Field installation packages contain the plugin and its associated plugins. Installing it will install all of these items automatically. It can also be used to upgrade/update the VP File Upload Custom Field. You just need to install it without uninstalling the previous release.

You can install the zipped package as it is through Joomla Extension Installer, which will install the complete package on your site, making your life a little easier. After the installation, you can find the package as Package - VP File Upload in Joomla! Extension Manager.

Log in to your site's administrator section. Click on System  Install  Extensions. Click on the Upload Package File tab. Drag and drop the installation ZIP file. Alternatively, click the Browse for File button to locate and select the ZIP file installation. After a short while, Joomla will tell you that the package has been installed.

Uninstallation

You can uninstall the extension just like any other Joomla! Extension. In your site's back-end, go to Extensions Manager, select Package - VP File Upload, and click Uninstall. This will remove the VP File Upload Custom Field package, including its associated plugins.

Configuration

Create A Custom Field

To start with the extension, you must create a custom field. Go to VirtueMart's Custom Fields section and click the New button to add a new custom field. When the page opens, select the Custom Field Type as "Plugins" and give it your desired Title. To allow users to upload files, you must turn on the Cart Attribute and Cart Input options and set the Layout Position as addtocart. On the other hand, to make it read-only, turn off the Cart Attribute and Cart Input options and set the Layout Position empty or as desired. The Admin Only and Hidden options must always be turned off. 

Next, select the Additional Parameters as "VM Custom - VP File Upload" from the dropdown. This will open the main custom field parameters section of the plugin below.

Maximum File Size (in MB)

Set the maximum file size limit in MB. If you enable multiple file uploads, this limit applies to the total size of all selected files. The maximum file size limit must be less than the maximum server limit.

Allowed Extensions

Select the allowed file extensions from the dropdown list. If you do not find your desired extensions, add them to the "Allowed Extensions" option in Joomla Media Options. Refer to the official Joomla! Documentation to learn more - docs.joomla.org/Help4.x:Media:_Options.

Legal MIME Types

Select the allowed legal MIME types (file types) from the dropdown list. If you do not find your desired extensions, add them to the "Legal MIME Types" option in Joomla Media Options. Refer to the official Joomla! Documentation to learn more - docs.joomla.org/Help4.x:Media:_Options.

Remember to map the Allowed Extensions and Legal MIME Types correctly. For example - if you select jpg or jpeg as allowed extensions, you must also select image/jpeg as a legal MIME type. Similarly, for png, you must select image/png; for zip, you must select application/zip, application/x-zip and application/x-zip-compressed; for pdf, you must select application/pdf, etc.

Minimum Number of Files

Choose the minimum number of files you want to allow to upload. Set is zero (0) if you do not want to set any limitations. 

Maximum Number of Files

Choose the maximum number of files you want to allow to upload. Set is zero (0) if you do not want to set any limitations. 

Required

Turn on this option if you want to make the field mandatory. When enabled, users must select valid files before adding the products to the cart.

Upload Folder

Set the folder to which the files will be uploaded and stored on the site. It must be within the Joomla root directory. The default folder is - media/plg_vmcustom_vpfileupload/files/. Once configured, you must not change the folder path in future, as it may result in missing files in the orders. 

Use Security Token

Turn on this option to use the user session's security token before uploading the files. It helps protect your site from Cross-site request forgery (CSRF). However, if your site uses page caching and you face security token error problems, you may choose to turn off this option. 

Check Image Dimensions

This option is only applicable if you accept image files. It allows you to set desired image dimensions. If you turn on this option, you can set the desired dimensions below.

Minimum Image Width (in Pixels)

Set the minimum required width of the images in pixels. Set it to zero (0) to disable it.

Minimum Image Height (in Pixels)

Set the minimum required height of the images in pixels. Set it to zero (0) to disable it.

Maximum Image Width (in Pixels)

Set the maximum required width of the images in pixels. Set it to zero (0) to disable it.

Maximum Image Height (in Pixels)

Set the maximum required height of the images in pixels. Set it to zero (0) to disable it.

Add Custom Fields to Products

 

Now that you have created a custom field, you must add it to a product. To do so, go to the product edit page and navigate to the Custom Fields tab. Scroll down and select the newly created custom field from the dropdown list. In the above image, we have added two separate custom fields to the product. Their names are Custom Images and Downloads. The Custom Images is a cart attribute and input type field. On the other hand, The Downloads custom field is read-only, and we use it to attach files to the product.

To upload and attach files to the product, you first need to select some files and click the upload button. When the upload is finished, you must save the product. The attached files are displayed at the set layout position on the product details page.

You can also set a desired price for the cart attribute and input type custom fields. This price will be automatically added to the product when users select a file in the front end. 

Plugin Settings

Open the VM Custom - VP File Upload settings to view and edit the plugin settings.

Load CSS Styles for Buttons

VP File Upload uses Bootstrap button classes for the select, upload and reset buttons. Since not all the templates use Bootstrap, we have included the CSS styles of these button classes in the plugin. However, if your site uses a Bootstrap-based template or you want to use your own custom CSS styles for the buttons, you can turn off this option.

Live Update

Add your Virtueplanet Download Key to receive updates through the Joomla Live Extension Update system.