Set Opencart Custom Page Access For User Group – Opencart |
X

Congrats, You are Subscribed to Receive Updates.

Set Opencart Custom Page Access For User Group – Opencart


Set Opencart Custom Page Access For User Group.  Before getting into this topic, if you want to set the Access permission manually than read this article. Which will help you to set permission for your  Custom directory,

Read Here. 

usr_grp

If you are seeking it to do the operation on programmatically for your opencart site, read the rest of the tutorial. Here I just wrote an sample Controller class to explain you,

<?php  class ControllerKvTestPermissions extends Controller {

    public function index() { 
	
        $this->redirect($this->url->link('kvc/permissions', 'token=' . $this->session->data['token'], 'SSL'));        
    }

    public function install() { 
	
        $this->load->model('user/user_group');
        $this->model_user_user_group->addPermission($this->user->getId(), 'access', 'kvc/permissions');
        $this->model_user_user_group->addPermission($this->user->getId(), 'modify', 'kvc/permissions');
		
    }
} 
?>

The above class describes you to set access permission for “kvc/permissions“. Just use this codes to create your Custom page and include it with this code.

 

 

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

7 comments

  1. commenter

    i m not getting the timezone as per my country(india)…
    Help me out guys…………

    Thanx in advance….

    i installed additional module but we can do it but we can do it by changing the code also ..not getting the timezone as per my country.(india)…….

    how solve the problems plz help me ……..

  2. commenter

    Good day . I use opentsart Version 2.0.3.1 . I can not set the permission programmatically . where I have to use your code?

  3. commenter

    this works in version 1.5.6.4 ? permission denied

  4. commenter

    Hi Varadhraj,

    I have installed opencart 2.2 and i am new to opencart i have made an admin page folloiwng your tutorilas code but still i have a permission deined error.

    Any idea will be waiting for you.

    Thanks,Saeed

Reply to germano Cancel reply

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar