Back to Top

Laravel eCommerce Customer Document

Laravel eCommerce Customer Document extension allows the admin to upload documents for the customers.

With these documents, the admin can easily give customers product information, such as the SKU and the description.

Also, one document can hold several files, including images. The page shows a thumbnail for every image while the admin uploads it.

Moreover, the admin can share new offers and discounts in a marketing document. The admin can also decide how many times each customer may download a document.

Requirements

  1. Bagisto: v2.5.0
  2. PHP: 8.4 or later (Laravel 13)
  3. Database: MySQL, MariaDB or PostgreSQL

Features of Laravel eCommerce Customer Document

  • The admin uploads documents for all the customers.
  • Admins can also upload a document for one specific customer from the customer’s page.
  • You can create product and marketing documents.
  • One document holds several files of different types, and each image gets a thumbnail.
  • Admins set a document as active or inactive, and change the status of many documents at once.
  • Admins set the download limit of a document. After an edit, the module adjusts each customer’s remaining downloads instead of resetting them.
  • Admins choose the allowed file types and the maximum file size. The module checks the extension and the real content of every file. It also tells the admin why it rejects a file.
  • Admins edit, delete and download documents, one by one or many at once, and get a zip file.
  • Customers see the documents and the remaining downloads, and download each document as a zip file.
  • Each role gets its own access: view, create, edit and delete.
  • The module works with Bagisto v2.5.0, MySQL, MariaDB, PostgreSQL and a database table prefix.

Installation of Laravel eCommerce Customer Document

After you download the zip file of the Laravel eCommerce Customer Document, unzip it. Then merge the packages folder into the project root directory.

The package already contains the compiled assets, so you do not need any npm step.

First, open the composer.json file and add the following line under ‘psr-4‘:

"Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument/src"

Next, open the bootstrap/providers.php file and add the following line under Provider:

Webkul\CustomerDocument\Providers\CustomerDocumentServiceProvider::class,

#Run Commands

Then run the commands below to finish the setup.

composer dump-autoload
php artisan customer-document:install

The install command runs the migrations, publishes the assets and clears the caches. You do not need to add anything to config/concord.php.

Admin Management

Configure the module

To set up the module, the admin goes to Configure>Upload Document>Documents.

Laravel eCommerce Customer Document settings in the admin panel

Then the admin sets these options:

Status: Turns the module on or off. The Documents menu shows in the admin and in the customer account only after the admin enables the module.

Max Size: Sets the maximum file size of a document in MB. The default is 5 MB, and the highest value is 10.

Allowed Types: Sets the file types as a comma-separated list, for example pdf,csv,xls,docx,jpg,jpeg,png,webp,gif.

This list is the default, so images work from the start. However, a store that saved its own list keeps it. So the admin adds the image types to that list.

After that, the Customer Document Icon appears in the menu bar on the left side. The admin clicks the Documents icon, and the following page opens.

Customer document list in the Laravel eCommerce Customer Document module

Here the admin finds all documents in a list with search and filters. Each row has a download, an edit and a delete action.

Also, the admin can pick several rows to change their status or delete them together.

Create a document

To add a new document, the admin clicks the Create Document button.

Create a document form of the Customer Document module

Then the admin enters these details:

  • Name: Enter the document name.
  • Type: Choose Product for a product document, or Marketing for offers and discounts.
  • Status: Choose Active or Inactive. Customers see only active documents.
  • Description: Enter the description.
  • Number of download Document: Set the maximum number of downloads for each customer.
  • File: Choose one or more files. The upload box lists the allowed types, and every image gets a thumbnail with its file name.

If a file is not allowed, the module does not save the document. The file type may not be in the list, or the file may be too large.

Its content may also not match its extension. In that case, the page shows the reason below the file box.

Finally, the admin clicks the Save Document button.

Edit a document and the download limit

The admin opens any document with the edit action. Then the admin changes the details, adds more files, replaces a file or removes one. The page also shows thumbnails of the saved images.

Each customer has a separate download counter. It starts at the limit that the admin sets, and it drops by one for every download.

When it reaches zero, the customer cannot download the document again. Downloads by the admin do not count.

When the admin saves a document with the same limit, the counters stay as they are. When the admin changes the limit, the module moves every counter by the difference.

For example, raising the limit from 3 to 5 gives each customer 2 more downloads. Lowering it from 5 to 3 takes 2 off, but never below zero.

Add a document for a specific customer

Besides that, the admin can add a document for one specific customer. A document from the Documents menu goes to every customer. However, a document from a customer’s page goes only to that customer.

First, the admin goes to Customers>Customer.

Customer list in the admin panel

Next, the admin opens the customer. The customer page then has a Documents section. It lists that customer’s documents together with the documents for everyone.

Documents section on the customer page

Then the admin clicks the Create Document button. The form asks for the same details as above.

Create document form for a specific customer

Roles and permissions

The admin decides which roles use the module under Settings>Roles, in the Documents group. A role can view, create, edit and delete documents separately.

Customer View

The customer finds all the documents under My Account>Documents. For each document, the page shows the name, the description and the remaining downloads.

Also, the customer downloads the files as a zip.

Customer document list in the customer account

Then the customer clicks the Marketing tab to see the marketing documents.

Marketing documents in the customer account

When a customer uses up all the downloads of a document, the page says so. Customers see only active documents meant for everyone or for them.

Besides, the module keeps the files private, so no one can open them with a direct link.

That’s all for Laravel eCommerce Customer Document. If you have any issue, feel free to add a ticket.

Also let us know your views to make the module better https://bagisto.uvdesk.com/en/

Current Product Version - v2.5.0

Supported Framework Version - Bagisto v2.5.0

Blog Version - Bagisto v2.5.0
  • Version v0.1.7
  • Version Bagisto, v2.4
  • Version Bagisto, v2.0.0
  • Version Bagisto, 1.2.0
  • Version Bagisto, 1.1.1
  • Version Bagisto v2.5.0
  • Version Bagisto v2.4.10
. . .

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
On this page

Table of Content

Back to top