Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

Canned Module - And Some Questions
Clark Studios
Jr. Member
Total Posts:  4
Joined:  2009-05-20

Recently tried to write a module for Magento and got knowhere fast.

Had it appearing in the back end and a form appearing but could not figure out or fathom how everything ties together it just makes no real sense, So rather than spend another day wasted on it I have a couple of questions to ask for any developers out there.

When you set up the tables in you mysql_install and then set out and write the form in the back end, does Magento automatically poplulate the form fields and do the form fields have to map to table column names. i.e if I have a column name of title would I just have to do this?

$fieldset->addField('title''text', array(
'label'     => Mage::helper('MODULE NAME')->__('Title'),
'class'     => 'required-entry',
'required'  => true,
'name'      => 'title',

Which brings me to my next question, Do you have to do anything special with regards to where the form submits to i.e. my controller had

public function __construct()
->_controller 'adminhtml_easyhomepage';
$this->_blockGroup 'easyhomepage';
$this->_headerText Mage::helper('easyhomepage')->__('Easy Home Page');
$this->_addButtonLabel Mage::helper('easyhomepage')->__('Save');

Does Magento know where to post back to?.

Last at not all least, My last issue was I wanted to create a <select> form field so used the old array as in the first code example above but wanted to list all of the products in the catalog - I tried several ways Mage:getModel(’catalog/product’) but could not get it to render the name really random.

I admitted defeat about half an hour ago, and to say confused and slightly annoyed are an understatement so some guidance would be greatly apprecitaed before I decide to develop on a different solution, as on the front of it I think this is a great solution - Just cant help but feel with some good solid documentation it could be a worldwide winner.

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top