当前位置: 首页>>代码示例>>PHP>>正文


PHP oseRegistry::Call方法代码示例

本文整理汇总了PHP中oseRegistry::Call方法的典型用法代码示例。如果您正苦于以下问题:PHP oseRegistry::Call方法的具体用法?PHP oseRegistry::Call怎么用?PHP oseRegistry::Call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oseRegistry的用法示例。


在下文中一共展示了oseRegistry::Call方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addToCart

	function addToCart($msc_id, $msc_option) {
		$cart = oseRegistry::Call('payment')->getInstance('Cart');
		$payment_mode = oseMscPublic::getPaymentMode();
		$item = array('entry_id' => $msc_id, 'entry_type' => 'msc', 'msc_option' => $msc_option);
		$cart->addItem($item['entry_id'], $item['entry_type'], $item);
		$cart->updateParams('payment_mode', $payment_mode);
		$cart->update();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:register.php

示例2: addToCart

	function addToCart() {
		$cart = oseRegistry::Call('payment')->getInstance('Cart');
		$msc_id = JRequest::getInt('msc_id', 0);
		$msc_option = JRequest::getCmd('msc_option', null);
		$item = array('entry_id' => $msc_id, 'entry_type' => 'msc', 'msc_option' => $msc_option);
		$cart->addItem($item['entry_id'], $item['entry_type'], $item);
		$items = $cart->get('items');
		$cart->setCartItems($items, 'payment_mode', 'm');
		$cart->update();
		$session = JFactory::getSession();
		$session->set('ose_reg_step', 'cart');
		$result = array();
		$result['success'] = true;
		$result['title'] = 'Done';
		$result['content'] = JText::_('Added to Cart') . '!';
		$result = oseJson::encode($result);
		oseExit($result);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:18,代码来源:memberships.php

示例3: jomsocialRegRedirect

	function jomsocialRegRedirect()
	{
		require_once(JPATH_SITE.DS.'components'.DS.'com_osemsc'.DS.'init.php');
		require_once(JPATH_SITE.DS.'components'.DS.'com_osemsc'.DS.'helpers'.DS.'oseMscPublic.php');
		$uri = &JFactory::getURI();
		$vars['task']	= $uri->getVar( 'task' );
		$vars['view']	= $uri->getVar( 'view' );
		if(empty($vars['task']))
		{
			$vars['task'] = JRequest::getCmd('task');
		}
		if(empty($vars['view']))
		{
			$vars['view'] = JRequest::getCmd('view');
		}
		$session =& JFactory::getSession();
		if(isset($_SESSION['__XIPT']['SELECTED_PROFILETYPE_ID']))
		{
			$session->set('pid',$_SESSION['__XIPT']['SELECTED_PROFILETYPE_ID']);
		}
		$vars['joms_regs'] = ($vars['view'] == 'register' && ( $vars['task'] == 'registerSucess' ));

		if($vars['joms_regs'])
		{
			//$pid = $_SESSION['__XIPT']['SELECTED_PROFILETYPE_ID'];
			$pid = $session->get('pid',null);
			$db= oseDB :: instance();
			$query = "SELECT * FROM `#__osemsc_ext` WHERE `type` = 'jspt'";
			$db->setQuery($query);
			$objs = $db->loadObjectList();
			if(!empty($objs))
			{
				foreach($objs as $obj)
				{
					$data = oseJson::decode($obj->params);
					if($data->enable && $pid == $data->jspt_id)
					{
						$msc_id = $obj->id;
						break;
					}
				}

			}
			$redirect = false;
			if(!empty($msc_id))
			{
				JRequest::setVar('msc_id',$msc_id);
				$msc = oseRegistry::call('msc');
				$opts = $msc->runAddonAction('panel.payment.getOptions',array(),true,true);
				$options = $opts['results'];
				if(!empty($options))
				{
					foreach($options as $option)
					{
						if(!$option['isFree'] && $option['a3']>0)
						{
							$msc_option = $option['id'];
							$redirect =true;
							break;
						}
					}
				}
			}
			if($redirect)
			{
				$cart = oseRegistry::Call('payment')->getInstance('Cart');
				$payment_mode = oseMscPublic::getPaymentMode();

				$item = array('entry_id'=>$msc_id,'entry_type'=>'msc','msc_option'=>$msc_option);
				$cart->addItem($item['entry_id'],$item['entry_type'],$item);
				//oseExit($cart);
				$cart->updateParams('payment_mode',$payment_mode);
				$cart->update();

				$session = JFactory::getSession();
				$session->set('ose_reg_step','cart');
				$app = JFactory::getApplication();
				$app->redirect( 'index.php?option=com_osemsc&view=register');
			}
		}

	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:82,代码来源:oserouter.php


注:本文中的oseRegistry::Call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。