Magento 为什么当我进入onepage/checkout/index时,我的报价地址将包含在我的默认账单和发货地址中

Magento 为什么当我进入onepage/checkout/index时,我的报价地址将包含在我的默认账单和发货地址中,magento,checkout,quote,Magento,Checkout,Quote,好的,各位,当我使用客户登录magento frontend时。向我的购物车添加一些产品。转到结帐。注意:我只使用一页/结帐/索引。让我们继续5个步骤来完成我的报价消息。现在,特殊操作开始。我只需更改sales_flat_quote表的字段customer_id。通过sql将此报价变成另一个customer quote消息。如下所示: $write = Mage::getSingleton("core/resource")->getConnection('core_write');

好的,各位,当我使用客户登录magento frontend时。向我的购物车添加一些产品。转到结帐。注意:我只使用一页/结帐/索引。让我们继续5个步骤来完成我的报价消息。现在,特殊操作开始。我只需更改sales_flat_quote表的字段customer_id。通过sql将此报价变成另一个customer quote消息。如下所示:

  $write = Mage::getSingleton("core/resource")->getConnection('core_write');
        try {
            $write->beginTransaction();
            $quoteId=$quote->getId();
            $sql = "UPDATE `sales_flat_quote`
                    SET `is_active` = '0',
                     `customer_id` = '{$parentId}',
                     `old_customer_id` = '{$customerId}',
                     `old_customer_name` = '{$sonName}',
                     `customer_email` = '{$parentEmail}',
                     `customer_firstname` = '{$parentFirstname}',
                     `customer_lastname` = '{$parentLastname}'
                    WHERE
                        `entity_id` = '{$quoteId}'";
            $write->query($sql);
            $sql="UPDATE `sales_flat_quote_address`
                    SET `customer_id` = '{$parentId}',
                     `email` = '{$parentEmail}'
                    WHERE
                        `quote_id` = '{$quoteId}'";
            $write->query($sql);
            $write->commit();
        }catch(Mage_Core_Exception $e){
            Mage::log('异常:子账号的customer_id未转换为主账号的customer_id');
            $write->rollBack();
            $customerSession->addError('place order for company falied,please try again.');
            $this->_redirectError(Mage::getUrl('checkout/onepage/index'));
            return;
        }
在此之后,报价就变成了另一位客户的报价。 我使用此quote_id,来到onepage/checkout/index,只是magento默认的签出模块。当我选择addess selelct的选项new address时。在第一步中,我的quote账单地址被另一个客户的默认账单地址替换。 嗯,我只想让magento不要使用我的客户默认帐单地址来覆盖我的原始报价地址信息。如何才能? 我的英语不好,请给我一些帮助