There’s already documentation about how to create custom payment module, which doesn’t include declaration of blocks, but it is similar to declaration of models, need to put in config.xml of new module following:
then type="yourmodule/your_block" will refer to Mage_YourModule_Block_Your_Block class, which can be extended from any other block, i’d suggest looking at Mage_Core_Block_*
The ultimate method that is going to output HTML is ->toHtml()
With regard to processing forms, is there some way to put the data back into the form so the visitor can complete it?
I usually validate forms server-side, but cannot seem to return the data yet. I am looking at a way to use php to create a javascript script that puts the values in, but am still experimenting.
It is an interesting exercise getting a custom form to work in this environment.
make <form action="{{store url=’yourmodule/form/save’}}">, this will make the form to submit to app/code/core/Mage/YourModule/controllers/FormController.php:
<?php
class Mage_YourModule_FormController extends Mage_Core_Controller_Front_Action { public function saveAction() { // do your form processing here //print_r($_POST);