【问题标题】:Magento Save Value in Custom Attribute of Customer from one page checkout (billing.phtml)Magento 通过一页结帐 (billing.phtml) 在客户的自定义属性中保存价值
【发布时间】:2016-05-11 09:24:41
【问题描述】:

我为客户注册制作了一个属性。它在注册时工作正常。我在一页结帐时遇到问题。与正常注册一样,我也在一步结账注册期间从客户那里获取价值,但问题是它没有将值存储在属性中。先感谢您 billing.phtml 的代码,它显示属性的文本框以从用户那里获取值

                    <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>

【问题讨论】:

    标签: magento custom-attribute


    【解决方案1】:

    只需更新 config.xml 中的以下代码并检查它

    <fieldsets>
        <checkout_onepage_quote>
            <attributename>
                <to_customer>*</to_customer>
            </attributename>
        </checkout_onepage_quote>
    </fieldsets>
    

    【讨论】:

      猜你喜欢
      • 2011-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-09
      相关资源
      最近更新 更多