Since S-Cart version 6.9, you can optionally change the content of conntroller files to your liking.
Create controller files corresponding to the files in the vendor:
- "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"
- The location of the controller file must be exactly like the example above
- The file name must be the same as the core file
- Must change the correct namespace, for example
You have 2 options to create a new file (*):
- File core: "SCart\Core\Admin\Controllers" -> File new: "App\Admin\Controllers"
- File core: "SCart\Core\Front\Controllers" -> File new: "App\Http\Controllers"
(*) We recommend you to use method 2 (extend from old file). This will help you inherit the latest updates from s-cart/core.
- Method 1: Copy the new file content like the core file, just change the namespace (You must copy the full content from the core file)
- Method 2: The new file is extended from the core. Just rewrite the necessary functions to your liking.
- Backup & Restore
- S-Cart command line
- Create custom functions
- Configure data validation
- Customize your router
- Functions helper of S-Cart
- How to customize home page
- Customize admin dashboard page
- Customize helper functions
- Disable ecommerce router
- Convert S-Cart into a news website
- Customize data fields in S-Cart
- Data relations in S-Cart
- Customize search page