Skip to main content

Posts

Showing posts from September, 2012

OpenCart : Create a Controller

To make a cotorller class Controller<foldername><filename with out extention> extends Controller{    public function index(){     .....     }    public function showlist(){     .....     }  }  The there will be no space in the class name and it should extend the controller class. This controller can be called by example.com/index?route=foldername/filename The file name should not include extension  . The method index will call automatically and it should be public .  We can access the method showlist by the link  example.com/index?route=foldername/filename/showlist  the method showlist should me public .

OpenCart : Route

In open cart the routeing technique is very simple, If we wan  to call a module or controller /catalog/controller/product/category.php the we have to call it like 'index.php?route=product/product'. Here product is the folder name category is the controller file name without the file extension.   'index.php?route=product/product'  it will execute the   public function index(){     ...  }  'index.php?route=product/product/menthod' then is ill call    public function method(){     ...  } the method should be public otherwise the system will not be able to call it we will know more about that later.

OpenCart : Basic

OpenCart is a very popular CMS recent days. I'm working With open for Last 1 and half years. I was never been a writer, this is my first attempt to write something on blog. I'm going to explain and do some example how can we modify opencart coding. OpenCart is a CMS with MVC( Model–View–Controller)  format. The basic File structure. Admin part: /admin /admin/controller/ /admin/model/ /admin/language/ /admin/view/ Public part: /catalog /catalog /controller/ /catalog /model/ /catalog /language/ /catalog /view/ In /system: this part is used to the open cart system run it content all the basic engine for controller,model,database and a library of some much needed model. like cart, customer, database,session etc. there are two folder /image and /download the admin and the public both  use this folder for storing and showing image and other  files. There are some folders need to be writable /system/cache ,   /system/logs , /image and /download In the /.