src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php
protected function PostInsertHook()
    {
        parent::PostInsertHook();

        // we need to add an customer number to the order... since generation of this number may differ
        // from shop to shop, we have added the method to fetch a new customer number to the shop class
        if (empty($this->sqlData['customer_number']) || empty($this->sqlData['shop_id'])) {
            $aUpdateData = array();
            if (empty($this->sqlData['customer_number'])) {
                $aUpdateData['customer_number'] = $this->GetCustomerNumber();
            }
            if (empty($this->sqlData['shop_id'])) {
                $oShop = TdbShop::GetInstance();
                $aUpdateData['shop_id'] = $oShop->id;
            }
            if (count($aUpdateData) > 0) {
                $this->SaveFieldsFast($aUpdateData);
            }
        }
        TdbDataExtranetGroup::UpdateAutoAssignToUser($this);
    }
protected function PostInsertHook()
    {
        parent::PostInsertHook();

        // we need to add an customer number to the order... since generation of this number may differ
        // from shop to shop, we have added the method to fetch a new customer number to the shop class
        if (empty($this->sqlData['customer_number']) || empty($this->sqlData['shop_id'])) {
            $aUpdateData = array();
            if (empty($this->sqlData['customer_number'])) {
                $aUpdateData['customer_number'] = $this->GetCustomerNumber();
            }
            if (empty($this->sqlData['shop_id'])) {
                $oShop = TdbShop::GetInstance();
                $aUpdateData['shop_id'] = $oShop->id;
            }
            if (count($aUpdateData) > 0) {
                $this->SaveFieldsFast($aUpdateData);
            }
        }
        TdbDataExtranetGroup::UpdateAutoAssignToUser($this);
    }
protected function PostInsertHook ( ) { parent :: PostInsertHook ( ) ; // we need to add an customer number to the order... since generation of this number may differ // from shop to shop, we have added the method to fetch a new customer number to the shop class if ( empty ( $ this -> sqlData [ 'customer_number' ] ) || empty ( $ this -> sqlData [ 'shop_id' ] ) ) { $ aUpdateData = array ( ) ; if ( empty ( $ this -> sqlData [ 'customer_number' ] ) ) { $ aUpdateData [ 'customer_number' ] = $ this -> GetCustomerNumber ( ) ; } if ( empty ( $ this -> sqlData [ 'shop_id' ] ) ) { $ oShop = TdbShop :: GetInstance ( ) ; $ aUpdateData [ 'shop_id' ] = $ oShop -> id ; } if ( count ( $ aUpdateData ) > 0 ) { $ this -> SaveFieldsFast ( $ aUpdateData ) ; } } TdbDataExtranetGroup :: UpdateAutoAssignToUser ( $ this ) ; }
we use the post insert hook to set the customer number.
we use the post insert hook to set the customer number .