Where do I put the phtml file that all of this works with?
Current Files and their folder structure: app/code/local/Sean/Customform/controllers/IndexController.php
<?php
class Sean_Customform_IndexController extends Mage_Core_Controller_Front_Action{
public function indexAction(){ //this will display the form
$this->loadLayout();
$this->_initLayoutMessages('core/session'); //this will allow flash messages
$this->renderLayout();
}
public function sendAction(){ //handles the form submit
$customer = Mage::getSingleton('customer/session')->getCustomer();
$post = Mage::app()->getRequest()->getParams();
$customer->setData('vendorMarkup', $post['vendorMarkup']);
$customer->setData('vendorGramPrice', $post['vendorGramPrice']);
$customer->setData('vendorGramFront', $post['vendorGramFront']);
$customer->setData('vendorGramBack', $post['vendorGramBack']);
$customer->setData('vendorDefaultCalc', $post['defaultMarkup']);
$customer->save();
Mage::getSingleton('core/session')->addSuccess($this->__('Your Calculator Preferences Are Updated!'));//add success message.
$this->_redirect('*/*');
}
}
app/code/local/Sean/Customform/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Sean_Customform>
<version>0.0.1</version>
</Sean_Customform>
</modules>
<global>
<blocks>
<customform><!-- block alias -->
<class>Sean_Customform_Block</class>
</customform>
</blocks>
<helpers>
<customform><!-- helper alias -->
<class>Sean_Customform_Helper</class>
</customform>
</helpers>
</global>
<frontend>
<routers>
<customform>
<use>standard</use>
<args>
<module>Sean_Customform</module>
<frontName>customform</frontName><!-- url key for module -->
</args>
</customform>
</routers>
<layout>
<updates>
<sean_customform>
<file>sean_customform.xml</file><!-- frontend layout file -->
</sean_customform>
</updates>
</layout>
<translate>
<modules>
<Sean_Customform>
<files>
<default>Sean_Customform.csv</default><!-- translation file (not mandatory) -->
</files>
</Sean_Customform>
</modules>
</translate>
</frontend>
</config>
app/code/local/Sean/Customform/helper.Data.php
<?php
class Sean_Customform_Helper_Data extends Mage_Core_Helper_Abstract{
}
And of course, app/etc/modules/Sean_Customform.xml
<?xml version="1.0"?>
<config>
<modules>
<Sean_Customform>
<active>true</active>
<codePool>local</codePool>
</Sean_Customform>
</modules>
</config>