migomax Posted October 7, 2020 Share Posted October 7, 2020 Hello! So this will be quite long so please let me explain what I am trying to do: My objective is to add 2 columns to the employee table, "Budget_left" and "Date_Budget_Added". And then ultimately show these 2 in the EDIT PROFILE PAGE in the back office, with the budget showing the budget of that profile. I have already successfully modified the database which is done during the installation of my module. I have also overridden the Employee.php to add "Budget_Left" and "Date_Budget_Added" to the Employee class. What I now have to do, and where I am quite lost, is to have the correct output on the edit profile page whos templating is done with Symfomy, a framework I am just discovering. The output file seems to be: src/PrestaShopBundle/Resources/views/Admin/Configure/AdvancedParameters/Employee/Blocks/form.html.twig. And I have also successfully overriden this in my module (basically I've copied the whole code) and modifications work on it. However, my problem now is trying to access the data I need. My "Budget_left" and "Date_Budget_Added" in my database. I have var dumped the employeeForm variable however this object doesn't seem to have all the data that is in the employee table in the database. My question is have I done the correct steps to add the columns to the database? And if so, how can I access these datas from the .twig files? Thank you all soooo much in advance! I hope I was adequately clear about what I am trying to do! 1 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