brys Posted November 19, 2019 Share Posted November 19, 2019 In prestashop 1.7.5 I have an admin controler which extends FrameworkBundleAdminController. Now I want to download data from my table in this controller and display it in the grid (table) in a similar way as customer data or their addresses are displayed. How do you do it in a twig based template? Unless you can do it differently using a helper. Link to comment Share on other sites More sharing options...
ABCDino Posted November 21, 2019 Share Posted November 21, 2019 You can retrieve DataBase information via $query = 'SELECT * FROM myTable'; $rowsList = Db::getInstance()->executeS($query); You can use a helper to display your form, in the same way you would do in a module. $helper = new HelperForm(); ... $fields_form = ... ... return $helper->generateForm($fieldsForm); Link to comment Share on other sites More sharing options...
brys Posted November 22, 2019 Author Share Posted November 22, 2019 But i use controler which extends FrameworkBundleAdminController I have error 500 Link to comment Share on other sites More sharing options...
ABCDino Posted November 25, 2019 Share Posted November 25, 2019 You can try this tutorial https://devdocs.prestashop.com/1.7/modules/sample_modules/grid-and-identifiable-object-form-hooks-usage/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now