source/Application/Model/User.php
public function onOrderExecute($oBasket, $iSuccess)
    {

        if (is_numeric($iSuccess) && $iSuccess != 2 && $iSuccess <= 3) {
            //adding user to particular customer groups
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
            $dMidlleCustPrice = (float) $myConfig->getConfigParam('sMidlleCustPrice');
            $dLargeCustPrice = (float) $myConfig->getConfigParam('sLargeCustPrice');

            $this->addToGroup('oxidcustomer');
            $dBasketPrice = $oBasket->getPrice()->getBruttoPrice();
            if ($dBasketPrice < $dMidlleCustPrice) {
                $this->addToGroup('oxidsmallcust');
            }
            if ($dBasketPrice >= $dMidlleCustPrice && $dBasketPrice < $dLargeCustPrice) {
                $this->addToGroup('oxidmiddlecust');
            }
            if ($dBasketPrice >= $dLargeCustPrice) {
                $this->addToGroup('oxidgoodcust');
            }

            if ($this->inGroup('oxidnotyetordered')) {
                $this->removeFromGroup('oxidnotyetordered');
            }
        }
    }
public function onOrderExecute($oBasket, $iSuccess)
    {

        if (is_numeric($iSuccess) && $iSuccess != 2 && $iSuccess <= 3) {
            //adding user to particular customer groups
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
            $dMidlleCustPrice = (float) $myConfig->getConfigParam('sMidlleCustPrice');
            $dLargeCustPrice = (float) $myConfig->getConfigParam('sLargeCustPrice');

            $this->addToGroup('oxidcustomer');
            $dBasketPrice = $oBasket->getPrice()->getBruttoPrice();
            if ($dBasketPrice < $dMidlleCustPrice) {
                $this->addToGroup('oxidsmallcust');
            }
            if ($dBasketPrice >= $dMidlleCustPrice && $dBasketPrice < $dLargeCustPrice) {
                $this->addToGroup('oxidmiddlecust');
            }
            if ($dBasketPrice >= $dLargeCustPrice) {
                $this->addToGroup('oxidgoodcust');
            }

            if ($this->inGroup('oxidnotyetordered')) {
                $this->removeFromGroup('oxidnotyetordered');
            }
        }
    }
public function onOrderExecute ( $ oBasket , $ iSuccess ) { if ( is_numeric ( $ iSuccess ) && $ iSuccess != 2 && $ iSuccess <= 3 ) { //adding user to particular customer groups $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ dMidlleCustPrice = ( float ) $ myConfig -> getConfigParam ( 'sMidlleCustPrice' ) ; $ dLargeCustPrice = ( float ) $ myConfig -> getConfigParam ( 'sLargeCustPrice' ) ; $ this -> addToGroup ( 'oxidcustomer' ) ; $ dBasketPrice = $ oBasket -> getPrice ( ) -> getBruttoPrice ( ) ; if ( $ dBasketPrice < $ dMidlleCustPrice ) { $ this -> addToGroup ( 'oxidsmallcust' ) ; } if ( $ dBasketPrice >= $ dMidlleCustPrice && $ dBasketPrice < $ dLargeCustPrice ) { $ this -> addToGroup ( 'oxidmiddlecust' ) ; } if ( $ dBasketPrice >= $ dLargeCustPrice ) { $ this -> addToGroup ( 'oxidgoodcust' ) ; } if ( $ this -> inGroup ( 'oxidnotyetordered' ) ) { $ this -> removeFromGroup ( 'oxidnotyetordered' ) ; } } }
Called after saving an order.

@param object $oBasket  Shopping basket object
@param int    $iSuccess order success status
Called after saving an order .