Posts

Showing posts with the label How To Create Your First Module On OpenCart - Amigoways

How To Create Your First Module On OpenCart - Amigoways

Image
  Amigoways   Explain how to create your first module on OpenCart with these easy step-by-step instructions. We need to create our extension folder in the folder extensions which is located in the root folder. The  folder structure  will be shown below. { "name": "Module name - Module Name", "version": "1.0", "author": "amigoways", "link": "https://www.amigoways.com" } Admin The admin folder is for the admin panel functionalities. As OpenCart is an MVC framework, it contains a  model, view and controller  as usual. Controller We should give a namespace for each controller we created. namespace Opencart\Admin\Controller\Extension\Modulename; class ClassName extends \Opencart\System\Engine\Controller { The controller will contain  install and uninstall  functions to install/uninstall the extension.   public function install() { //to do code } public function uninstall() { //to do code } To load the  model  an...