简体   繁体   English

在Magento Checkout中更改运输信息步骤

[英]Change shipping information step in Magento Checkout

I need to change the shipping information step in Magento Checkout page to 我需要将Magento Checkout页面中的运输信息步骤更改为

在此处输入图片说明

If user select the first radio the company address will comes in and it will store in database. 如果用户select the first radiocompany address will comesstore in database.

If user select second radio his address (already saves, new address option) will comes and stored in database. 如果用户select second radio his address (已经保存,新地址选项) will comesstored in database.

What I did new here is, I added two radio buttons and a company address field. The my address field is already there. 我在这里所做的是I added two radio buttons and a company address field. The my address field is already there. I added two radio buttons and a company address field. The my address field is already there.

The company address will hard coded in phtml file, because this is not present in user's address book. 公司地址将被硬编码在phtml文件中,因为用户地址簿中不存在该地址。

(company address means the product providing company) (公司地址指产品提供公司)

How can I did this..Please help me..any suggestion is very helpful... Magento ver 1.9.0.1 我该怎么做..请帮助我..任何建议都非常有帮助... Magento ver 1.9.0.1

First enable the template path hint to determine the template file for shipping information if you don't know from which file it is rendering. 如果您不知道从哪个文件渲染,则首先启用模板路径提示以确定用于运输信息的模板文件。

After you know the file now the real task starts from here.You don't need to change much you can: 知道文件后,真正的任务就从这里开始。您不需要做太多更改就可以:

  1. Add two radio button.Also add the shipping information form.one which displays company information form and another for customers address.You can use javascript to hide and display those forms according to radio button click. 添加两个单选按钮。还添加运输信息表单。一个显示公司信息表单,另一个显示客户地址。您可以使用JavaScript来隐藏和显示这些表单,方法是单击单选按钮。
  2. Now to save the values.While creating the form map the input field name and id same as the original shipping information form.Then you will not need to make changes to controller or database. 现在保存值。在创建表单映射时,输入字段名称和ID与原始运输信息表单相同,然后您无需对控制器或数据库进行更改。

Hope you understood what i am trying to tell. 希望你理解我想说的。

Hope this will help you. 希望这会帮助你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM