| Current Path : /home/digilove/public_html/components/com_marketplace/views/mpregistration/ |
| Current File : /home/digilove/public_html/components/com_marketplace/views/mpregistration/view.html.php |
<?php
/**
* Marketplace - Component Marketplace
* ******************************************************************
*
* PHP version 7.0
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
* ******************************************************************
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.component.view');
/**
* MarketplaceViewMpregistration class
*
* @category Component
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link Technical Support: webkul.uvdesk.com
*/
class MarketplaceViewMpregistration extends JViewLegacy
{
/**
* Display function
*
* @param [type] $tpl var
*
* @return void
*/
function display($tpl = null)
{
$param = JComponentHelper::getParams('com_users');
$user = JFactory::getUser();
if (!$param->get('allowUserRegistration') && $user->guest) {
JFactory::getApplication()->redirect(JUri::root(), JText::_('WK_ENABLE_ALLOW_USER'), 'error');
}
$groupArray=array();
$groupArray=JFactory::getUser()->groups;
$app = JFactory::getApplication();
$_input = $app->input;
if (in_array(8, $groupArray)) {
JFactory::getApplication()->redirect(
$_input->server->get(
'HTTP_REFERER',
JUri::current(),
'RAW'
), JText::_('WK_ADMIN_SELLER'), 'error'
);
}
global $option;
$this->form=$this->get('form');
$model=$this->getModel('mpregistration');
$country_details=$model->getCountryList();
$this->assignRef('country_details', $country_details);
$userid = $user->id;
$user_details=$model->checkSeller($userid);
if (isset($user_details) && $user_details) {
$app = JFactory::getApplication();
$profilemenu=plgSystemMarketplace::getMenuId('index.php?option=com_marketplace&view=profile');
$conroller=JControllerLegacy::getInstance('MarketplaceControllerMpregistration');
$conroller->setRedirect(JRoute::_('index.php?option=com_marketplace&view=profile&id='.$user_details."&Itemid=".$profilemenu, false));
} elseif (isset($user_details) && $user_details==0 && JFactory::getApplication()->input->get('layout')!="regmp") {
$app=JFactory::getApplication();
$app->redirect(JRoute::_('index.php?option=com_marketplace&view=mpregistration&layout=regmp&customer_id='.$userid, false));
} else {
$joomla_user_details=$model->getJoomlaUser($userid);
$this->assignRef('joomla_user_details', $joomla_user_details);
parent::display($tpl);
}
}
}