Magento定制 - 我该如何处理这项任务?

时间:2011-01-31 13:09:34

标签: php magento magento-1.4

我被委派了一项任务,将一些自定义字段添加到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>

然后我需要检查是否设置了newoption(复选框),如果是,则提取值为订单ID并将以下信息存储到表中:

表:newoption,columns:

  • id:auto_inc
  • order_id:从$_GET['newoption']$_POST['newoption']
  • 返回的值
  • option_type:select
  • 返回的值
  • phone:从文本输入返回的值

现在,我的问题是我应该做些什么?

  • 添加扩展程序?
  • 添加小部件?
  • 修改现有的扩展程序或小部件(在哪里)?

1 个答案:

答案 0 :(得分:1)