Amazon AWS S3 CDN media server cloud v8 – module for PrestaShop

Actual module page is: here

Compatibility
PrestaShop 8.x

Download documentation
readme_en.pdf

Goal
Amazon AWS S3 CDN media server cloud v8 is a PrestaShop module that speeds up your online store by transferring most of your store files to CDN and keeps loading them from Amazon AWS S3 cloud. The module replaces the standard media server and provides a much more flexible system of settings and file control.

Benefits for Merchants

  • Admin can determine which files need to be placed in the cloud: by category (theme, modules, etc), by type, by extension;
  • Finely manage files that need to be loaded from the server or cloud;
  • Admin can upload any file from the cloud back to the server if necessary;
  • Admin can use AWS S3 Bucket or AWS Cloud Form;
  • Use for FRONT-END files only without any risks for back-end functionality;
  • NEW! Option to set an automatic upload of new images to AWS without duplicating them in PrestaShop

Benefits for customers

  • Customers will get parallel content loading streams while opening the site, so the speed will be higher compared to pure hosting-located files of the site;
  • Security and accessibility of files located on AWS – content will be available 100% of the time even if hosting could not respond due to high load, etc;
  • Speed of store loading is a benefit for any customer;
  • NEW! Option to set an automatic upload of new images to AWS without duplicating them in PrestaShop

Features

  • Admin can upload all or selected files to AWS cloud. It’s possible to determine which files need to be uploaded there (by extension or type, etc). Admin is allowed to upload theme files to the cloud but keep modules files on hosting, so the settings are very flexible;
  • Admin can return any selected file from the cloud so that this file will be loaded from hosting. It’s possible to get this file back to the cloud anytime;
  • Files source links in HTML code will be automatically updated according to the location of the files: cloud or own hosting. In case admin changes settings (replaces the source from cloud to hosting or vice versa), source links will be updated accordingly, so no broken images, links, etc., will occur;
  • NEW! Option to set an automatic upload of new images to AWS without duplicating them in PrestaShop

Video
https://youtu.be/E2HvnZbIpfE

Module settings

1. “Configuration” tab

Amazon AWS connection settings:

PrestaShop Amazon AWS test

  • Bucket name – your Bucket name of Amazon S3 service
  • Access key – access key of your Amazon account
  • Secret key – secret key of your Amazon account
  • Location – AWS server location
  • Use Cloudfront – (Yes/No) use Cloudfront. All links to files in Bucket will go through Cloudfront then
  • Cloudfront ID – your Cloudfront ID
  • Button Test link to AWS – button to validate data and test AWS connection

Selecting files to upload to AWS and use on the site:

PrestaShop Amazon AWS config

    • Synchronize Images – upload style files to AWS
      • Product Images – all product images
      • Category Images – all category images
      • Manufacturer Images – images (logos) of manufacturers
      • Modules Images – images of modules on the site (sliders, banners, etc.) *
    • Synchronize CSS – upload style files to AWS
      • Main Files CSS – core files (located in /css)
      • Theme Files CSS – your Theme Files
      • Modules Files CSS – your Modules files
    • Synchronize JS – upload JavaScript files to AWS:
      • Main Files JS – main files (located in /js)
      • Theme Files JS – your theme JS files
      • Modules Files JS – JS files for your modules
    • New uploaded files management:

PrestaShop Amazon AWS files management

Added a switcher to automatically delete new files from the Prestashop server after uploading to Amazon AWS S3 for images of:

  • Products
  • Categories
  • Manufacturers

AWS S3 Cloud PrestaShop

2. “General” tab

PrestaShop AWS S3 Cloud

      • Load files to AWS – Transfer all files according to Configuration tab settings
      • Upload new/edited files – Only upload newly created or modified files
      • Check Modification Dates – Review file modification dates for control
      • Remove Inactive Files – Delete deactivated files from the cloud
      • Empty Bucket – Purge the entire cloud

PrestaShop Amazon AWS files table

      • Site Files – Path from the site’s root to the file
      • Utilize AWS – (YES/NO) Indicating AWS usage for file retrieval
      • Type – File type (image, CSS, JS)
      • Category – File category (product, category, manufacturer, modules, theme, main)
      • Upload Date – Date of file upload to AWS server
      • Modification Date – Date of file modification on the server
      • Prestashop – File presence on the Prestashop server

File Management Options:

      • Upload file to AWS
      • Retrieve file from AWS to the server
      • Deactivate file
      • Activate file
      • Delete file from Prestashop server

Advanced Configuration Settings:
PrestaShop Amazon AWS file types

You can modify or add new file extensions for uploading to the AWS server.

3. Product page:

PrestaShop Amazon AWS product page

  • Upload new files directly to Amazon AWS Cloud – Immediately transfer images to AWS
  • Delete new files from Prestashop, leaving them exclusively on Amazon AWS Cloud – Remove images from the Prestashop server after uploading to AWS S3

PrestaShop Amazon AWS product page new design

4. Category page:
PrestaShop Amazon AWS category page

  • Upload new files immediately to Amazon AWS Cloud – Upload images directly to AWS
  • Delete new files from Prestashop and keep exclusively on Amazon AWS Cloud – Remove images from the Prestashop server after uploading to AWS S3

6. Brand page:
PrestaShop Amazon AWS brand page

  • Upload new files immediately to Amazon AWS Cloud – Upload images directly to AWS
  • Delete new files from Prestashop and keep exclusively on Amazon AWS Cloud – Remove images from the Prestashop server after uploading to AWS S3

Attention! Keep in mind that if you select the ‘Yes’ option, all new media files will only be stored in the Amazon AWS Cloud and not on your Prestashop store hosting! You must be aware of the implications of this setting and the risk of file loss.

7. “CRON jobs” tab:
Cron job AWS Amazon S3 PrestaShop

List of CRON tasks that you can add to your server for automatic execution of tasks.

Update And Upload Files – Search for new files or files that have been changed. Upload them to the cloud and synchronize their data.

Setting up AWS S3

AWS S3 registration

        1. Create your Bucket (Create bucket)
        2. Ensure to uncheck the box for Block all public access

AWS S3 account registration

Amazon AWS S3 account registration

      1. Once the Bucket is created, open it and navigate to the Permissions tab > Cross-origin resource sharing (CORS) section

Amazon AWS S3 new account registration

Click the Edit button and configure CORS (JSON format):

[

{

“AllowedHeaders”: [],

“AllowedMethods”: [

“POST”,

“GET”,

“PUT”,

“DELETE”,

“HEAD”

],

“AllowedOrigins”: [

“https://mypresta.loc”

],

“ExposeHeaders”: []

}

]

Where AllowedOrigins is your site URL.

Access Key Retrieval:

Amazon AWS S3 account key

      • Visit Security credentials -> Access Keys
      • Click on Create New Access Key
      • A modal window will appear suggesting you save the key in a CSV file. Keep this file in a secure location. You will find the Access key and Secret key in the file required for configuring the module.

 

Installation

– Upload the module through the Backoffice (Modules > Add New Module) or using an FTP client

– Click Install and configure the settings

Additional Notes

Replacing styles and scripts URLs on the site:

PrestaShop Amazon AWS other notes

Updating image URLs on the site:

PrestaShop Amazon AWS replacing image

PrestaShop Amazon AWS replace image URL

Important Note: The module includes a console command for AWS synchronization. You can initiate the update of file modification dates, search for new files (as per the module settings), and upload them to the AWS cloud using the command line by executing the following file:
amazonawss3cdnmediaserver/update-edit-and-new-files.php

Additionally, there are helpful filters on the module settings page to list files:

PrestaShop Amazon AWS product images management

Prestashop Multishop

      • Physical URL: supported
      • Virtual URL: supported

Each store must configure its own settings.

Leave A Comment

Your email address will not be published. Required fields are marked *

3 + sixteen =