Why extends Shopper
One might ask, knowing that the purpose of setting up an e-commerce site is simply to make the whole system work without always wanting to add to it. For example if you want a blog on your store, a section for a KYC, or maybe a forum, instead of creating another project to manage this you can directly extend Shopper to manage all this in the same administration area.How to extend Shopper
To add new features to Shopper, the first thing you need to do is to register a new element in the sidebar by creating an event (for exampleRegisterCustomMenu) and load it directly into your AppServiceProvider like this
config/shopper/ folder
/routes.phpfor the routes that should be dynamically loaded for the admin panel/shopper.phpfor the configuration that should be loaded for the cpanel.
How not to extend Shopper
It should go without saying — but we’ll say it anyway just in case… Don’t ever, for any reason, ever, no matter what, no matter where, or who, or who you are with, or where you are going or… or where you’ve been… ever, for any reason, whatsoever, edit the files inside/vendor/shopper. Or any other Composer package.
Anything you do will get blown away and you’ll lose those changes forever and ever amen.
You should instead build addons, extensions, and submit pull requests to admin (after checking with the team first
if we’ll accept them). Thanks!