Prestashop How To do the Web Development of Website. Errors, Issues, Bugs related to Prestashop like Frontend and Backend Development such as Templates, Pdf, Emails, mostly Code Customisations.
Contact Us
Get link
Facebook
X
Pinterest
Email
Other Apps
Contact Us
If you have any query regrading Site and any other issue, please feel free to contact at halflife74159@gmail.com
AdminController inside Root Admin Folder In Prestashop, We need to store our manually create Admin Controller in Prestashop Database . We must add our Admin Controller class in tab table also. On the root there is admin folder inside the controllers folder. Inside admin folder create your controller file for eg. like AdminNameController.php and save it. After that Register your Controller in Database -> Tab table. You need to define id for tab in (id_tab) field manually according to increment order.(eg: means if id_tab value is 3 you must set id_tab value 4). Parent id (id_parent) is used for make your controller as child for any parent like under SELL Parent (for SELL id_parent set to 2). Next is Position where do you define the Position of your Controller in ADmin Menu Bar.(like if you set position where you want to show the controller in menu bar count from 0 to end menu in the Sell Tab of menu bar and set according to you in between them or last or on first position. ...
Pass Controller Variables To TPL in Prestashop In your Controller you can find the initContent() function, where you pass the Value to required tpl. public function initContent() { //assign value like this $username = 'FreemanDev'; parent::initContent(); //and pass here like this ( 'username' => $username) $smarty = $this->context->smarty; $smarty->assign(array( 'username' => $username, )); $content = $smarty->fetch(_PS_THEME_DIR_.'templates/folder/yourtpl.tpl'); $this->context->smarty->assign(array('content' => $this->content . $content)); } and in your tpl (yourtpl.tpl), you can access the above defined variable using curly braces with html tags or simply write. {$username} where ever you need it... Thanks...
Prestahop AdminController get Access Denied Error Error: Access Denied Prestashop How To Access Denied error comes when you will create Controller manually inside Prestashop Controller Folder because you controller cannot assign with A ccess and A uthorization Role Table. If you want to view new controller data then put this function in your controller. public function viewAccess($disable = false) { return true; } If you want to perform Create, Read, Update, Delete default operations defined by Prestashop So You need to assigned the Controller in the prestashop database table's name "access" and in "authorization_role" is necessary .
Comments
Post a Comment
If you have any error, bug related to your Prestashop website, Let me know