User Manual - Product Downloads
- Installing M2 Product Downloads
- Set-up Cron
- Uninstalling M2 Product Downloads
- Compatibility
- Introducing M2 Product Downloads
- Configuring M2 Product Downloads
- On Back-end
- On Front-end
Magento 2 Product Downloads is a module to allow uploading files to a Magento 2 store and attaching them to products. These files are available for downloading on the Storefront product pages.
Installing M2 Product Downloads
Command Line Installation
- Backup your web directory and store database
- Download the Product Downloads installation package
- Upload contents of the Product Downloads installation package to your store root directory
- In SSH console of your server navigate to your store root folder:
cd path_to_the_store_root_folder |
run:
php bin/magento module:enable Aheadworks_ProductDownloads |
then:
php bin/magento setup:upgrade |
after:
php bin/magento setup:static-content:deploy -f |
5. Flush store cache; log out from the backend and log in again
Make sure the installation is done from the FTP administrator account. Otherwise, set 775 permissions to the store root directory after the extension is deployed. |
Composer Installation
If you are installing an extension from Aheadworks for the first time, you need to add our composer repository to your Magento store:
1. Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder |
Run the following command:
composer config repositories.aheadworks composer https://dist.aheadworks.com/ |
On successful execution of the command you will be able to use the composer to install the extensions.
To install the extension:
2. Login to your ssh console and navigate to your store folder:
cd path_to_the_store_root_folder |
3. Run the following command to install the latest version of the extension:
composer require aheadworks/module-product-downloads |
if you need to install a specific version, run this command:
composer require aheadworks/module-product-downloads:<version> |
Specify the version of the extension in <version> |
When prompted, enter Public Key (Username) and Private Key (Password):
Both Public Key (Username) and Private Key (Password) can be found in My Projects and Licenses in your personal account on our site:
4. Enable the extension:
php -f bin/magento module:enable Aheadworks_ProductDownloads |
Next, register the extension:
bin/magento setup:upgrade |
Recompile your Magento store if you are in the Production mode:
bin/magento setup:di:compile |
To verify that the extension is enabled, run this command:
bin/magento module:status |
Clean store cache, by running the following command:
bin/magento cache:clean |
Log out and Log in the backend again.
To upgrade the extension:
5. To update or upgrade an extension:
Download the updated extension file. Take note of the module-name and version. Export the contents to your Magento root.
If a composer package exists for the extension, run one of the following.
Update per module name:
composer update aheadworks/module-product-downloads |
Updater per version:
|
Run the following commands to upgrade, deploy, and clean the cache.
php bin/magento setup:upgrade |
Set-up Cron
Skip this step if you have already configured cron or if you are familiar with the job. Otherwise, read the following instructions on setting cron on your Magento store: Magento user guide.
Generally, it is enough to run the following command in the SSH console:
crontab -e |
And insert the following lines:
*/3 * * * * php -c <ini-file-path> <your Magento install dir>/bin/magento cron:run |
Confirm the Save request before exit.
Uninstalling M2 Product Downloads
Since Magento introduced declarative Database you need to be very carefull when uninstalling or disabling the module.
NOTE: Please be very careful when uninstalling/disabling this module. This module uses a declarative DB scheme. Once the module is uninstalled the DB tables will be lost. |
Manual Removal
1. Disable the module by executing the following commands:
php bin/magento module:disable Aheadworks_ProductDownloads |
2. Remove the extension files from the following folder:
app/code/Aheadworks/ProductDownloads |
Automatic Removal (via Composer)
1. Disable the module by executing the following commands:
php bin/magento module:uninstall Aheadworks_ProductDownloads
|
Compatibility
Module Version |
Magento Version |
1.0.4 and earlier versions |
2.3.Х - 2.3.6 2.4.0 - 2.4.3 |
As of version 1.0.5 |
2.3.7-p3+ 2.4.0 - 2.4.4 |
As of version 1.0.6 |
2.3.7-p3+ 2.4.0 - 2.4.5 |
As of version 1.0.6 |
2.4.4 - 2.4.5 |
As of version 1.0.7 |
2.4.4 - 2.4.6 |
As of version 1.0.9 |
2.4.5 - 2.4.7 |
The PHP version depends on your current Magento version. Please, refer to your Magento version release notes.
Introducing M2 Product Downloads
Product Downloads for Magento 2 is a module to upload files to products and let customers download them.
Features and Highlights:
- Uploading files of various types
- Importing/exporting files in bulk
- Associating a file with multiple products
- Attaching any number of files to a product
- Making use of the pre-arranged icon package
- Viewing the number of downloads of each file
SVG files are not supported by the current version of the extension. Reason: Magento 2 does not validate SVG files. |
Business value
Product Downloads for Magento 2 helps support your products with detailed specifications, instructions on use, video tutorials, samples, templates, demos and other attachment files - easily accessible and downloadable from the product pages on the Storefront. By offering free downloadable materials with the help of Product Downloads you can inform customers well on the worth and quality of products, increase customer trust as well as store traffic.
Configuring M2 Product Downloads
To configure the extension, proceed to Stores → Aheadworks Extensions → Product Downloads.
The extension configuration page comes in three sections: General, Default Value and Manage Icon.
The General section defines how the files will look like on the Storefront. The following configuration options are available herein:
- Block Title - the text-field to contain the title for the Product Downloads block;
- Display File Size - the Yes/No selector to show/hide the size of the file next to its name;
- Show on - the drop-box to define the location for the display of the Product Downloads block: Side Bar, Under Add to Cart Button, Product Tab
If your Magento 2 theme does not presume a sidebar on product pages, you will not be able to see the Product Downloads block on the Storefront. |
The Default Value section defines who will see the files on the Storefront. There is one configuration option herein:
- Customer Group - the selector of customer groups to be eligible to see the files (multiple selection is possible);
The Manage Icon section enlists the images which are used to visually identify the types of the files on both back- and front-end. The section shows a table of the following columns:
- File Type - the text-field to identify the type of the file;
- Icon - the Choose File button to upload an image file for the given type;
- Action - the bucket icon to delete the row.
To add a new row to the table and specify the data for the new file type, click on the Add New button below the table.
Icons, indicated herein, are automatically assigned to the product attachment files when the latter are uploaded to the store. This is done in compliance with the types of the files as indicated in the table herein. |
The extension comes with a prearranged list of icons and file-types: csv, doc, jpg, mp3, mp4, pdf, png. The Admin is always able to change either the file type assigned to the icon, or the icon linked to the file-type.
On Backend
Monitoring Files
To view the product attachment files uploaded to your Magento 2 store, go to Catalog → Product Downloads by Aheadworks → Files.
The page suggests the Files Grid, Add New Attachment and Synchronize Attachments buttons.
The Files Grid aggregates the details about all uploaded to the system product attachment files. The grid has the following columns:
- ID - identification number of the file;
- Icon - the thumbnail of the file image;
- Name - the name of the file, including the file type;
- Number of Downloads - the number of times the file has been downloaded;
- Visible - the status of file visibility on the Storefront: Yes/No;
- Customer Groups - the groups of customers eligible to download the product attachment file;
- Action - the Edit active link to lead to the Edit File page.
The grid is sortable and supports pagination.
Adding Files
There are four ways of adding product attachment files to the system:
- Via a product page (multiple files can be uploaded);
- With the help of the Add New File button on the Files page (one file is uploaded at a time);
- Import products and product attachment files (multiple files can be uploaded)
- Uploading files straight to the server (multiple files can be uploaded).
SVG files are not supported by the current version of the extension. Reason: Magento 2 does not validate SVG files. |
Add Files to FTP
Upload files to media/aw_pd/files. When files are uploaded onto the ftp-server, they will automatically get represented in the Files grid. This requires re-indexing the database, which can be done in two ways:
- Wait for the next planned index update by the cron;
- Go to Catalog → Product Downloads by Aheadworks → Files and click the Synchronize Attachments button.
When files are uploaded to the ftp-server, the Customer Group parameter will be set to All Groups, and Display Name (see the New Attachment page) will get the name of the file. |
Add Files to Files Grid
To add files one by one to the Files grid, go to Catalog → Product Downloads by Aheadworks and click on the Add New Attachment button.
The New File page will get loaded, similar to that of Edit [Name] File. The New/Edit File page has the following parameters for configuration:
- Type - the File/URL selector to define the source of the file;
- File (when Type → File is selected) - the upload button, the file preview window, file name and size, the bucket active icon to delete the file;
- Link (when Type → URL is selected) - the text-box to welcome the url of the file;
- Customer Group - the list of the groups of customers eligible to download the product attachment file (multi-select is possible);
- Is Visible - the Yes/No toggle to define if the file is visible on the Storefront.
- File Name - the text-box to indicate the name of the file as it will appear on the Storefront.
Click Save in the top right when finished to save the configuration of the file and add it to the Files grid.
Attach Files to Products
To attach files to a product, proceed to Catalog → Inventory → Products and select a product for editing. When the Product page is loaded, scroll down to the Product Downloads section.
The Product Downloads section allows attaching multiple files to the product. The Admin can attach either existing files or upload new ones. The section delivers the functionality to attach files and to browse the files which have already been associated with the product. The latter is done with the grid located at the bottom of the section.
The grid with the attached files has the following columns:
- ID - identification number of the file;
- Icon - the thumbnail of the file image;
- Name - the name of the file, including the file-type;
- Visible - the status of file visibility on the Storefront: Yes/No;
- Customer Groups - the groups of customers eligible to download the product attachment file;
- Action - the Edit active link to lead to the Edit File page.
The grid supports pagination and allows re-arranging the order of the rows. The latter is needed to set the order of the files on the Storefront. To re-arrange the order of the rows, make use of the icon next to the ID of the file. Push on the icon, and drag-and-drop the row to the new position. The grid will get populated as files are being attached to the product.
To attach files which have already been uploaded to the system, click on the Select Existing File button. The Select Files popover will emerge. The popover fetches the Files grid with check-boxes next to each row. Tick the check-boxes which correspond to the chosen files and click on the Add Selected Files button below the grid. The popover will get closed, the files will be added to the product, and the Product Downloads sections on the Product page will get updated.
To attach files which have not yet been added to the system, make use of either of the "Click here or drag-and-drop files" area or the Add a Link text field. Files attached to a product this way, will automatically populate the Files grid and will receive default values for the following parameters:
- Icon - the icon image as per the Manage Icon section in Extension Configuration;
- Visible - Yes;
- Customer Groups - All groups;
- File Name - the name of the upload.
You can add multiple files in one go with the help of the 'Click here or drag-and-drop files", but only one file at a time with the help of Add a Link. To do so, insert a link into the Add a Link text-field and click on the Add Link button.
Import/Export Files
To import product attachment files to the system, go to System → Data Transfer → Import and perform the operations as described in the official Magento 2 user guide.
On Front-end
When on the Storefront, customers are able to see product attachment files on product pages in one of the three alternative locations (as set in the Extension Configuration) under the block-title and in the order as set on the backend. To download a file, customers click on the name of the file.
Already used our product?
We would appreciate your feedback. Please, leave a review.