src/ShopBundle/objects/db/TShopOrder.class.php
protected function PostInsertHook()
    {
        parent::PostInsertHook();
        // we need to add an order number to the order... since generation of this number may differ
        // from shop to shop, we have added the method to fetch a new order number to the shop class
        $oShop = TdbShop::GetInstance();
        $iOrderNumber = $oShop->GetNextFreeOrderNumber();
        $aData = $this->sqlData;
        $aData['ordernumber'] = $iOrderNumber;
        $this->LoadFromRow($aData);
        $this->Save();
    }
protected function PostInsertHook()
    {
        parent::PostInsertHook();
        // we need to add an order number to the order... since generation of this number may differ
        // from shop to shop, we have added the method to fetch a new order number to the shop class
        $oShop = TdbShop::GetInstance();
        $iOrderNumber = $oShop->GetNextFreeOrderNumber();
        $aData = $this->sqlData;
        $aData['ordernumber'] = $iOrderNumber;
        $this->LoadFromRow($aData);
        $this->Save();
    }
protected function PostInsertHook ( ) { parent :: PostInsertHook ( ) ; // we need to add an order number to the order... since generation of this number may differ // from shop to shop, we have added the method to fetch a new order number to the shop class $ oShop = TdbShop :: GetInstance ( ) ; $ iOrderNumber = $ oShop -> GetNextFreeOrderNumber ( ) ; $ aData = $ this -> sqlData ; $ aData [ 'ordernumber' ] = $ iOrderNumber ; $ this -> LoadFromRow ( $ aData ) ; $ this -> Save ( ) ; }
we use the post insert hook to set the ordernumber for the order.
we use the post insert hook to set the ordernumber for the order .