I have been delegated a task to add some custom fields to a Magento (1.4 Community) checkout page. There I should add the following form inputs:
<div id="newoption">
<h4>Would you also like to have this option? (it costs you an extra $2.00)</h4>
<input type="checkbox" name="newoption" value="[current order id goes here]"> Yes please.<br/>
Please select the type you want: <select name="newoption_type">[options for type go here]</select><br/>
Please enter your phone <input type="text" name="newoption_phone"/>
</div>
Then I need to check if the newoption (the checkbox) is set and if so extract the value which is the order id and store the following info into a table:
table: newoption, columns:
- id: auto_inc
- order_id: the value returned from
$_GET['newoption']
or$_POST['newoption']
- option_type: the value returned from select
- phone: the value returned from text input
Now, my question is what should I plan to do?
- add an extension?
- add a widget?
- modify existing extension or widget (where)?
An extension for this already exists:
http://www.magentocommerce.com/extension/1037/checkout-fields-manager/