0

I am using Online module creator to create a table in admin panel.

I added the sql query as needed to create the table but I don't know what to write in the field Run Installing Php Code.

Please see the screenshot below for clear understanding

enter image description here

1

Nothing.
I haven't used that module creator a lot but I assume that is the php code that is ran when the install script is executed. It can be useful if you want to create entity instances or you want to modify some config values or anything else that comes to mind. If you are just creating a module to manage some entities then you don't need to put anything in there.
But just to make sure, put something / anything in there, and when you download the extension you create then look in it's files and folders for the text you entered. If you identify the file you can get a better idea about what it does.

14
  • Marius, the table has not been created. when I check the file it is something like this. It is in sql/queries-setup/mysql4-install-0.1.0.php file of my module. – Mr_Green Dec 10 '13 at 8:21
  • @Mr_Green Clear the cache for the sql to run. And on the other hand I was right about what that field you asked about does. It should contain the php code that should run on install. In most cases you don't need it. – Marius Dec 10 '13 at 8:32
  • Marius, I did same.. still I can't see the table in database and also the section in catolog_product attributes. Does having a different data type for a column in admin and sql query effect this? because I have a column with TIME_STAMP as datatype in sql and DATE as data type in module creator.. – Mr_Green Dec 10 '13 at 8:47
  • Please check this file for understanding what settings I did.. link.. I hope I am not taking much time of yours.. FYI, I re-indexed and cleared the cache from browser and magento folder. – Mr_Green Dec 10 '13 at 8:51
  • Sorry but I have no idea why it doesn't work. maybe you should ask the developers for support. I can recommend you this: github.com/tzyganu/moduleCreator. On that I can offer support :). – Marius Dec 10 '13 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.