Customize controller

By default, all S-Cart controller files are located in:

Front-end: "vendor/s-cart/core/src/Front/Controller"
Back-end: "vendor/s-cart/core/src/Admin/Controller"

Since S-Cart version 6.9, you can optionally change the content of conntroller files to your way.
Step 1: Copy the controller file you want to edit out of the vendor according to the correct structure:

- "S-cart-folder/vendor/s-cart/core/src/Front/Controllers/FileNameFront.php" -> "S-cart-folder/app/Http/Controllers/FileNameFront.php"
- "S-cart-folder/vendor/s-cart/core/src/Admin/Controllers/FileNameAdmin.php" -> "S-cart-folder/app/Admin/Controllers/FileNameAdmin.php"

Step 2: Rename the namespace

- "SCart\Core\Admin\Controllers" -> "App\Admin\Controllers"
- "SCart\Core\Front\Controllers" -> "App\Http\Controllers"

Step 3:
Customize it your way

Related topics

Latest Document