php - OpenCart admin menu link url -


i'm verry new opencart , i'm trying make module it.

i want link in admin menu module creating i've edited file:

/admin/view/template/common/header.tpl 

the code have added:

<li><a class="top">import / export</a>     <ul>         <li><a href="" target="_blank">link 1</a></li>         <li><a href="" target="_blank">link 2</a></li>         <li><a href="" target="_blank">link 3</a></li>     </ul> </li> 

my question propably verry simple:

in normal links url <a href=""> set this:

<a href="<?php echo $report_customer_online; ?>"> 

how can make url right module token of opencart?

the module path module/order_export.

if need more info, feel free ask...

check answer here: https://stackoverflow.com/a/16418443/598500 - have answered similar question, anyway answer same question.

but guide more precisely:

language file /admin/language/<your_language>/common/header.php add e.g.:

$_['text_my_module'] = 'my module title'; 

controller file /admin/controller/common/header.php add e.g.:

$this->data['text_my_module'] = $this->language->get('text_my_module'); 

and

$this->data['my_module'] = $this->url->link('module/order_export', 'token=' . $this->session->data['token'], 'ssl'); 

and the template file /admin/view/template/common/header.tpl add:

<a href="<?php echo $my_module; ?>" class="top"><?php echo $text_my_module; ?></a> 

where applicable...

is correct answer you?


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -