controller/jobs/src/Controller/Jobs/Subscription/Process/Renew/Standard.php
protected function createOrderBase( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription )
	{
		$manager = \Aimeos\MShop::create( $context, 'order/base' );

		$basket = $manager->load( $subscription->getOrderBaseId() );
		$newBasket = $manager->createItem()->setCustomerId( $basket->getCustomerId() );

		$newBasket = $this->addBasketProducts( $context, $newBasket, $basket->getProducts(), $subscription->getOrderProductId() );
		$newBasket = $this->addBasketAddresses( $context, $newBasket, $basket->getAddresses() );
		$newBasket = $this->addBasketServices( $context, $newBasket, $basket->getServices() );
		$newBasket = $this->addBasketCoupons( $context, $newBasket, array_keys( $basket->getCoupons() ) );

		return $manager->store( $newBasket );
	}
protected function createOrderBase( \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Subscription\Item\Iface $subscription )
	{
		$manager = \Aimeos\MShop::create( $context, 'order/base' );

		$basket = $manager->load( $subscription->getOrderBaseId() );
		$newBasket = $manager->createItem()->setCustomerId( $basket->getCustomerId() );

		$newBasket = $this->addBasketProducts( $context, $newBasket, $basket->getProducts(), $subscription->getOrderProductId() );
		$newBasket = $this->addBasketAddresses( $context, $newBasket, $basket->getAddresses() );
		$newBasket = $this->addBasketServices( $context, $newBasket, $basket->getServices() );
		$newBasket = $this->addBasketCoupons( $context, $newBasket, array_keys( $basket->getCoupons() ) );

		return $manager->store( $newBasket );
	}
protected function createOrderBase ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context , \ Aimeos \ MShop \ Subscription \ Item \ Iface $ subscription ) { $ manager = \ Aimeos \ MShop :: create ( $ context , 'order/base' ) ; $ basket = $ manager -> load ( $ subscription -> getOrderBaseId ( ) ) ; $ newBasket = $ manager -> createItem ( ) -> setCustomerId ( $ basket -> getCustomerId ( ) ) ; $ newBasket = $ this -> addBasketProducts ( $ context , $ newBasket , $ basket -> getProducts ( ) , $ subscription -> getOrderProductId ( ) ) ; $ newBasket = $ this -> addBasketAddresses ( $ context , $ newBasket , $ basket -> getAddresses ( ) ) ; $ newBasket = $ this -> addBasketServices ( $ context , $ newBasket , $ basket -> getServices ( ) ) ; $ newBasket = $ this -> addBasketCoupons ( $ context , $ newBasket , array_keys ( $ basket -> getCoupons ( ) ) ) ; return $ manager -> store ( $ newBasket ) ; }
Creates and stores a new order for the subscribed product

@param \Aimeos\MShop\Context\Item\Iface Context object
@param \Aimeos\MShop\Subscription\Item\Iface $subscription Subscription item with order base ID and order product ID
@return \Aimeos\MShop\Order\Item\Base\Iface Complete order with product, addresses and services saved to the storage
Creates and stores a new order for the subscribed product