Ultimate Module Creator.

Because I was always stuck on doing the same thing over and over again, each time I needed to create a module, I've decided to create a module that does the work for me.
I know that there are some module creators out there, but an other one doesn't hurt.
You can find the "Ultimate ModuleCreator" on github. https://github.com/tzyganu/moduleCreator

It is also available on the Magento connect:
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/15449/s/ultimate-modulecreator-8949/
The module creator was built on Magento CE 1.7. It works on Magento CE 1.7.
The extensions you create with it work on Magento CE 1.7. They will probably work on equivalent PE and EE, but I didn't test.
After you install the module creator you will find it under the System menu.

DO NOT USE THE EXTENSIONS YOU CREATE WITH IT ON LIVE ENVIRONMENTS. Test them first.

Keep in mind that the module creator cannot do everything for you. But at least you will not need to create the skeleton for managing (back-end), listing and view-ing your entity (frontend). The frontend files might need some styling after you create them, but at least you will have all the info you need.

Here is a small list of what it can do:
Version 1.6.3.1 was released on June 4th 2013:
  • Bug fixes:
    1. module does not create records in the namespace_module_store table when 'add seo attributes' is set to 'No'
Version 1.6.3 was released on May 31st 2013:
  • Bug fixes:
    1. upladed images & files lost when saving a tree entity twice.
    2. widget chooser broken for tree entities
    3. translations missing.
  • Features:
    1. added subtree widget for tree entities.
Version 1.6.2 was released on May 10th 2013:
  • Bug fixes:
    1. `lookupStoreIds () on a non-object` error on Tree entities.
Version 1.6.1 was released on April 22nd 2013:
  • Fixes:
    1. Store selection tab not generated (Thanks IonTrust)
Version 1.6.0 was released on April 19th 2013:
  • Fixes:
    1. errors in some function documentations
  • Features:
    1. DDL install scripts for generated entity (Can be enabled/disabled from system->configuration)
    2. enable entities by store view (similar to CMS pages)
    3. meta title for admin pages
  • Refactoring:
    1. moved meta information fields to separate tab.
    2. completed the help tab
Version 1.5.0 was released on April 8th 2013:
  • Fixes:
    1. Fixed Generated translation file
    2. Uppercase letter in entity codes is now restricted
  • Features:
    1. Generate API (v1 & v2) files.
    2. WSI compliance for API
  • Refactoring:
    1. Entity Model.
Version 1.4.1 was released on March 16th 2013:
  • Fixes:
    1. siblings not listed in the order set in admin.
    2. entity models are missing event prefixes and event objects
  • Features:
    1. Added 'country' field
    2. Added log creation for each module with the files that are created.
  • Refactoring:
    1. Clean up for image attribute renderers (frontend and backend).
    2. added Mage::logException for admin exceptions
    3. Refactor image helper (thanks carco).
Version 1.4.0 was released on March 4th 2013:
  • Fixes:
    1. Related entities not remembered on grid select
    2. URL rewrites Router not generated correctly
    3. Admin layout for related entities
  • Features:
    1. Added admin search support
  • Refactoring:
    1. Renamed source folders. Made them shorter to avoid windows unzip issue. (Hopefully this will fix it.)
Version 1.3.0 was released on February 23rd 2013:
  • Fixes:
    1. Text corrections
  • Features:
    1. Added url rewrites functionality for created entities
  • Refactoring:
    1. Removed all 'Mysql4' class names and file names. Replaced with appropriate class. (Magento 1.7 "style")
Version 1.2.0 was released on February 16th 2013:
  • Fixes:
    1. Not remembering related entity products on page/sort order change
    2. validate missing: name_singular, name_plural
  • Features:
    1. Text, Integer Decimal attributes allowed to act as name.
    2. modman, modgit
Version 1.1.1 was released on January 3rd 2013:
  • Fixes:
    1. Fixed tree behaving entities widget chooser
Version 1.1.0 was released on December 31th 2012:
  • Features:
    1. Added 'tree - behaving' entities
  • Bug fixes:
    1. Fixed: 2 entities with same name admin issue.
    2. Fixed: mass action issue
    3. Fixed: related entities not always saving in admin
    4. Fixed: frontend related entities listing gives error.
  • Known issues:
    1. you cannot add many to many relations between tree entities.
Version 1.0.0 was released on November 30th 2012:
  1. Added entity relations (one to many and many to many)
  2. Added possibility for direct install
  3. Added expand/collapse for all fieldsets for easier access.
Version 0.2.0-beta was released on October 17th 2012:
  1. Entities can be linked "many to many" with products. Entities can be listed on product pages. Products can be listed on entity pages.
  2. Refactored admin controller for generated entities.
Version 0.1.0
  1. It allows you to create only flat entities. EAV entities are not supported (yet).
  2. You can create one or more entities under the same module.
  3. You can decide to create only the files needed for the back-end to work for your entities or both front-end and back-end files. (list/view entity)
  4. You can add as many fields as you like for each entity. If you ever used a phpMyAdmin then you are qualified to use this extension.
  5. Support for different types of fields: Text, textarea, datetime, yes/no, int, decimal, file, image, website
  6. It creates widgets of your entities to use in CMS pages.
  7. It creates an RSS feed page for you entities (if you decide to create the frontend files.)
  8. The frontend pages support breadcrumbs, that you can deactivate later.
  9. Il allows you to decide what fields will be shown in the admin grid.
  10. WYSIWYG support for textarea fields.
  11. Resize support for image fields (just like the product has.)
  12. Generates language csv file. All you need to do is translate it to your language.
Any suggestions and (constructive) criticisms are welcomed. If you have any other ideas please post them in the comments. I have some others and I will implement them in the next version(s).

37 comments:

  1. I can not install on magento-1.7.0.2:

    CONNECT ERROR: Package file is invalid
    Invalid package name, allowed: [a-zA-Z0-9_-] chars
    Invalid version, should be like: x.x.x
    Invalid stability
    Invalid date, should be YYYY-DD-MM
    Invalid channel URL
    Empty authors section
    Empty package contents section

    ReplyDelete
  2. Are you trying to install it using magento connect?
    If you are, then don't.
    Just copy the folder app over the app of your Magento instance and the skin folder over the skin folder of your instance.

    Nothing should be overwritten.

    Marius.

    ReplyDelete
    Replies
    1. Hi Marius, still does not work ....
      Thanks, Sabino.

      Checking dependencies of packages
      Starting to download Ultimate_ModuleCreator-1.0.0.tgz ...
      ...done: 88,036 bytes
      Installing package community/Ultimate_ModuleCreator 1.0.0

      CONNECT ERROR: Failed to open file C:/Program Files/Zend/Apache2/htdocs/mage171\downloader\.cache\community\Ultimate_ModuleCreator-1.0.0\app/code/community/Ultimate/ModuleCreator/etc/modulecreator/app/code/codepool/Namespace/Module/Block/Adminhtml/Catalog/Product/Edit/Tab/Entity/01_content.php

      Delete
    2. I'm sorry. I don't know what to say.
      I was able to install it (on a windows server) from the Magento connect and also using the zip from github. And I'm no the only one that was able to do it.
      If you ever find the problem/solution please post it here also. Maybe it can help others.
      Marius.

      Delete
    3. Thanks Marius for this wonderful tool!

      I also had this install issue, here's my fix:

      I simply extract the .tar (1548 KB) from the tgz (128 KB) with 7zip.
      In Magento download manager, choose local file to upload and select the .tar file, then install it.

      I think the path of 01_content.php is too long to be able to "double" extract in cache memory (gunzip first then untar), depending on some settings in OS.
      J2L

      Delete
  3. Please provide us with the article, for creating a payment module using this module creator. Thanks in advance.

    ReplyDelete
    Replies
    1. I'm sorry for disappointing you but this is not build for this.
      It only allows you to create custom entities (for example: articles, press releases, FAQs, ...) and link them among each other or to the products. It cannot create payment modules or shipping modules.

      Marius.

      Delete
    2. Thank you for your reply :) Hope u will create a module for this soon.

      Delete
    3. Maybe I will, but don't hold your breath :).
      Payment methods are not my favorite things about Magento. And as long as I do this on my free time and for fun, the chances are slim. (but you never know).

      Delete
  4. Would love to see other types of entities like collection based on filters, email creation, PDF templates, ... and be able to link them of course :-)
    Hope you have lot of free time!
    J2L

    ReplyDelete
    Replies
    1. Can you elaborate your idea of 'collection based on filter, email....'? Give me an example.
      I'm really interested.

      Delete
  5. Email:
    A Model/Observer.php::sendEmailAction may be build with moduleCreator via another kind of entity?

    Different from new tables and fields but not so far from the user's point of view. Not sure if it's easy or feasible.
    A cron job can be the "link" between existing or future data and an action(here: send email)?
    Further on, you can add Facebook, twitter feeds "linked" to your store's new data, events, ...

    Collections and filters:
    You can use Magento to extract data from DB using collections with filters (see http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-1-introduction-to-magento), I guess you can create another entity type where you can, first, test-search for precise data, or kind of data, or field using collections and filters on existing tables and then build the "Magento-SQL" code in this type of entity to build a view of this result (basically build and present a collection with filters entered by user).
    You touch the way Drupal manage its data through "Views".

    Since you already master SQL Model to create tables, links and pull data from them I guess it can be a piece of cake (for you) to pull from another table? Problem is with EAV, might keep them away to start.

    Let me know if it helps :-), you can email me using the URL domain of this comment.
    J2L

    ReplyDelete
  6. Looking for advice... Installed great, setup was easy to understand, I set the creator to install the files for me, but I don't see any menu items for the new module I created. The files are all in place, but nothing is different on the menus. It is active as a module. Any ideas? Thanks, KB

    ReplyDelete
    Replies
    1. Hello Kevin.
      Did you clear the cache?
      If you have the compilation enabled, disable it and try again.

      Delete
  7. Morning Marius,

    Thanks for the great meta module!

    I'm having troubles adding fields once the entity is configured. I click on Add field and I get the Please wait briefly but then nothing happens. On inspection of the Console there is an Ajax 500 error that I would send you a shot of but I'm unsure of your email address?

    The browser is chrome 24 for mac.

    Would be very appreciated if you could hint me a solution.

    All the best

    Peter

    ReplyDelete
    Replies
    1. Hello Peter.
      I don't think I can help much you here. Can you dig deeper and see what is causing the 500 server error?
      Does the error appear only on this extension or there are other requests that result in this error?

      As for the e-mail address, just open one of the files from the Module Creator and you will find it in there.

      Marius.

      Delete
  8. Hi. Great module. I've got it installed just fine, but when I go to save my custom module I get the following error. Any ideas? Thanks

    Cannot send headers; headers already sent in /usr/www/users/id4/smartpour.com/2013_dev/magento/lib/Varien/Io/File.php, line 474

    Trace:
    #0 /usr/www/users/id4/smartpour.com/2013_dev/magento/lib/Zend/Controller/Response/Abstract.php(148): Zend_Controller_Response_Abstract->canSendHeaders(true)
    #1 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Core/Controller/Response/Http.php(106): Zend_Controller_Response_Abstract->setRedirect('http://66.39.14...', 302)
    #2 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Adminhtml/Controller/Action.php(348): Mage_Core_Controller_Response_Http->setRedirect('http://66.39.14...')
    #3 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/community/Ultimate/ModuleCreator/controllers/Adminhtml/ModulecreatorController.php(328): Mage_Adminhtml_Controller_Action->_redirect('*/*/')
    #4 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Ultimate_ModuleCreator_Adminhtml_ModulecreatorController->saveAction()
    #5 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
    #6 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
    #7 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
    #8 /usr/www/users/id4/smartpour.com/2013_dev/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
    #9 /usr/www/users/id4/smartpour.com/2013_dev/magento/index.php(87): Mage::run('', 'store')
    #10 {main}

    ReplyDelete
    Replies
    1. Hello Evan.
      You are getting this error because the folder that the extension is trying to write in is not writable.
      If you choose to install the extension you create directly the all the folders must be writable.

      You can choose to create an archive with the extension and install it manually later. This should work because the 'var' must be writable for Magento to function.

      Marius.

      Delete
  9. Hi. Yesterday I easily created a module in an archive and downloaded it. Installed correctly. Today, I no longer see that module listed in my moduleCreator interface and when I go to create module archives they all show up as .tgz files of only 47 bytes (not real archives). Any idea what's going on? Thanks!

    ReplyDelete
  10. I think I solved by archiving bug (only creating 47 byte tgz files). I needed to chmod my var/package/tmp folder to be 777!

    ReplyDelete
  11. Thanks for this great module!

    I created a test-extension. Everything in the backend is working fine.

    The frontName of my extension in etc/config.xml is contactpersons, but http://mymagento/contactpersons/ gives me a 404. Do I miss something?

    ReplyDelete
    Replies
    1. I don't know if you are missing something. Try clearing the cache.
      If you used uppercase letters it the entity names it won't work. This is a bug I found this week. It will be fixed in version 1.5.
      If nothing works send me the xml located in var/modulecreator/package at the e-mail address you find in the source code of the module creator extension and I will investigate.

      Marius.

      Delete
  12. Great extension! Congratulations!

    One question. When creating an entity, i see that i can create a web store field. But is there a way to create a view store field??

    Is very common to create differentes store view in multilingual magentos, so this should be used to create multilingual custom records using your extension.

    Thanks for your work!

    ReplyDelete
    Replies
    1. Thanks Pablo.
      At this moment the Module Creator does not support store view fields. Even the 'website' type attribute has nothing to do with the websites themselves. Is more like a simple dropdown with some values. It has no logic behind it. But....
      In version 1.5 of the ModuleCreator I will include a website selector similar to the one used in the CMS pages or static blocks by default for all the entities.
      I hope I will release v1.5 in the next 2 weeks.
      Cheers.
      Marius

      Delete
  13. Hi, first off thank you for putting this out there. I do seem to have hit a steep learning curve on this. I really want to create a custom report using this extension, but not sure how to go about.

    The creation of the skeleton is great work, but now I am a little lost. Is it possible to create a custom report through this module? All I really want is to create a report that pulls the ordernr/sku/qty/cost and total sales price.

    That way I can calculate profit on a per order basis.

    ReplyDelete
    Replies
    1. The Module creator does not do what you need. It's not its purpose. It can only (very easily) create new entities and (very easily) link them between each other and with the products. I guess I have to write that documentation I've been avoiding for some time to make it clear what it does and what it doesn't do.

      Marius.

      Delete
  14. Using Behaves as tree

    Are experiencing the following error on frontend

    Fatal error: Call to a member function lookupStoreIds () on a non-object in /Block/Agenda/List.php on line 85

    ReplyDelete
    Replies
    1. Thanks for the info, but in order to fix it I will need some more help. When you created your module, an xml file with the module name was created in var/modulecreator/package. Please send me that xml so I can have a better view of the issue. You can send it at the e-mail address you find in the code of the ModuleCreator.

      Marius.

      Delete
    2. Oh. I found it. Stupid mistake. I forgot to add a placeholder in the source used to generate the module code. Go to the line specified in the error message and you should find something like this:
      $storeIds = Mage::getResourceSingleton('news/section')->lookupStoreIds($section->getId());

      Just replace 'news/section' with the identifier for you model ('moduleName/modelName'). I will fix this and release a new version as soon as possible. Thanks again for the tip.

      Delete
    3. and replace

      $section->getId() with the variable name used in the code above. I assume is $agenda->getId()

      Delete
  15. Thanks for the correction

    I would like to offer my congratulations, I found your module very fantastic, make sure this is a huge contribution to the community magento

    Congratulations brother

    ReplyDelete
  16. Hey, guys. Do you happen to such a install issue.

    install: Failed to open file /home/jimmy/magento/downloader/.cache/community/Ultimate_ModuleCreator-1.6.3.1/app/code/community/Ultimate/ModuleCreator/etc/m/app/code/cp/Ns/Md/Block/Adminhtml/Entity/Edit/Tab/Fo

    It's very strange. It seems that magento unable to un-tar the installer completely. But, if using the following command manually and then according to the readme_UMC.txt copy all app/* and skin/* to the target folder, everything will be OK.

    tar -zxvf ./Ultimate_ModuleCreator-1.6.3.1.tgz -C ./Ultimate_ModuleCreator-1.6.3.1

    ReplyDelete
  17. Hi,
    thanks for your module creator. its very helpful!
    what i want to achieve is also a many-to-many relation such as:

    Link "many to many" with orders.

    Is it possible to do this with the creator?

    ReplyDelete
    Replies
    1. Sorry but it doesn't work for orders. and there is no plan to make it work like that in the near future. But feel free to fork it and modify it to fit your needs.

      Delete
  18. Does it work for Magento 1.8.1.0 version, or can you list out changes or put a new source for module creator for magento 1.8 & later versions ?

    ReplyDelete
    Replies
    1. In theory it should work for 1.8.x, but I haven't tested it on that version. I recommend you give this new version a try: https://github.com/tzyganu/UMC1.9. It is not yet in a final form but it will be soon enough. And I test this one on 1.8 also.

      Delete