Rubens Cury Posted April 2, 2015 Share Posted April 2, 2015 Any idea why im getting the follow error when I try to render a module values list? Notice: Undefined index: id_my_custom_table in C:\xampp\htdocs\RMC\cache\smarty\compile\70\8c\6b\708c6b9584bdc9a66e1a5cce61d2b458ed56e79d.file.list_content.tpl.php on line 88 The index "id_my_custom_table " is not set anywhere..... Link to comment Share on other sites More sharing options...
PascalVG Posted April 4, 2015 Share Posted April 4, 2015 As the notice tells you, the variable is not set. Go to the code where you use this variable and check if the variable indeed is set correctly before it is used. Or maybe you forgot a $ in front of the variable? Do I see correctly that you created a new table and class for it? Double check your definition of the table fields/class properties. My 2 cents, pascal Link to comment Share on other sites More sharing options...
Rubens Cury Posted April 4, 2015 Author Share Posted April 4, 2015 Hi Pascal, Thank you for your reply. I took a look the helpers code and I figured out that when we don't set any helper->identifier the helper is going to consider as a primary index a property starting by id_ + the table name. The problem is that I decided to set a prefix name to all my tables module in order to prevent future conflicts with prestashop tables and also as a good practice. In this case, my tables name are defined by my_prefix_my_table_name and the PK is id_my_table_name and not id_my_prefix_my_table_name All I had to do was set the helper identifier. The notice "Undefined index" is a little confused once the helper "changes" the index in order to proceed by itself. I appreciate your attention, Rubens Cury 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