我被委派了一项任务,将一些自定义字段添加到 Magento(1.4 社区)结帐页面。在那里我应该添加以下表单输入:
<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>
然后我需要检查是否设置了新选项(复选框),如果设置了,则提取作为订单 ID 的值并将以下信息存储到表中:
表:新选项,列:
- 编号:auto_inc
- order_id:从
$_GET['newoption']
or返回的值$_POST['newoption']
- option_type:从选择返回的值
- phone:文本输入返回的值
现在,我的问题是我应该计划做什么?
- 添加扩展名?
- 添加一个小部件?
- 修改现有的扩展或小部件(在哪里)?