controller/jobs/src/Controller/Jobs/Order/Email/Voucher/Standard.php
protected function getCouponId()
	{
		if( !isset( $this->couponId ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'coupon' );

			$search = $manager->createSearch()->setSlice( 0, 1 );
			$search->setConditions( $search->compare( '=~', 'coupon.provider', 'Voucher' ) );

			$items = $manager->searchItems( $search );

			if( ( $item = reset( $items ) ) === false ) {
				throw new \Aimeos\Controller\Jobs\Exception( 'No coupon provider "Voucher" available' );
			}

			$this->couponId = $item->getId();
		}

		return $this->couponId;
	}
protected function getCouponId()
	{
		if( !isset( $this->couponId ) )
		{
			$manager = \Aimeos\MShop::create( $this->getContext(), 'coupon' );

			$search = $manager->createSearch()->setSlice( 0, 1 );
			$search->setConditions( $search->compare( '=~', 'coupon.provider', 'Voucher' ) );

			$items = $manager->searchItems( $search );

			if( ( $item = reset( $items ) ) === false ) {
				throw new \Aimeos\Controller\Jobs\Exception( 'No coupon provider "Voucher" available' );
			}

			$this->couponId = $item->getId();
		}

		return $this->couponId;
	}
protected function getCouponId ( ) { if ( ! isset ( $ this -> couponId ) ) { $ manager = \ Aimeos \ MShop :: create ( $ this -> getContext ( ) , 'coupon' ) ; $ search = $ manager -> createSearch ( ) -> setSlice ( 0 , 1 ) ; $ search -> setConditions ( $ search -> compare ( '=~' , 'coupon.provider' , 'Voucher' ) ) ; $ items = $ manager -> searchItems ( $ search ) ; if ( ( $ item = reset ( $ items ) ) === false ) { throw new \ Aimeos \ Controller \ Jobs \ Exception ( 'No coupon provider "Voucher" available' ) ; } $ this -> couponId = $ item -> getId ( ) ; } return $ this -> couponId ; }
Returns the coupon ID for the voucher coupon

@return string Unique ID of the coupon item
Returns the coupon ID for the voucher coupon