本文整理汇总了PHP中comquick2cartHelper::editstore方法的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper::editstore方法的具体用法?PHP comquick2cartHelper::editstore怎么用?PHP comquick2cartHelper::editstore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comquick2cartHelper
的用法示例。
在下文中一共展示了comquick2cartHelper::editstore方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
public function display($tpl = null)
{
$this->params = JComponentHelper::getParams('com_quick2cart');
$comquick2cartHelper = new comquick2cartHelper();
$storeHelper = new storeHelper();
$model = $this->getModel('vendor');
$mainframe = JFactory::getApplication();
$input = $mainframe->input;
$option = $input->get('option');
$task = $input->get('task');
$layout = $input->get('layout', 'cp');
$this->adminCall = $adminCall = $input->get('adminCall', 0, 'INTEGER');
$store_id = $input->get('store_id', '0');
$this->storeinfo = '';
if ($layout != "contactus") {
$specialAccess = 0;
if ($layout == "createstore") {
$user = JFactory::getUser();
if (!$user->id) {
echo "<div class=\"techjoomla-bootstrap\" >\n\t\t\t\t\t<div class=\"well\" >\n\t\t\t\t\t\t<div class=\"alert alert-error\">\n\t\t\t\t\t\t\t<span >" . JText::_('QTC_LOGIN') . " </span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>";
return false;
}
if (!empty($adminCall)) {
$specialAccess = $comquick2cartHelper->isSpecialAccess();
}
}
// Check for multivender COMPONENT PARAM
$isMultivenderOFFmsg = $comquick2cartHelper->isMultivenderOFF();
if (!empty($isMultivenderOFFmsg)) {
if (!empty($adminCall)) {
// CALLED FROM ADMIN
if ($specialAccess == 0) {
echo $this->specialAccessMsg();
return false;
}
} else {
print $isMultivenderOFFmsg;
return false;
}
}
}
/*if($layout=="default")
{
$this->site=1;
$filter_order_Dir = $mainframe->getUserStateFromRequest( "$option.filter_order_Dir", 'filter_order_Dir', 'desc', 'word' );
$filter_type = $mainframe->getUserStateFromRequest( "$option.filter_type", 'filter_type', 0, 'string' );
$filter_state = $mainframe->getUserStateFromRequest( $option.'search_list', 'search_list', '', 'string' );
$search = $mainframe->getUserStateFromRequest( $option.'search', 'search','', 'string' );
$search = JString::strtolower( $search );
$limit = '';
$limitstart = '';
$cid[0]='';
if($search==null)
$search='';
$model = $this->getModel( 'vendor' );
$task = $input->get('task');
$total = $model->getTotal();
$this->pagination = $pagination = $model->getPagination();
$this->storeinfo = $storeinfo = $comquick2cartHelper->getStoreDetail();
$lists['search_select'] = $search;
$lists['search'] = $search;
$lists['search_list'] = $filter_state;
$lists['order'] = $filter_type;
$lists['order_Dir'] = $filter_order_Dir;
$lists['limit'] = $limit;
$lists['limitstart'] = $limitstart;
$this->lists = $lists;
}// end of $layout=="mystores" if
else */
if ($layout == "createstore") {
$this->orders_site = 1;
$store_id = $input->get('store_id', '0');
// DEFAULT ALLOW TO CREAT STORE
$this->allowToCreateStore = 1;
// Means edit task
if (!empty($store_id)) {
$this->store_authorize = $comquick2cartHelper->store_authorize("vendor_createstore", $store_id);
$this->editview = 1;
$this->storeinfo = $storeinfo = $comquick2cartHelper->editstore($store_id);
// Get weight and length select box
$this->legthList = $storeHelper->getLengthClassSelectList($storeid = 0, $this->storeinfo[0]->length_id);
$this->weigthList = $storeHelper->getWeightClassSelectList($storeid = 0, $this->storeinfo[0]->weight_id);
} else {
// NEW STORE TASK:: CK FOR WHETHER WE HV TO ALLOW OR NOT
$storeHelper = new storeHelper();
$this->allowToCreateStore = $storeHelper->isAllowedToCreateNewStore();
// Get weight and length select box
$this->legthList = $storeHelper->getLengthClassSelectList($storeid = 0, 0);
//.........这里部分代码省略.........
示例2: display
/**
* Display the view
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return void
*/
function display($tpl = null)
{
$this->params = JComponentHelper::getParams('com_quick2cart');
$comquick2cartHelper = new comquick2cartHelper();
$storeHelper = new storeHelper();
$this->addToolbar();
$mainframe = JFactory::getApplication();
$input = $mainframe->input;
$option = $input->get('option');
$layout = $input->get('layout', 'createstore');
if ($layout == "createstore") {
$this->orders_site = 1;
$store_id = $input->get('store_id', '0');
// DEFAULT ALLOW TO CREAT STORE
$this->allowToCreateStore = 1;
// Means edit task
if (!empty($store_id)) {
// $this->store_authorize=$comquick2cartHelper->store_authorize("vendor_createstore",$store_id);
$this->editview = 1;
$this->storeinfo = $storeinfo = $comquick2cartHelper->editstore($store_id);
// Get weight and length select box
$this->legthList = $storeHelper->getLengthClassSelectList(0, $this->storeinfo[0]->length_id);
$this->weigthList = $storeHelper->getWeightClassSelectList(0, $this->storeinfo[0]->weight_id);
} else {
// NEW STORE TASK:: CK FOR WHETHER WE HV TO ALLOW OR NOT
$storeHelper = new storeHelper();
//$this->allowToCreateStore=$storeHelper->isAllowedToCreateNewStore();
// Get weight and length select box
$this->legthList = $storeHelper->getLengthClassSelectList();
$this->weigthList = $storeHelper->getWeightClassSelectList();
}
//START Q2C Sample development
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('system');
//Call the plugin and get the result
$result = $dispatcher->trigger('qtcOnBeforeCreateStore', array($store_id));
$beforecart = '';
$OnBeforeCreateStore = '';
if (!empty($result)) {
$OnBeforeCreateStore = $result[0];
}
$this->OnBeforeCreateStore = $OnBeforeCreateStore;
}
/*else
{
//for list view
$filter_order_Dir = $mainframe->getUserStateFromRequest( "$option.filter_order_Dir", 'filter_order_Dir', 'desc', 'word' );
$filter_type = $mainframe->getUserStateFromRequest( "$option.filter_type", 'filter_type', 0, 'string' );
$filter_state = $mainframe->getUserStateFromRequest( $option.'search_list', 'search_list', '', 'string' );
$search = $mainframe->getUserStateFromRequest( $option.'search', 'search','', 'string' );
$search = JString::strtolower( $search );
$limit = '';
$limitstart = '';
$cid[0]='';
if($search==null)
$search='';
$model = $this->getModel( 'vendor' );
$task = $input->get('task');
$comquick2cartHelper = new comquick2cartHelper;
//$this->storeinfo=$storeinfo=$comquick2cartHelper->getStoreDetail();
$total = $model->getTotal();
$this->pagination=$pagination = $model->getPagination();
$this->storeinfo=$storeinfo= $model->getVendors();
// search filter
$lists['search_select'] = $search;
$lists['search'] = $search;
$lists['search_list'] = $filter_state;
$lists['order'] = $filter_type;
$lists['order_Dir'] = $filter_order_Dir;
$lists['limit'] = $limit;
$lists['limitstart'] = $limitstart;
$this->lists=$lists;
}*/
// end of else
// FOR DISPLAY SIDE FILTER
if (JVERSION >= '3.0') {
$this->sidebar = JHtmlSidebar::render();
}
parent::display($tpl);
}