Back to Top

Guide for Magento 2 Base Cloud Storage

Updated 7 August 2024

Magento2 Base Cloud storage allows business merchants to store product-related information like; images, product attachments, etc. It gives extra space to the cloud storage for storing product data.

Check the video mentioned below, for understanding the workflow of the extension:

d4j5ozia49k

The store admin can also export orders, invoices, shipments, etc. of their Magento 2 store with the help of Magento 2 google drive integration module. The admin can even check the overall storage and folders with the drive name.

Features

  • The admin can enable or disable the module status.
  • The store admin can select from which drive frontend images will display.
  • The admin can mass export the product attachments to cloud storage from the product listing mass action.
  • The admin can mass export orders, invoices, shipments, and credit memos separately as well as all together at once.
  • The store admin can check how many folders and files are present on the drive from the cloud storage dashboard page.
  • The admin can export the files from the cloud dashboard page to the cloud storage drive.
  • The store admin can check the storage consumed by the files present on the cloud storage directly from the cloud storage dashboard page.
  • Admin can check the “Permission”, “State”, and “File count” of the folder from the cloud storage dashboard page.
  • The admin can choose the folder id to which he wants to export the file.
  • All the images and banners will directly display from the drive Url on the front end.

Install Magento2 Base Cloud Storage from Webkul Store

#1 Download Module

Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.

#2 Upload Folder

Once the module zip is extracted, follow path src>app and then copy the app folder into the  root directory on the server as shown below:

Start your headless eCommerce
now.
Find out More
m2_installation

#3 Run Commands

After uploading the module folder, you need to run the following commands in the Magento 2 root directory:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

Create the service account using google console

To get the Service account credentials for Google Drive, start by creating a project. Navigate to “Select a Project” and choose “New Project”.

Then add project name and location to create a new project.

createnew project

After creating the project, you will be redirected to a new page. From there, navigate to “Create Credential” and select “Service Account.”

createcredentials

Provide details such as the name and account ID to create a service account.

serviceaccount

Once the account will be created you need to click on edit to edit the service account.

editservice account

After clicking the “Edit” button, you will be redirected to a new page. Here, navigate to the “Keys” tab to create a new key.

key

To create new key click on add key then create new key as shown in below image.

createkey

Then select the key type as JSON.

jsontype

After that you can download the ZIP file and extract it to access the private key, client email, and client ID.

zip

How to Create Folder IDs

For the cloud folder ID, you need to copy the parent folder’s Drive ID.

parent folder

For the cloud folder ID for filesystem images, you need to copy the sub-folder’s Drive ID.

Next, copy the client email ID and grant access to the Google Drive link for that email ID.

Configuration- Magento2 Base Cloud Storage

Note: The admin has to run the given command for Magento 2 Base Cloud Storage.

composer require google/apiclient:^2.0

The admin will navigate through Stores> Configuration> Base Cloud Storage to make general configurations.

General Settings

Module Enable- Select ‘Yes‘ from the dropdown list to enable the module status.

Show Frontend images from drive- The admin has to select the drive from which the frontend images will display.

storagedetails

Google Drive Integration

Storage Connection Enable- From here, the admin has to enable the storage connection by selecting Yes.

Instance Name- Enter the instance name here.

Cloud folder ID- Now, the admin will have to enter the cloud folder ID.

Cloud folder ID for Filesystem Images- Similarly, the admin will enter the cloud folder id for the image filesystem.

serveraccountdetails

Service Account Credentials

Private Key- The admin will enter the private key that they received for the service account.

Client Email- The store admin will enter the client’s email that they received from the service account.

Client ID- Similarly, the admin will enter the client ID that they received from the service account here.

The admin can export all media from here by clicking on the Export All Media button.

exportmedia

Workflow of Magento 2 Base Cloud Storage

Furthermore, by navigating through Base Cloud Storage> Cloud Storage Dashboard the folders and overall storage will display on the dashboard.

The number of folders and files with the drive name will also display on the dashboard in the Storage Drive tab.

Moreover, the overall storage record will also be visible right below the folders.

drivedata

Now, the admin will click on the Export button to export the files from the cloud storage. A Cloud Export form will appear to export the files as shown in the screenshot.

cloudexport

Storage Type- Select the storage type from the dropdown list.

Parent Folder ID- Enter the parent folder ID of the drive.

Select File- Select the file which you want to extract.

Moreover, the drive folders will also display in the Drive Folders tab as shown in the screenshot:

drivefolder

Product Export

The admin will navigate through Catalog>Products to export the products from cloud storage. Here, the admin will click on the Actions dropdown menu after selecting the products they want to export as per the screenshot.

selectproduct

After that, select the Export Attachments to Cloud option from the dropdown.

A popup will appear for the confirmation to export the attachment as shown in the image.

notification

Once the admin clicks on the Ok button, it will redirect to the below-shown page.

cloudexport

The admin will select the storage type from here and need to enter the parent folder id and click on the export button.

The product export takes place as per the selected products as per the image below.

exportdone

Order Export

The store admin will navigate through Sales>Orders to export the orders from cloud storage. The admin will have to select the order to be exported and select the Export Attachment to Cloud option.

This will open another option to select which attachment the admin wants to select as per the image.

exportallorders

The admin can select the export invoices, shipments, and credit memos to export particular order details. Moreover, the admin will select the Export All option to export all the attachments.

Any of the selections will redirect the store admin to the below-shown page.

orderexport

Here, the admin will have to select the storage type and enter the parent folder id and click on the export button. The order export will take place as shown below and the orders will get exported.

orderexport

Note: The admin can only export the completed orders. The incomplete or pending orders will not get exported.

Frontend Product Page View

Therefore, you can view the product images on the store frontend.

magento2 base cloud storage

If the customer views the image, they can check the Drive URL as shown below.

Note: The images that will be displayed should have public permissions on Drive.

productimagedrivelink

That is all about the Magento2 Base Cloud Storage. If you have any queries regarding the plugin, please contact us at Webkul Support System.

You can also check our complete Magento 2 extensions.

Current Product Version - 5.0.0-p1

Supported Framework Version - 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

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


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home

Table of Content