How to create a simple controller and mode access

[color=#000000][font=Arial,]I just want to ask. I am studying CSCart but I am still confue where should I start my code. In CodeIgniter In order to view your page you will need to access controller first and the call the there. Same in model in order to access model data you need to call it in Controller then the Controller will be the one to pass the model query result in views. In CSCart there are two controllers. One is for main controller and the other one is for addons. Now for safety I want to create a Controller inside addons. My goal is simple. Just to display a simple Hello World to the view. But I am so confuse how to do that. I learned the format of accessing Controller is the[/font][/color]



dispatch=controllername.mode




[color=#000000][font=Arial,]In Codeigniter it is[/font][/color]



[color=#000000][font=Arial,]
controller/function
[/font][/color]



[color=#000000][font=Arial,]So how do I create a dispatch directory? Or in other words controller. I saved my controller in[/font][/color]



[color=#000000][font=Arial,]
addons/myaddons/helloworld.php
[/font][/color]



[color=#000000][font=Arial,]Inside this file is the code. It is something like this?[/font][/color]



[color=#000000][font=Arial,]
if($mode == 'mymode'){
//code goes here
$datatest = "Hello World";
$this->assign('helloworld',$datatest);
}
[/font][/color]



[color=#000000][font=Arial,]Then in skins there is addons folder. Now I want to display the page in customer meaning front end So the path is[/font][/color]



[color=#000000][font=Arial,]
skins/customers/addons/helloworld/mytplfile.tpl
[/font][/color]



[color=#000000][font=Arial,]To display the helloworld I used this simple code.[/font][/color]

[size=3]{[/size][size=3]$helloworld[/size][size=3]}[/size][color=#000000][font=Arial,][size=3]

But it doesn't work.[/size][/font][/color][color=#000000][font=Arial,][size=3]

Please help me guys. I am a beginner with CSCart. Thanks.[/size][/font][/color]

Do a search for creating an addon in cs-cart.

Take a look at other 'addons' to get an idea of what you need to do and how things are structured. The simplest are things like 'Access restrictions' and 'Gift Certificates'. For more complex addons, you can look at SEO or Product Configurator.