Toolbar (with Events, No Vqmod/Ocmod)

Toolbar (with Events, No Vqmod/Ocmod)
Wordpress has a frontend toolbar
Drupal has a frontend toolbar
Now Opencart has a frontend toolbar

First login as demo/demo
Admin
then visit the frontend to see the toolbar:
Demo


You can create your own widgets for the toolbar. This module uses EVENTS. No Ocmod/Vqmod.

To create a widget you will need to:

1. reate a controller in
catalog/controller/d_toolbar/my_widget.php

and add this code

<?php
class ControllerDToolbarMyWidget extends Controller {
/*
* Functions for Toolbar.
*/
public function toolbar_widgets($route) {
$result = array();
$this->load->language('d_toolbar/my_widget');

$widget = array(
'code' => 'my_widget',
'name' => $this->language->get('text_my_widget');
'status' => true,
'sort_order' => '10',
'html' => $this->load->view('d_toolbar/my_widget', $data);
);

$result['my_widget'] = $widget;
return $result;
}
}



2. remeber to add a language file accordingly.
catalog/language/YOUR LANGUAGE/d_toolbar/my_widget.php

<?php

// Text
$_['text_my_widget'] = 'My Super Widget';



3. And add a template file

catalog/view/theme/default/template/d_toolbar/my_widget.tpl

<li class="d-seo-module-adviser navbar-item dropdown">
<a class="title dropdown-toggle" data-toggle="dropdown">
<?php echo $text_my_widget; ?>
</a>
<div class="dropdown-menu">
<div class="dropdown-inner">
<ul class="list-unstyled">
<li class="dropdown-item" data-toggle="tooltip" data-placement="right" title="Tooltip">
<a class="title">

<span>Your widget can do something here</span>
</a>
</li>
</ul>
</div>
</div>
</li>



This is the basic use case for toolbar. You can create all sorts of widgets. They can display graphs and links, images and other valuable information to the user.

Feel free to create awesome widgets and ask questions.

Enjoy!




Download
  • Developed by OpenCart Community
  • Documentation Included

Rating

Compatibility
2.3.0.0, 2.3.0.1, 2.3.0.2, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1, 2.1.0.1, 2.1.0.2, 2.2.0.0, 3.0.0.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.2.1b

Last Update
7 Dec 2017

Created
20 Feb 2017
144 Downloads
1 Comments
Dreamvention OÜ
Dreamvention OÜ
Member since: 16 Jan 2012

View all extensions Get Support