controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
protected function addBasketCoupons( \Aimeos\MShop\Context\Item\Iface $context,
		\Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes )
	{
		/** controller/jobs/subcription/process/renew/standard/use-coupons
		 * Applies the coupons of the previous order also to the new one
		 *
		 * Reuse coupon codes added to the basket by the customer the first time
		 * again in new subcription orders. If they have any effect depends on
		 * the codes still being active (status, time frame and count) and the
		 * decorators added to the coupon providers in the admin interface.
		 *
		 * @param boolean True to reuse coupon codes, false to remove coupons
		 * @category Developer
		 * @category User
		 * @since 2018.10
		 */
		if( $context->getConfig()->get( 'controller/jobs/subcription/process/renew/standard/use-coupons', false ) )
		{
			foreach( $codes as $code )
			{
				try {
					$basket->addCoupon( $code );
				} catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) {
					$basket->deleteCoupon( $code );
				}
			}
		}

		return $basket;
	}
protected function addBasketCoupons( \Aimeos\MShop\Context\Item\Iface $context,
		\Aimeos\MShop\Order\Item\Base\Iface $basket, array $codes )
	{
		/** controller/jobs/subcription/process/renew/standard/use-coupons
		 * Applies the coupons of the previous order also to the new one
		 *
		 * Reuse coupon codes added to the basket by the customer the first time
		 * again in new subcription orders. If they have any effect depends on
		 * the codes still being active (status, time frame and count) and the
		 * decorators added to the coupon providers in the admin interface.
		 *
		 * @param boolean True to reuse coupon codes, false to remove coupons
		 * @category Developer
		 * @category User
		 * @since 2018.10
		 */
		if( $context->getConfig()->get( 'controller/jobs/subcription/process/renew/standard/use-coupons', false ) )
		{
			foreach( $codes as $code )
			{
				try {
					$basket->addCoupon( $code );
				} catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) {
					$basket->deleteCoupon( $code );
				}
			}
		}

		return $basket;
	}
protected function addBasketCoupons ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context , \ Aimeos \ MShop \ Order \ Item \ Base \ Iface $ basket , array $ codes ) { /** controller/jobs/subcription/process/renew/standard/use-coupons
		 * Applies the coupons of the previous order also to the new one
		 *
		 * Reuse coupon codes added to the basket by the customer the first time
		 * again in new subcription orders. If they have any effect depends on
		 * the codes still being active (status, time frame and count) and the
		 * decorators added to the coupon providers in the admin interface.
		 *
		 * @param boolean True to reuse coupon codes, false to remove coupons
		 * @category Developer
		 * @category User
		 * @since 2018.10
		 */ if ( $ context -> getConfig ( ) -> get ( 'controller/jobs/subcription/process/renew/standard/use-coupons' , false ) ) { foreach ( $ codes as $ code ) { try { $ basket -> addCoupon ( $ code ) ; } catch ( \ Aimeos \ MShop \ Plugin \ Provider \ Exception $ e ) { $ basket -> deleteCoupon ( $ code ) ; } } } return $ basket ; }
Adds the given coupon codes to basket if enabled

@param \Aimeos\MShop\Context\Item\Iface Context object
@param \Aimeos\MShop\Order\Item\Base\Iface $basket Order including product and addresses
@param array $codes List of coupon codes that should be added to the given basket
@return \Aimeos\MShop\Order\Item\Base\Iface Basket, maybe with coupons added
Adds the given coupon codes to basket if enabled