
在英文中
fist name:名
last name:姓
magento中客户填写用户信息的时候,姓名是分开的。根据国外的习惯,名在前,姓在后,这个好说,直接去模版文件修改下显示顺序。
以magento1.4的default模板为例
magento注册页面姓名模板文件路径:app\design\frontend\base\default\template\customer\widget\name.phtml
将
<div class="field name-firstname"> <label for="<?php echo $this->getFieldId('firstname')?>" class="required"><em>*</em><?php echo $this->__('First Name') ?></label> <div class="input-box"> <input type="text" id="<?php echo $this->getFieldId('firstname')?>" name="<?php echo $this->getFieldName('firstname')?>" value="<?php echo $this->htmlEscape($this->getObject()->getFirstname()) ?>" title="<?php echo $this->__('First Name') ?>" class="input-text required-entry" <?php echo $this->getFieldParams() ?> /> </div> </div> <?php if ($this->showMiddlename()): ?> <div class="field name-middlename"> <label for="<?php echo $this->getFieldId('middlename')?>"><?php echo $this->__('M.I.') ?></label> <div class="input-box"> <input type="text" id="<?php echo $this->getFieldId('middlename')?>" name="<?php echo $this->getFieldName('middlename')?>" value="<?php echo $this->htmlEscape($this->getObject()->getMiddlename()) ?>" title="<?php echo $this->__('M.I.') ?>" class="input-text" <?php echo $this->getFieldParams() ?> /> </div> </div> <?php endif; ?> <div class="field name-lastname"> <label for="<?php echo $this->getFieldId('lastname')?>" class="required"><em>*</em><?php echo $this->__('Last Name') ?></label> <div class="input-box"> <input type="text" id="<?php echo $this->getFieldId('lastname')?>" name="<?php echo $this->getFieldName('lastname')?>" value="<?php echo $this->htmlEscape($this->getObject()->getLastname()) ?>" title="<?php echo $this->__('Last Name') ?>" class="input-text required-entry" <?php echo $this->getFieldParams() ?> /> </div> </div>