controller/jobs/src/Controller/Jobs/Order/Email/Voucher/Standard.php
protected function process( \Aimeos\Client\Html\Iface $client, array $items, $status )
	{
		$context = $this->getContext();
		$orderBaseManager = \Aimeos\MShop::create( $context, 'order/base' );

		foreach( $items as $id => $item )
		{
			try
			{
				$orderBaseItem = $orderBaseManager->load( $item->getBaseId() )->off();

				$orderBaseItem = $this->createCoupons( $orderBaseItem );
				$orderBaseManager->store( $orderBaseItem );

				$this->sendEmails( $orderBaseItem, $client );
				$this->addOrderStatus( $id, $status );

				$str = sprintf( 'Sent voucher e-mails for order ID "%1$s"', $item->getId() );
				$context->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO );
			}
			catch( \Exception $e )
			{
				$str = 'Error while trying to send voucher e-mails for order ID "%1$s": %2$s';
				$msg = sprintf( $str, $item->getId(), $e->getMessage() );
				$context->getLogger()->log( $msg );
			}
		}
	}
protected function process( \Aimeos\Client\Html\Iface $client, array $items, $status )
	{
		$context = $this->getContext();
		$orderBaseManager = \Aimeos\MShop::create( $context, 'order/base' );

		foreach( $items as $id => $item )
		{
			try
			{
				$orderBaseItem = $orderBaseManager->load( $item->getBaseId() )->off();

				$orderBaseItem = $this->createCoupons( $orderBaseItem );
				$orderBaseManager->store( $orderBaseItem );

				$this->sendEmails( $orderBaseItem, $client );
				$this->addOrderStatus( $id, $status );

				$str = sprintf( 'Sent voucher e-mails for order ID "%1$s"', $item->getId() );
				$context->getLogger()->log( $str, \Aimeos\MW\Logger\Base::INFO );
			}
			catch( \Exception $e )
			{
				$str = 'Error while trying to send voucher e-mails for order ID "%1$s": %2$s';
				$msg = sprintf( $str, $item->getId(), $e->getMessage() );
				$context->getLogger()->log( $msg );
			}
		}
	}
protected function process ( \ Aimeos \ Client \ Html \ Iface $ client , array $ items , $ status ) { $ context = $ this -> getContext ( ) ; $ orderBaseManager = \ Aimeos \ MShop :: create ( $ context , 'order/base' ) ; foreach ( $ items as $ id => $ item ) { try { $ orderBaseItem = $ orderBaseManager -> load ( $ item -> getBaseId ( ) ) -> off ( ) ; $ orderBaseItem = $ this -> createCoupons ( $ orderBaseItem ) ; $ orderBaseManager -> store ( $ orderBaseItem ) ; $ this -> sendEmails ( $ orderBaseItem , $ client ) ; $ this -> addOrderStatus ( $ id , $ status ) ; $ str = sprintf ( 'Sent voucher e-mails for order ID "%1$s"' , $ item -> getId ( ) ) ; $ context -> getLogger ( ) -> log ( $ str , \ Aimeos \ MW \ Logger \ Base :: INFO ) ; } catch ( \ Exception $ e ) { $ str = 'Error while trying to send voucher e-mails for order ID "%1$s": %2$s' ; $ msg = sprintf ( $ str , $ item -> getId ( ) , $ e -> getMessage ( ) ) ; $ context -> getLogger ( ) -> log ( $ msg ) ; } } }
Sends the voucher e-mail for the given orders

@param \Aimeos\Client\Html\Iface $client HTML client object for rendering the voucher e-mails
@param \Aimeos\MShop\Order\Item\Iface[] $items Associative list of order items with their IDs as keys
@param integer $status Delivery status value
Sends the voucher e - mail for the given orders