Customize controller
By default, all S-Cart controller files are located in:
Specifically:
Step 1: Copy the controller file you want to edit out of the vendor according to the correct structure:
Customize it your way
Since S-Cart version 6.9, you can optionally change the content of conntroller files to your way.Front-end: "vendor/s-cart/core/src/Front/Controller"
Back-end: "vendor/s-cart/core/src/Admin/Controller"
Specifically:
Step 1: Copy the controller file you want to edit out of the vendor according to the correct structure:
Step 2: Rename the namespaceEg:
- "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 3:- "SCart\Core\Admin\Controllers" -> "App\Admin\Controllers"
- "SCart\Core\Front\Controllers" -> "App\Http\Controllers"
Customize it your way
Related topics
Latest Document
- Discount code (coupon) 2023-05-14
- Upgrade guide 2023-03-19
- Data relations in S-Cart 2023-02-05
- Custom data fields in S-Cart 2023-02-05
- Upgrade guide 2022-10-05