Magento 定制 - 我如何完成这项任务?
我被委派了一项任务,将一些自定义字段添加到 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 的值并将以下信息存储到表中:
table: newoption, columns:
- id :auto_inc
- order_id:从
$_GET['newoption']
或$_POST['newoption']
返回的值 - option_type:从selectphone返回的值
- :从文本输入
现在,我的问题是我应该计划做什么?
- 添加扩展名?
- 添加小部件?
- 修改现有的扩展或小部件(在哪里)?
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)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对此的扩展已经存在:
http://www.magentocommerce.com/extension/1037/checkout-fields-经理/
An extension for this already exists:
http://www.magentocommerce.com/extension/1037/checkout-fields-manager/