开发者

2 customer created with master slave configured

With master slave configured on magento 1.4.1.

When I place order from backend two customers are created. One customer is with all the information added during order and one use开发者_开发百科r without firstname, lastname and other information.


I did this to fix this

Changed

class Mage_Customer_Model_Entity_Customer extends
Mage_Eav_Model_Entity_Abstract
{
    /**
     * Initiate resources
     *
     */
    public function __construct()
    {
        $resource = Mage::getSingleton('core/resource');
        $this->setType('customer');
        $this->setConnection(
            $resource->getConnection('customer_read'),
            $resource->getConnection('customer_write')
        );
    }

to

class Mage_Customer_Model_Entity_Customer extends
Mage_Eav_Model_Entity_Abstract
{
    /**
     * Initiate resources
     *
     */
    public function __construct()
    {
        $resource = Mage::getSingleton('core/resource');
        $this->setType('customer');
        $this->setConnection(
            $resource->getConnection('core_setup'),
            $resource->getConnection('core_setup')
        );
    }

Let me know if there is any other way to solve this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜