Starting with the E-goods add-on version 184.108.40.206, it is possible to use Amazon S3 to store files for downloadable products.
This feature enables you to save server space and restrict access to valuable files (such as proprietary MP3s) only to those customers who have made a purchase.
To make use of the off-site storage feature, the store administrator will need to follow the steps below:
1. In the IAM section of the Amazon Web Services Console, create a user with the Programmatic access option enabled:
2. At the step Permissions, create a new group for the user or assign them to an existing group. For this group, enable the policies
3. Review the user details. If all is correct, click Next.
4. At the step Complete, locate your AWS access key and AWS secret key; you will need to copy and paste them into the appropriate fields on the E-goods add-on settings page in your X-Cart store.
5. In your X-Cart store Admin area, adjust the settings in the section Amazon Signed URLs of the E-goods add-on settings page:
- Enable usage of Presigned URLs for Amazon S3 links: Enable this setting. As a result, you will be able to access the fields for your Amazon S3 credentials (They will be shown below).
- Amazon access key: Copy and paste the AWS access key you have obtained from Amazon.
- Amazon secret key: Copy and paste the AWS secret key you have obtained from Amazon.
- S3 Bucket name: Copy and paste your S3 bucket name (You can get it from the S3 section of AWS).
The same credentials can be used in the Amazon S3 add-on by the X-Cart team.
6. Save the changes. This will connect your AWS account with your X-Cart store.
Once the connection has been set up, the store administrator will upload files of nearly any size onto the S3 Storage service of AWS and use them to configure downloadable products.
Here’s how it can be done:
- Once a file has been uploaded onto S3, copy the URL of that file.
- In X-Cart, find the product for which you wish to add this file as a downloadable attachment.
- On the Attachments tab of the product details, select Add file -> Via URL.
- In the Upload file box, paste the URL copied from S3 and un-check the box Copy file to a local server.
- Click Upload.
As a result, the product will be linked to the S3-stored file that has been specified.