You can allow customers to upload files in WooCommerce on product purchases and store them in a specific Google Drive folder. This feature is useful for customers who want something in terms of their custom test. For example: upload custom t-shirts for them, upload necessary invoices, and others like that.
Step-1: Install Necessary Plugins
Make sure you have installed both WooCommerce & the Connect Drive plugin inside your website. Also, make sure that your WooCommerce store is 100% up and running.
Step-2: Enable WooCommerce Integration
To make things work for you properly, you have to enable WooCommerce Integration from the Connect Drive plugin.
Navigate to Google Drive > Settings > Integrations > Enable WooCommerce Integration > Save Changes.
Step-3: Enable Google Drive Upload
To enable Google Drive upload, navigate to Google Drive > Settings > Integrations > Enable Uploads. Once you enable uploads, you will notice many other options to control the uploading field from different perspectives.
- Upload Box Locations: You can fix or restrict the display of the upload box on a specific location to be allowed to upload files. You have to select the locations where you want to show the upload box in WooCommerce products.
- Product Page
- Cart Page
- Checkout Page
- Order Received Page
- My Account Page
- Checkout Page Upload Location: Select the location where you want to show the upload box in the checkout page. Ex: Billing Section, Shipping Section, etc.
- Show Upload Box Based on Order Status: Select the order statuses when you want to show the upload box. These options will only work on the Order Received and My Account page.
- Pending Payment
- Processing
- On Hold
- Completed
- Canceled
- Refunded
- Failed
- Enable Folder Selection: Enable this option to allow users to select the upload folder and upload files to the selected folder.
- Select Default Folder: Select the default folder where the files will be uploaded if the user doesn’t select any folder.
- Folder Selection Label: Set the label for the folder selection.
- Enable File Description: Allow users to add a description to the uploaded files.
- Upload Parent Folder: Select the parent folder where the new folder will be created.
- Folder Naming Template: Set the upload folder naming template. When a customer uploads a file, a new folder will be created with this name.
Step-4: Enable Uploadable Product
You can enable uploadable products and enable the upload option for WooCommerce. This will allow users to upload any file while they are interacting with WooCommerce orders.
To add new products, navigate to Products > Add New > Give a Product Title.
From the Upload Options section, check the Uploadable type > navigate to the Upload to Google Drive menu > check Show Upload Box > Click on Configure Uploader.
Step-4: Configure Uploader
Configure Sources Tab
On the Sources Tab, select folders where you want to permit users to upload files & folders by clicking the plus sign button. On the right side, your selected files will be displayed. You can drag them up or down to change their orders.
- Use Private Folder: Turn ON to upload the files in the private folder linked to the user. Note: If enabled this module will be visible only to logged-in users.
- Create Private Folder: Turn ON to create and link a folder automatically to the user who has not linked any folder yet while the user will view the module.
- Naming Template: Set the folder name template for the automatically created private folders.
- Parent Folder: Select the parent folder where the automatically created private folders will be created.
- Template Folder: Select the template folder that will be copied to the new private folder.
- Merge Folders: Allow merging folders if a folder with the same name already exists.
- Create Private Folder: Turn ON to create and link a folder automatically to the user who has not linked any folder yet while the user will view the module.
- Use ACF field Files: Enable this option to use the ACF field files dynamically as the source for the module. Enter the ACF field name in the ACF Field Key input box to use the files from the ACF field.
- Enable Folder Selection: Enable this option to allow users to select the upload folder and upload files to the selected folder.
- Select Default Folder: Select the default folder where the files will be uploaded if the user doesn’t select any folder.
- Folder Selection Label: Set the label for the folder selection.
Configure Filter Tab
Now you have taken to the Filter tab, where you can allow/ disallow files through their extensions.
With the help of the Filter tab, you can simply allow/ disallow any files with the extensions you want. For example, you want to allow/ disallow (.jpg, .png, .ppt, .doc files).
Simply type the extensions in the Allowed Extensions box, and you get to go. Keep in mind that when “Allow all” is enabled, exceptions will not be uploaded.
- Allowed Extensions: Enter comma (,) separated file extensions to allow, such as “jpg, png, gif”. Leave empty to upload all extension files.
- Max File Uploads: Enter the maximum number of files you want to allow users to upload.
- Max File Size(MB): Enter the maximum file upload size in MB.
- Min File Size(MB): Enter the minimum file upload size in MB.
Configure Advanced Tab
In the Advanced Tab, you can customize some advanced settings as per your requirements.
- Module Container: Set the module container width and height. You can use any valid CSS unit (pixels, percentage), eg ‘360px’, ‘780px’, ‘80%’. Keep blank for a default value.
- Show Upload Label Text: Display an upload label text that will be visible under the upload button.
- Upload Immediately: Start uploading files immediately after they are selected.
- Show Upload Confirmation: Show/ hide the upload confirmation message after upload is complete.
Configure Notifications Tab
Now you will be redirected to the Notifications tab where you will customize notification settings configuration.
- Enable Notifications: Enable email notifications to get notified on various user activities (upload, download, delete, etc).
- Upload Notification: Receive an email notification whenever someone uploads files through this module.
- Notification Recipients: Enter the email address where the notifications will be sent. Add multiple email addresses by separating them with a comma (,). Placeholder example: %admin_email%, %user_email%
- Skip Current User Notification: Enable to skip the notification for the user that executes the action.
Configure Permissions Tab
User Permissions Settings is the final step. Where you can manually allocate display options.
- Upload: Allow users to upload files.
- Overwrite Files: Enable overwriting files with the same name.
- Enable Folder Upload: Allow users to upload folders. A folder upload button will be added.
- Enable File Description: Allow users to add a description to the uploaded files.
- File Name Template: Enter file name template. You can use predefined templates to configure.
- Enable Password Protection: Enable password protection for this module. Users will need to enter the password to access the module.
- Password: Set the password for this module.
- Display for: Select the user roles and specific users who are allowed to access the module.
- Everyone: Display the module for everyone.
- Logged In: Display the module for logged-in users only.
- Filter Users & Roles: Select the users and user roles who can see the module.
- Everyone Expect: When activated, the module will be visible to everyone except for those specifically exempted.
- Show Denied Message: Show a message to users who don’t have access to the module.
- Display Login Screen: Display a login message for the modules when authentication is required.
Step-6: Upload Files
Once the order is placed now customers can upload files while placing an order. From the Order details section click on the upload button > browse files > select the files.
Now uploaded files will be uploaded to Google Drive in the selected folders. This is how your customers can upload any kind of file while purchasing any uploadable product, which will be stored in your Google Drive account.
Step-7: View Customer-Uploaded Files from WooCommerce Order Page
Once the customer uploads files, you can track them from the WooCommerce > Order page and view their uploaded files.
Step-8: View Customer-Uploaded Files from Google Drive Order Folder
You can also check uploaded files directly from your Google Drive selected order folder. To check, navigate to the order folder being created once the order is placed.