ldon Posted May 14, 2013 Share Posted May 14, 2013 Hello, does anybody know how to Disable theme and language options in my Preferencs. I'd like to creat a new Admin theme but without a theme and language option, located in my Preferences. Please help. Thank you Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2013 Share Posted May 14, 2013 what prestashop version you use? Im asking, because all of this depends on PS version Link to comment Share on other sites More sharing options...
ldon Posted May 15, 2013 Author Share Posted May 15, 2013 what prestashop version you use? Im asking, because all of this depends on PS version 1.5.4.1 Link to comment Share on other sites More sharing options...
PascalVG Posted May 15, 2013 Share Posted May 15, 2013 Do you want to make theme for yourself and your other employees? Can't you just make a new (or edit an existing) employee type and give them the permissions you want to give them (and thus deselecting the preferences-Themes and language item?)? Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2013 Share Posted May 16, 2013 go to the: controllers/admin/AdminEployeesController and from $this->fields_form remove the: array( 'type' => 'select', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'options' => array( 'query' => Language::getLanguages(false), 'id' => 'id_lang', 'name' => 'name' ) ), array( 'type' => 'select_theme', 'label' => $this->l('Theme:'), 'name' => 'bo_theme', 'options' => array('query' => $this->themes), 'desc' => $this->l('Back Office theme') ), Link to comment Share on other sites More sharing options...
ldon Posted May 16, 2013 Author Share Posted May 16, 2013 go to the: controllers/admin/AdminEployeesController and from $this->fields_form remove the: array( 'type' => 'select', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'options' => array( 'query' => Language::getLanguages(false), 'id' => 'id_lang', 'name' => 'name' ) ), array( 'type' => 'select_theme', 'label' => $this->l('Theme:'), 'name' => 'bo_theme', 'options' => array('query' => $this->themes), 'desc' => $this->l('Back Office theme') ), That's what I want but this action remov themes and language option from all themes and I'd like to remove it only from "employee" theme. Link to comment Share on other sites More sharing options...
ldon Posted May 16, 2013 Author Share Posted May 16, 2013 Do you want to make theme for yourself and your other employees? Can't you just make a new (or edit an existing) employee type and give them the permissions you want to give them (and thus deselecting the preferences-Themes and language item?)? It doesn't help. I mean to disable themes and languages in Administration Employees Edit Link to comment Share on other sites More sharing options...
vekia Posted May 16, 2013 Share Posted May 16, 2013 That's what I want but this action remov themes and language option from all themes and I'd like to remove it only from "employee" theme. Well, admin of the store is also employee So, what you want is to remove it only for non-admin employee? Am i right? Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 Well, admin of the store is also employee So, what you want is to remove it only for non-admin employee? Am i right? Right. Easy to say, the default theme will stay the same and in every other I'll able to disable the option. Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 Well, admin of the store is also employee So, what you want is to remove it only for non-admin employee? Am i right? And it would be good to remove the: Customers > Groups > Edit Module restrictions: Customers > Customer Service Customer service options as well. Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 i checked sources, it's not as simple as it seems it's very complicated, i checked the sources and there is a lot of work... i've got solution but it's a huge modification :/ Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 i checked sources, it's not as simple as it seems it's very complicated, i checked the sources and there is a lot of work... i've got solution but it's a huge modification :/ If it would be easy I wouldn't ask for help. Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 If it would be easy I wouldn't ask for help. I spent over one hour on this. i attached code below: this is AdminOrdersController.php file. Copy this to controllers/admin/ don't forget about backup! let me know if it works Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 I spent over one hour on this. i attached code below: this is AdminOrdersController.php file. Copy this to controllers/admin/ don't forget about backup! let me know if it works I'm not sure I'm testing right. I can see options but I'm not able to save changes. Not even in SuperAdmin. Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 hello, it sounds like you've got still old version. you pasted content of code.txt to the AdminOrdersController.php file? Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 (edited) hello, it sounds like you've got still old version. you pasted content of code.txt to the AdminOrdersController.php file? Yes I've done it. Store information PrestaShop version: 1.5.4.1 Edited May 17, 2013 by ldon (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 17, 2013 Share Posted May 17, 2013 can you attach your file here? I will test it in my demo store Link to comment Share on other sites More sharing options...
ldon Posted May 17, 2013 Author Share Posted May 17, 2013 (edited) can you attach your file here? I will test it in my demo store Please write me what your code suppose to do? Thank you. Edited May 17, 2013 by ldon (see edit history) Link to comment Share on other sites More sharing options...
ldon Posted May 18, 2013 Author Share Posted May 18, 2013 can you attach your file here? I will test it in my demo store I downloaded the latest 1.5.4.1 version, and I've got it on my localhost. Link to comment Share on other sites More sharing options...
vekia Posted May 18, 2013 Share Posted May 18, 2013 I downloaded the latest 1.5.4.1 version, and I've got it on my localhost. hello so, my code works well? Please let me know, i tested it in several installations (1.5.4.1) and it worked good waiting for your reply Link to comment Share on other sites More sharing options...
ldon Posted May 19, 2013 Author Share Posted May 19, 2013 hello so, my code works well? Please let me know, i tested it in several installations (1.5.4.1) and it worked good waiting for your reply I was asking for: - disable themes and language option for employees - disable Module restrictions:in Customers > Groups > Edit - disable Customer service options in Customers > Customer Service I've overwrited the AdminOrdersController.php with your code but in required parts was everything without change. Sorry, I do not know what your code does. Everything was tested on fresh the latest version 1.5.4.1 Link to comment Share on other sites More sharing options...
vekia Posted May 19, 2013 Share Posted May 19, 2013 i created modification for your first question here: "Disable theme and language options in my Preferences" i spent on this many hours. Modifications that you want to develop need many changes in the controllers. As we talked, I changed the AdminEployeesController.php file located in controllers/admin/ directory. what I change? A lot of the code. i modified" fields in $this->fields_form (fields depends on this->context->employee->id) if ($this->context->employee->id==1){ $language=array( 'type' => 'select', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'options' => array( 'query' => Language::getLanguages(false), 'id' => 'id_lang', 'name' => 'name' ) ); $theme=array( 'type' => 'select_theme', 'label' => $this->l('Theme:'), 'name' => 'bo_theme', 'options' => array('query' => $this->themes), 'desc' => $this->l('Back Office theme') ); } else { $language=array( 'type' => 'radio', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'values' => array( array( 'id' => 'id_lang', 'value' => $this->context->employee->id_lang, 'label' => $this->l('Enabled') ) ) ); $theme=array('type' => 'blocked', 'label' => $this->l(''), 'required' => false, 'name' => ' ', 'values' => $this->context->employee->id_lang); } here is the effect for theme and language in my preferences: i was logged as employee (not admin - admin has got possibility to use all features) here is the adminemplyeecontroller.php once again: AdminEmployeesController.txt Link to comment Share on other sites More sharing options...
ldon Posted May 20, 2013 Author Share Posted May 20, 2013 i created modification for your first question here: "Disable theme and language options in my Preferences" i spent on this many hours. Modifications that you want to develop need many changes in the controllers. As we talked, I changed the AdminEployeesController.php file located in controllers/admin/ directory. what I change? A lot of the code. i modified" fields in $this->fields_form (fields depends on this->context->employee->id) if ($this->context->employee->id==1){ $language=array( 'type' => 'select', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'options' => array( 'query' => Language::getLanguages(false), 'id' => 'id_lang', 'name' => 'name' ) ); $theme=array( 'type' => 'select_theme', 'label' => $this->l('Theme:'), 'name' => 'bo_theme', 'options' => array('query' => $this->themes), 'desc' => $this->l('Back Office theme') ); } else { $language=array( 'type' => 'radio', 'label' => $this->l('Language:'), 'name' => 'id_lang', 'required' => true, 'values' => array( array( 'id' => 'id_lang', 'value' => $this->context->employee->id_lang, 'label' => $this->l('Enabled') ) ) ); $theme=array('type' => 'blocked', 'label' => $this->l(''), 'required' => false, 'name' => ' ', 'values' => $this->context->employee->id_lang); } here is the effect for theme and language in my preferences: i was logged as employee (not admin - admin has got possibility to use all features) here is the adminemplyeecontroller.php once again: Excellent job. It works great. Thank you. I was confused because you wrote "I spent over one hour on this. i attached code below: this is AdminOrdersController.php file. Copy this to controllers/admin/ don't forget about backup! let me know if it works" Link to comment Share on other sites More sharing options...
vekia Posted May 20, 2013 Share Posted May 20, 2013 Excellent job. It works great. Thank you. I was confused because you wrote "I spent over one hour on this. i attached code below: this is AdminOrdersController.php file. Copy this to controllers/admin/ don't forget about backup! let me know if it works" OMG you've got right! I was tired of this probably haha sorry it was my mistake :/ Link to comment Share on other sites More sharing options...
ldon Posted May 20, 2013 Author Share Posted May 20, 2013 OMG you've got right! I was tired of this probably haha sorry it was my mistake :/ No problem. Thank you again. What else I'm worried about is that employee can modify: Customers > Groups > Edit Module restrictions: Customers > Customer Service Customer service options Link to comment Share on other sites More sharing options...
vekia Posted May 20, 2013 Share Posted May 20, 2013 No problem. Thank you again. What else I'm worried about is that employee can modify: Customers > Groups > Edit Module restrictions: Customers > Customer Service Customer service options hello i created employee account with: and employee hasn't got ability to enter to customer service Link to comment Share on other sites More sharing options...
ldon Posted May 20, 2013 Author Share Posted May 20, 2013 hello i created employee account with: and employee hasn't got ability to enter to customer service yes, I know this is the easiest way but employee should be able to use this option and help me to be in touch with customers, or ...? Link to comment Share on other sites More sharing options...
Pankaj Kumar Posted October 19, 2013 Share Posted October 19, 2013 (edited) HI. .. I m using Prestashop 1.5.3 version . How can I change store front page language ? Its not taking effect even if I changed employee language from administrator in backoffice. Any suggestions? Edited October 19, 2013 by Pankaj Kumar (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 19, 2013 Share Posted October 19, 2013 HI. .. I m using Prestashop 1.5.3 version . How can I change store front page language ? Its not taking effect even if I changed employee language from administrator in backoffice. Any suggestions? your question isn't related to main case in this topic. please create new thread with your question. employee language is only for employee back office language. Link to comment Share on other sites More sharing options...
Recommended Posts