Hi all,
I've successfully made a OCmod to add a item to the admin menu and uploaded the module files, works all good. Item is showing also the sub-items. However when is click on a sub-item in the menu i get the message "Permission Denied!" (on the correct url to the module page).
Do I need to register the pages i'm calling? Are am I missing something? If I call a page like; sale/order_list, it's showing normal without any error.
Also test this: http://stackoverflow.com/questions/1070 ... n-opencart
Thanks,
Tim
I've successfully made a OCmod to add a item to the admin menu and uploaded the module files, works all good. Item is showing also the sub-items. However when is click on a sub-item in the menu i get the message "Permission Denied!" (on the correct url to the module page).
Do I need to register the pages i'm calling? Are am I missing something? If I call a page like; sale/order_list, it's showing normal without any error.
Also test this: http://stackoverflow.com/questions/1070 ... n-opencart
Thanks,
Tim
Live with 2.2.0.0 fully SSL.
Go to "System->Users->User Groups" and edit the top-level admin group. Make sure the checkboxes in the access and modify lists are checked.
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
going nuts on this....
- add sub menu to admin menu (https://github.com/nosite/SendCloud-Ope ... .ocmod.xml)
- make .tpl files for new pages (https://github.com/nosite/SendCloud-Ope ... sendcloud/)
- upload and add OCmod
- menu showing ok
- when click.... Permission Denied!
- set user rights. (disable all /enable all)
Still same..... Permission Denied!
Please give me a hand on this.
- add sub menu to admin menu (https://github.com/nosite/SendCloud-Ope ... .ocmod.xml)
- make .tpl files for new pages (https://github.com/nosite/SendCloud-Ope ... sendcloud/)
- upload and add OCmod
- menu showing ok
- when click.... Permission Denied!
- set user rights. (disable all /enable all)
Still same..... Permission Denied!
Please give me a hand on this.
Live with 2.2.0.0 fully SSL.
THe OCmod is fine, works also with other links. Problem is the controller file or/and template file.
Found this https://bitbucket.org/mariavilaro/openc ... rld-module
No change to play with it yet.
Found this https://bitbucket.org/mariavilaro/openc ... rld-module
No change to play with it yet.
Live with 2.2.0.0 fully SSL.
In the controller that you created, is the "index" function public or protected? For example:
or
if it is protected, change it to public.
Code: Select all
public function index() {
Code: Select all
protected function index() {
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool
If you're not living on the edge ... you're taking up too much space!
Ok, finale some to play with this again.
The controller has the public funtion, also played with to to make it private... no luck!
Any other ideas?
This is the code for the controller:
and this the template file.
The controller has the public funtion, also played with to to make it private... no luck!
Any other ideas?
This is the code for the controller:
Code: Select all
<?php
class ControllerModuleSendclousParcelList extends Controller {
private $error = array(); // This is used to set the errors, if any.
public function index() {
// Loading the language file
$this->load->language('sendcloud/parcel_list');
// Set the title of the page to the heading title in the Language file i.e., Hello World
$this->document->setTitle($this->language->get('heading_title'));
// Load the Setting Model (All of the OpenCart Module & General Settings are saved using this Model )
$this->load->model('setting/setting');
// Assign the language data for parsing it to view
$data['heading_title'] = $this->language->get('heading_title');
$data['text_edit'] = $this->language->get('text_edit');
$data['text_module'] = $this->language->get('text_module');
$data['text_success'] = $this->language->get('text_success');
$data['text_content_top'] = $this->language->get('text_content_top');
$data['text_content_bottom'] = $this->language->get('text_content_bottom');
$data['text_column_left'] = $this->language->get('text_column_left');
$data['text_column_right'] = $this->language->get('text_column_right');
$data['entry_code'] = $this->language->get('entry_code');
$data['entry_layout'] = $this->language->get('entry_layout');
$data['entry_position'] = $this->language->get('entry_position');
$data['entry_status'] = $this->language->get('entry_status');
$data['entry_sort_order'] = $this->language->get('entry_sort_order');
// This Block returns the warning if any
if (isset($this->error['warning'])) {
$data['error_warning'] = $this->error['warning'];
} else {
$data['error_warning'] = '';
}
// This Block returns the error code if any
if (isset($this->error['code'])) {
$data['error_code'] = $this->error['code'];
} else {
$data['error_code'] = '';
}
// Making of Breadcrumbs to be displayed on site
$data['breadcrumbs'] = array();
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('text_module'),
'href' => $this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('sendcloud/parcel_list', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$data['action'] = $this->url->link('sendcloud/parcel_list', 'token=' . $this->session->data['token'], 'SSL'); // URL to be directed when the save button is pressed
$data['cancel'] = $this->url->link('sendcloud/parcel_list', 'token=' . $this->session->data['token'], 'SSL'); // URL to be redirected when cancel button is pressed
$data['header'] = $this->load->controller('common/header');
$data['column_left'] = $this->load->controller('common/column_left');
$data['footer'] = $this->load->controller('common/footer');
$this->response->setOutput($this->load->view('sendcloud/parcel_list.tpl', $data));
}
}
Code: Select all
<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
<div class="page-header">
<div class="container-fluid">
<h1><?php echo $heading_title; ?></h1>
<ul class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="container-fluid">
<?php if ($error_warning) { ?>
<div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
<?php } ?>
<?php if ($success) { ?>
<div class="alert alert-success"><i class="fa fa-check-circle"></i> <?php echo $success; ?>
<button type="button" class="close" data-dismiss="alert">×</button>
</div>
<?php } ?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><i class="fa fa-list"></i> <?php echo $text_list; ?></h3>
</div>
<div class="panel-body">
<h3>some code here</h3>
<div class="row">
<div class="col-sm-6 text-left"><?php echo $pagination; ?></div>
<div class="col-sm-6 text-right"><?php echo $results; ?></div>
</div>
</div>
</div>
</div>
</div>
<?php echo $footer; ?>
Live with 2.2.0.0 fully SSL.
Who is online
Users browsing this forum: No registered users and 77 guests