Magento在客户的自定义属性中保存一页签出的值(billing.phtml)
我为客户注册创建了一个属性。登记工作进展顺利。我在一页结账时遇到问题。和普通注册一样,我也在一步结账注册过程中从客户处获取值,但问题是它并没有将值存储在属性中。先谢谢你 billing.phtml的代码,该代码显示属性的文本框,以便从用户处获取值Magento在客户的自定义属性中保存一页签出的值(billing.phtml),magento,custom-attribute,Magento,Custom Attribute,我为客户注册创建了一个属性。登记工作进展顺利。我在一页结账时遇到问题。和普通注册一样,我也在一步结账注册过程中从客户处获取值,但问题是它并没有将值存储在属性中。先谢谢你 billing.phtml的代码,该代码显示属性的文本框,以便从用户处获取值 <li class="fields"> <div class="field"> <
<li class="fields">
<div class="field">
<label for="<?php echo $attribute->getAttributeCode(); ?>" <?php if($attribute->getIsRequired()):?>class="required"><em>*</em> <?php else :?>><?php endif;?><?php echo $this->__($frontEndLabel) ?></label>
<div class="input-box">
<?php if($attribute->getFrontendInput()== 'text'):?>
<input type="text" name="billing[test]" id="billing:<?php echo $attribute->getAttributeCode(); ?>" title="<?php echo $this->__($frontEndLabel); ?>" class="input-text <?php echo $fieldRequiredClass; ?> <?php echo $fieldFrontendClass ;?>" />
<?php endif ?>
</div>
</div>
<?php endif ?>
<?php endforeach ?>
</li>
只需在config.xml中更新以下代码并进行检查
<fieldsets>
<checkout_onepage_quote>
<attributename>
<to_customer>*</to_customer>
</attributename>
</checkout_onepage_quote>
</fieldsets>
*