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


PHP ShopFunctionsF::isFEmanager方法代码示例

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


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

示例1: display

 public function display($tpl = null)
 {
     $vendorId = vRequest::getInt('vendorid', 1);
     $vendorModel = VmModel::getModel('vendor');
     $vendorIdUser = vmAccess::isSuperVendor();
     $vendorModel->setId($vendorId);
     $this->vendor = $vendorModel->getVendor();
     if (!class_exists('shopFunctionsF')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     if (VmConfig::get('enable_content_plugin', 0)) {
         shopFunctionsF::triggerContentPlugin($this->vendor, 'vendor', 'vendor_store_desc');
         shopFunctionsF::triggerContentPlugin($this->vendor, 'vendor', 'vendor_terms_of_service');
     }
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $menu = $menus->getActive();
     if (!empty($menu->id)) {
         ShopFunctionsF::setLastVisitedItemId($menu->id);
     } else {
         if ($itemId = vRequest::getInt('Itemid', false)) {
             ShopFunctionsF::setLastVisitedItemId($itemId);
         }
     }
     $document = JFactory::getDocument();
     if (!VmConfig::get('shop_is_offline', 0)) {
         if (ShopFunctionsF::isFEmanager('product.edit')) {
             $add_product_link = JURI::root() . 'index.php?option=com_virtuemart&tmpl=component&view=product&task=edit&virtuemart_product_id=0&manage=1';
             $add_product_link = $this->linkIcon($add_product_link, 'COM_VIRTUEMART_PRODUCT_FORM_NEW_PRODUCT', 'edit', false, false);
         } else {
             $add_product_link = "";
         }
         $this->assignRef('add_product_link', $add_product_link);
         $categoryModel = VmModel::getModel('category');
         $productModel = VmModel::getModel('product');
         $ratingModel = VmModel::getModel('ratings');
         $productModel->withRating = $this->showRating = $ratingModel->showRating();
         $this->products = array();
         $categoryId = vRequest::getInt('catid', 0);
         $categoryChildren = $categoryModel->getChildCategoryList($vendorId, $categoryId);
         $categoryModel->addImages($categoryChildren, 1);
         $this->assignRef('categories', $categoryChildren);
         if (!class_exists('CurrencyDisplay')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'currencydisplay.php';
         }
         $this->currency = CurrencyDisplay::getInstance();
         $products_per_row = VmConfig::get('homepage_products_per_row', 3);
         $featured_products_rows = VmConfig::get('featured_products_rows', 1);
         $featured_products_count = $products_per_row * $featured_products_rows;
         if (!empty($featured_products_count) and VmConfig::get('show_featured', 1)) {
             $this->products['featured'] = $productModel->getProductListing('featured', $featured_products_count);
             $productModel->addImages($this->products['featured'], 1);
         }
         $latest_products_rows = VmConfig::get('latest_products_rows');
         $latest_products_count = $products_per_row * $latest_products_rows;
         if (!empty($latest_products_count) and VmConfig::get('show_latest', 1)) {
             $this->products['latest'] = $productModel->getProductListing('latest', $latest_products_count);
             $productModel->addImages($this->products['latest'], 1);
         }
         $topTen_products_rows = VmConfig::get('topTen_products_rows');
         $topTen_products_count = $products_per_row * $topTen_products_rows;
         if (!empty($topTen_products_count) and VmConfig::get('show_topTen', 1)) {
             $this->products['topten'] = $productModel->getProductListing('topten', $topTen_products_count);
             $productModel->addImages($this->products['topten'], 1);
         }
         $recent_products_rows = VmConfig::get('recent_products_rows');
         $recent_products_count = $products_per_row * $recent_products_rows;
         if (!empty($recent_products_count) and VmConfig::get('show_recent', 1)) {
             $recent_products = $productModel->getProductListing('recent');
             if (!empty($recent_products)) {
                 $this->products['recent'] = $productModel->getProductListing('recent', $recent_products_count);
                 $productModel->addImages($this->products['recent'], 1);
             }
         }
         if ($this->products) {
             $display_stock = VmConfig::get('display_stock', 1);
             $showCustoms = VmConfig::get('show_pcustoms', 1);
             if ($display_stock or $showCustoms) {
                 if (!$showCustoms) {
                     foreach ($this->products as $pType => $productSeries) {
                         foreach ($productSeries as $i => $productItem) {
                             $this->products[$pType][$i]->stock = $productModel->getStockIndicator($productItem);
                         }
                     }
                 } else {
                     if (!class_exists('vmCustomPlugin')) {
                         require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
                     }
                     foreach ($this->products as $pType => $productSeries) {
                         shopFunctionsF::sortLoadProductCustomsStockInd($this->products[$pType], $productModel);
                     }
                 }
             }
         }
         $this->showBasePrice = (vmAccess::manager() or vmAccess::isSuperVendor());
         $layout = VmConfig::get('vmlayout', 'default');
         $this->setLayout($layout);
         $productsLayout = VmConfig::get('productsublayout', 'products');
         if (empty($productsLayout)) {
             $productsLayout = 'products';
//.........这里部分代码省略.........
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:101,代码来源:view.html.php

示例2: display


//.........这里部分代码省略.........
         if ($task == 'addST') {
             $this->address_type = 'ST';
         }
         if (!$new and empty($virtuemart_userinfo_id)) {
             $virtuemart_userinfo_id = $this->_model->getBTuserinfo_id();
             vmdebug('Try to get $virtuemart_userinfo_id by type BT', $virtuemart_userinfo_id);
         }
         $userFields = $this->_model->getUserInfoInUserFields($layoutName, $this->address_type, $virtuemart_userinfo_id, false);
         if (!$new && empty($userFields[$virtuemart_userinfo_id])) {
             $virtuemart_userinfo_id = $this->_model->getBTuserinfo_id();
             vmdebug('$userFields by getBTuserinfo_id', $userFields);
         }
         $userFields = $userFields[$virtuemart_userinfo_id];
     }
     $this->virtuemart_userinfo_id = $virtuemart_userinfo_id;
     $this->assignRef('userFields', $userFields);
     if ($layoutName == 'edit') {
         if ($this->_model->getId() == 0 && $this->_cuid == 0) {
             $button_lbl = tsmText::_('COM_VIRTUEMART_REGISTER');
         } else {
             $button_lbl = tsmText::_('COM_VIRTUEMART_SAVE');
         }
         $this->assignRef('button_lbl', $button_lbl);
         $this->lUser();
         $this->shopper($userFields);
         $this->payment();
         $this->lOrderlist();
         $this->lVendor();
     }
     $stTask = 'addST';
     if ($task == 'editaddresscart') {
         $stTask = 'editaddresscart';
     }
     $this->_lists['shipTo'] = ShopFunctionsF::generateStAddressList($this, $this->_model, $stTask);
     $this->assignRef('lists', $this->_lists);
     $this->assignRef('editor', $editor);
     if ($layoutName == 'mailregisteruser') {
         $vendorModel = tmsModel::getModel('vendor');
         //			$vendorModel->setId($this->_userDetails->virtuemart_vendor_id);
         $vendor = $vendorModel->getVendor();
         $this->assignRef('vendor', $vendor);
     }
     if ($layoutName == 'editaddress') {
         $layoutName = 'edit_address';
         $this->setLayout($layoutName);
     }
     if (!$this->userDetails->JUser->get('id')) {
         $corefield_title = tsmText::_('COM_VIRTUEMART_USER_CART_INFO_CREATE_ACCOUNT');
     } else {
         $corefield_title = tsmText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS');
     }
     if ($this->cart->_fromCart or $this->cart->getInCheckOut()) {
         $pathway->addItem(tsmText::_('COM_VIRTUEMART_CART_OVERVIEW'), JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE));
     } else {
         //$pathway->addItem(vmText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS'), JRoute::_('index.php?option=com_virtuemart&view=user&&layout=edit'));
     }
     $pathway_text = tsmText::_('COM_VIRTUEMART_YOUR_ACCOUNT_DETAILS');
     if (!$this->userDetails->JUser->get('id')) {
         if ($this->cart->_fromCart or $this->cart->getInCheckOut()) {
             if ($this->address_type == 'BT') {
                 $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
             } else {
                 $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
             }
         } else {
             if ($this->address_type == 'BT') {
                 $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_EDIT_BILLTO_LBL');
                 $title = tsmText::_('COM_VIRTUEMART_REGISTER');
             } else {
                 $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
             }
         }
     } else {
         if ($this->address_type == 'BT') {
             $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_BILLTO_LBL');
         } else {
             $vmfield_title = tsmText::_('COM_VIRTUEMART_USER_FORM_ADD_SHIPTO_LBL');
         }
     }
     vmJsApi::vmValidator($this->userDetails->JUser->guest);
     $this->add_product_link = "";
     $this->manage_link = "";
     if (ShopFunctionsF::isFEmanager()) {
         $mlnk = JURI::root() . 'index.php?option=com_virtuemart&tmpl=component&manage=1';
         $this->manage_link = $this->linkIcon($mlnk, 'JACTION_MANAGE', 'new', false, false, true, true);
     }
     if (ShopFunctionsF::isFEmanager('product.edit')) {
         $aplnk = JURI::root() . 'index.php?option=com_virtuemart&tmpl=component&view=product&view=product&task=edit&virtuemart_product_id=0&manage=1';
         $this->add_product_link = $this->linkIcon($aplnk, 'COM_VIRTUEMART_PRODUCT_ADD_PRODUCT', 'new', false, false, true, true);
     }
     $document = JFactory::getDocument();
     $document->setTitle($pathway_text);
     $pathway->additem($pathway_text);
     $document->setMetaData('robots', 'NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET');
     $this->assignRef('page_title', $pathway_text);
     $this->assignRef('corefield_title', $corefield_title);
     $this->assignRef('vmfield_title', $vmfield_title);
     shopFunctionsF::setVmTemplate($this, 0, 0, $layoutName);
     parent::display($tpl);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:view.html.php


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