protected function _storeCoupons( MShop_Order_Item_Base_Interface $basket )
	{
		$manager = $this->getSubManager( 'coupon' );

		$item = $manager->createItem();
		$item->setBaseId( $basket->getId() );

		foreach( $basket->getCoupons() as $code => $products )
		{
			$item->setCode( $code );

			if( empty( $products ) )
			{
				$item->setId( null );
				$manager->saveItem( $item );
				continue;
			}

			foreach( $products as $product )
			{
				$item->setId( null );
				$item->setProductId( $product->getId() );
				$manager->saveItem( $item );
			}
		}
	}
protected function _storeCoupons( MShop_Order_Item_Base_Interface $basket )
	{
		$manager = $this->getSubManager( 'coupon' );

		$item = $manager->createItem();
		$item->setBaseId( $basket->getId() );

		foreach( $basket->getCoupons() as $code => $products )
		{
			$item->setCode( $code );

			if( empty( $products ) )
			{
				$item->setId( null );
				$manager->saveItem( $item );
				continue;
			}

			foreach( $products as $product )
			{
				$item->setId( null );
				$item->setProductId( $product->getId() );
				$manager->saveItem( $item );
			}
		}
	}
protected function _storeCoupons ( MShop_Order_Item_Base_Interface $ basket ) { $ manager = $ this -> getSubManager ( 'coupon' ) ; $ item = $ manager -> createItem ( ) ; $ item -> setBaseId ( $ basket -> getId ( ) ) ; foreach ( $ basket -> getCoupons ( ) as $ code => $ products ) { $ item -> setCode ( $ code ) ; if ( empty ( $ products ) ) { $ item -> setId ( null ) ; $ manager -> saveItem ( $ item ) ; continue ; } foreach ( $ products as $ product ) { $ item -> setId ( null ) ; $ item -> setProductId ( $ product -> getId ( ) ) ; $ manager -> saveItem ( $ item ) ; } } }
Saves the coupons of the order to the storage.

@param MShop_Order_Item_Base_Interface $basket Basket containing coupon items
Saves the coupons of the order to the storage .