Skip to main content

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.

Comments

  1. Play at The Magic Slots: The Gathering - JRH Hub
    Join a legendary 서귀포 출장마사지 guild of 사천 출장안마 warriors who fight the forces 양주 출장샵 of the mighty Euchre, where legends have been telling all the time. Play 전라남도 출장마사지 at The Magic Slots: 경산 출장안마 The Gathering at

    ReplyDelete

Post a Comment

Popular posts from this blog

OpenCart : Create a Model

To make  a Model   class Model<foldername><filename with out extention> extends Model{       public function methode(){     .....     }  }  We can call a model from controller using  $this->load->model('<folder>/<filename with out extention>'); And after that we can call the method like below $this->model_<folder>_<filename with out extention>->methode(); The Method should be public

PHP : Creating a CSV file as download file from array

Few days earlier I need to Create a text Or SCV file what will return some of the datafeed. Condition is i can't save the file in the serve i have to create and make to download for the user. So i made the below function   function genarateFeedTextFile($data=array(),$file_name=''){ $text=''; $temp=array(); if($data){ foreach($data as $value){          $text .= implode("\t",$value)."\n"; } } header("Content-Type: text/plain"); header("Content-disposition: attachment; filename=".$file_name.".txt");  header("Content-Transfer-Encoding: binary");  header("Pragma: no-cache");  header("Expires: 0"); echo $text; } This function solved my problem. But soon i have a little more problem. Some of my data contain new line "\n" or "\r" to tab "\b" so the result was not expected so i made a new function and puss all the string...