core/oxpspaymorroweshopdataprovider.php
protected function _addOrderHistoryData( array $aData, oxUser $oUser )
    {
        /** @var oxList $oOrdersList */
        $oOrdersList = $oUser->getOrders( 10 );

        if ( empty( $oOrdersList ) or !$oOrdersList->count() ) {
            return $aData;
        }

        $sFieldPrefix = 'customer_history_%d_%s';
        $iItemNumber  = 1;

        foreach ( $oOrdersList as $oOrder ) {
            /** @var OxpsPaymorrowOxOrder|oxOrder $oOrder */

            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'orderDate' )]     = $oOrder->getOrderDate();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'totalAmount' )]   = $oOrder->getTotalOrderSum();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'paymentMethod' )] = $oOrder->getPaymentMethodName();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'orderStatus' )]   = $oOrder->getOrderStatus();

            $iItemNumber++;
        }

        return $aData;
    }
protected function _addOrderHistoryData( array $aData, oxUser $oUser )
    {
        /** @var oxList $oOrdersList */
        $oOrdersList = $oUser->getOrders( 10 );

        if ( empty( $oOrdersList ) or !$oOrdersList->count() ) {
            return $aData;
        }

        $sFieldPrefix = 'customer_history_%d_%s';
        $iItemNumber  = 1;

        foreach ( $oOrdersList as $oOrder ) {
            /** @var OxpsPaymorrowOxOrder|oxOrder $oOrder */

            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'orderDate' )]     = $oOrder->getOrderDate();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'totalAmount' )]   = $oOrder->getTotalOrderSum();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'paymentMethod' )] = $oOrder->getPaymentMethodName();
            $aData[sprintf( $sFieldPrefix, $iItemNumber, 'orderStatus' )]   = $oOrder->getOrderStatus();

            $iItemNumber++;
        }

        return $aData;
    }
protected function _addOrderHistoryData ( array $ aData , oxUser $ oUser ) { /** @var oxList $oOrdersList */ $ oOrdersList = $ oUser -> getOrders ( 10 ) ; if ( empty ( $ oOrdersList ) or ! $ oOrdersList -> count ( ) ) { return $ aData ; } $ sFieldPrefix = 'customer_history_%d_%s' ; $ iItemNumber = 1 ; foreach ( $ oOrdersList as $ oOrder ) { /** @var OxpsPaymorrowOxOrder|oxOrder $oOrder */ $ aData [ sprintf ( $ sFieldPrefix , $ iItemNumber , 'orderDate' ) ] = $ oOrder -> getOrderDate ( ) ; $ aData [ sprintf ( $ sFieldPrefix , $ iItemNumber , 'totalAmount' ) ] = $ oOrder -> getTotalOrderSum ( ) ; $ aData [ sprintf ( $ sFieldPrefix , $ iItemNumber , 'paymentMethod' ) ] = $ oOrder -> getPaymentMethodName ( ) ; $ aData [ sprintf ( $ sFieldPrefix , $ iItemNumber , 'orderStatus' ) ] = $ oOrder -> getOrderStatus ( ) ; $ iItemNumber ++ ; } return $ aData ; }
Add user order history data.
Maximum 10 last orders fields are added.

@param array  $aData
@param oxUser $oUser

@return array
Add user order history data . Maximum 10 last orders fields are added .