public function store( MShop_Order_Item_Base_Interface $basket )
	{
		$context = $this->_getContext();

		$orderManager = MShop_Factory::createManager( $context, 'order' );
		$orderBaseManager = MShop_Factory::createManager( $context, 'order/base' );


		$orderBaseManager->begin();
		$orderBaseManager->store( $basket );
		$orderBaseManager->commit();

		$orderItem = $orderManager->createItem();
		$orderItem->setBaseId( $basket->getId() );
		$orderItem->setType( MShop_Order_Item_Abstract::TYPE_WEB );
		$orderManager->saveItem( $orderItem );


		return $orderItem;
	}
public function store( MShop_Order_Item_Base_Interface $basket )
	{
		$context = $this->_getContext();

		$orderManager = MShop_Factory::createManager( $context, 'order' );
		$orderBaseManager = MShop_Factory::createManager( $context, 'order/base' );


		$orderBaseManager->begin();
		$orderBaseManager->store( $basket );
		$orderBaseManager->commit();

		$orderItem = $orderManager->createItem();
		$orderItem->setBaseId( $basket->getId() );
		$orderItem->setType( MShop_Order_Item_Abstract::TYPE_WEB );
		$orderManager->saveItem( $orderItem );


		return $orderItem;
	}
public function store ( MShop_Order_Item_Base_Interface $ basket ) { $ context = $ this -> _getContext ( ) ; $ orderManager = MShop_Factory :: createManager ( $ context , 'order' ) ; $ orderBaseManager = MShop_Factory :: createManager ( $ context , 'order/base' ) ; $ orderBaseManager -> begin ( ) ; $ orderBaseManager -> store ( $ basket ) ; $ orderBaseManager -> commit ( ) ; $ orderItem = $ orderManager -> createItem ( ) ; $ orderItem -> setBaseId ( $ basket -> getId ( ) ) ; $ orderItem -> setType ( MShop_Order_Item_Abstract :: TYPE_WEB ) ; $ orderManager -> saveItem ( $ orderItem ) ; return $ orderItem ; }
Creates a new order from the given basket.

Saves the given basket to the storage including the addresses, coupons,
products, services, etc. and creates/stores a new order item for that
order.

@param MShop_Order_Item_Base_Interface $basket Basket object to be stored
@return MShop_Order_Item_Interface Order item that belongs to the stored basket
Creates a new order from the given basket .