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


PHP vmAccess::getVendorId方法代码示例

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


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

示例1: getCoupons

 /**
  * Retireve a list of coupons from the database.
  *
  * @return object List of coupon objects
  */
 function getCoupons()
 {
     $virtuemart_vendor_id = vmAccess::getVendorId();
     $whereString = '';
     if (!empty($virtuemart_vendor_id)) {
         $whereString = 'WHERE virtuemart_vendor_id="' . $virtuemart_vendor_id . '"';
     }
     return $this->_data = $this->exeSortSearchListQuery(0, '*', ' FROM `#__virtuemart_coupons`', $whereString, '', $this->_getOrdering());
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:14,代码来源:coupon.php

示例2: getRatings

 /**
  * Select the products to list on the product list page
  */
 public function getRatings()
 {
     $tables = ' FROM `#__virtuemart_ratings` AS `r` JOIN `#__virtuemart_products_' . VmConfig::$vmlang . '` AS `pr`
  			USING (`virtuemart_product_id`) ';
     $whereString = '';
     if (VmConfig::get('multix', 'none') != 'none') {
         $tables .= ' LEFT JOIN  `#__virtuemart_products` as p USING (`virtuemart_product_id`)';
         $virtuemart_vendor_id = vmAccess::getVendorId();
         if (!empty($virtuemart_vendor_id)) {
             $whereString = ' WHERE virtuemart_vendor_id="' . $virtuemart_vendor_id . '"';
         }
     }
     $this->_data = $this->exeSortSearchListQuery(0, ' r.*,pr.`product_name` ', $tables, $whereString, '', $this->_getOrdering());
     return $this->_data;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:18,代码来源:ratings.php

示例3: display


//.........这里部分代码省略.........
                 $title = 'PRODUCT';
                 $msg = "";
             }
             $this->SetViewTitle($title, $msg);
             $this->addStandardDefaultViewLists($model, 'created_on');
             if ($cI = vRequest::getInt('tsmart_category_id', false)) {
                 $app = JFactory::getApplication();
                 //$old_state = $app->getUserState('tsmart_category_id');
                 $old_state = $app->getUserState('tsmart_category_id');
                 if (empty($old_state) or $old_state != $cI) {
                     vRequest::setVar('com_tsmart.product.filter_order', 'pc.ordering');
                     $model->filter_order = 'pc.ordering';
                     $old_state = $app->setUserState('tsmart_category_id', $cI);
                 }
             }
             //Get the list of products
             $productlist = $model->getItemList();
             //The pagination must now always set AFTER the model load the listing
             $this->pagination = $model->getPagination();
             //Get the category tree
             $categoryId = $model->tsmart_category_id;
             //OSP switched to filter in model, was vRequest::getInt('tsmart_category_id');
             $category_tree = ShopFunctions::categoryListTree(array($categoryId));
             $this->assignRef('category_tree', $category_tree);
             //load service class
             //Load the product price
             if (!class_exists('calculationHelper')) {
                 require VMPATH_ADMIN . DS . 'helpers' . DS . 'calculationh.php';
             }
             $vendor_model = tmsModel::getModel('vendor');
             $productreviews = tmsModel::getModel('ratings');
             $this->mfTable = $model->getTable('manufacturers');
             $this->catTable = $model->getTable('categories');
             $this->lists['vendors'] = '';
             if ($this->showVendors()) {
                 $this->lists['vendors'] = Shopfunctions::renderVendorList(vmAccess::getVendorId());
             }
             foreach ($productlist as $tsmart_product_id => $product) {
                 $product->mediaitems = count($product->tsmart_media_id);
                 $product->reviews = $productreviews->countReviewsForProduct($product->tsmart_product_id);
                 $vendor_model->setId($product->tsmart_vendor_id);
                 $vendor = $vendor_model->getVendor();
                 $currencyDisplay = CurrencyDisplay::getInstance($vendor->vendor_currency, $vendor->tsmart_vendor_id);
                 if (!empty($product->allPrices[$product->selectedPrice]['product_price']) && !empty($product->allPrices[$product->selectedPrice]['product_currency'])) {
                     $product->product_price_display = $currencyDisplay->priceDisplay($product->allPrices[$product->selectedPrice]['product_price'], (int) $product->allPrices[$product->selectedPrice]['product_currency'], 1, true);
                 } else {
                     if (!empty($product->allPrices) and count($product->allPrices) > 1) {
                         $product->product_price_display = tsmText::_('com_tsmart_MULTIPLE_PRICES');
                     } else {
                         $product->product_price_display = tsmText::_('com_tsmart_NO_PRICE_SET');
                     }
                 }
                 // Write the first 5 categories in the list
                 $product->categoriesList = '';
                 if (!empty($product->categories[0])) {
                     $product->categoriesList = shopfunctions::renderGuiList($product->categories, 'categories', 'category_name', 'category');
                 }
                 // Write the first 5 manufacturers in the list
                 $product->manuList = '';
                 if (!empty($product->tsmart_manufacturer_id[0])) {
                     $product->manuList = shopfunctions::renderGuiList($product->tsmart_manufacturer_id, 'manufacturers', 'mf_name', 'manufacturer');
                 }
             }
             $mf_model = tmsModel::getModel('manufacturer');
             $manufacturers = $mf_model->getManufacturerDropdown();
             $this->assignRef('manufacturers', $manufacturers);
             /* add Search filter in lists*/
             /* Search type */
             $options = array('' => tsmText::_('com_tsmart_LIST_EMPTY_OPTION'), 'parent' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_PARENT_PRODUCT'), 'product' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRODUCT'), 'price' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_PRICE'), 'withoutprice' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_TYPE_WITHOUTPRICE'));
             $this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options);
             /* Search order */
             $options = array('bf' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_BEFORE'), 'af' => tsmText::_('com_tsmart_PRODUCT_LIST_SEARCH_BY_DATE_AFTER'));
             $this->lists['search_order'] = VmHTML::selectList('search_order', vRequest::getVar('search_order'), $options);
             // Toolbar
             /*if (vmAccess::manager('product.edit')) {
                   JToolBarHelper::custom('massxref_cats', 'new', 'new', vmText::_('com_tsmart_PRODUCT_XREF_CAT'), true);
                   JToolBarHelper::custom('massxref_sgrps', 'new', 'new', vmText::_('com_tsmart_PRODUCT_XREF_SGRPS'), true);
               }
               if (vmAccess::manager('product.create')) {
                   JToolBarHelper::custom('createchild', 'new', 'new', vmText::_('com_tsmart_PRODUCT_CHILD'), true);
                   JToolBarHelper::custom('cloneproduct', 'copy', 'copy', vmText::_('com_tsmart_PRODUCT_CLONE'), true);
               }*/
             // JToolBarHelper::custom('addrating', 'default', '', vmText::_('com_tsmart_ADD_RATING'), true);
             $view = vRequest::getCmd('view', vRequest::getCmd('controller', 'tsmart'));
             JToolBarHelper::divider();
             if (vmAccess::manager($view . '.edit.state')) {
                 JToolBarHelper::publishList();
                 JToolBarHelper::unpublishList();
             }
             if (vmAccess::manager($view . '.delete')) {
                 JToolBarHelper::spacer('10');
                 JToolBarHelper::deleteList();
             }
             $this->assignRef('productlist', $productlist);
             $this->assignRef('tsmart_category_id', $categoryId);
             $this->assignRef('model', $model);
             break;
     }
     parent::display($tpl);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:view.html.php

示例4:

:
			<input type="text" name="filter_ratings" value="<?php 
echo vRequest::getVar('filter_ratings', '');
?>
" />
			<button class="btn btn-small" onclick="this.form.submit();"><?php 
echo vmText::_('COM_VIRTUEMART_GO');
?>
</button>
			<button class="btn btn-small" onclick="document.adminForm.filter_ratings.value='';"><?php 
echo vmText::_('COM_VIRTUEMART_RESET');
?>
</button>
			<?php 
if (VmConfig::get('multix', 'none') != 'none') {
    echo Shopfunctions::renderVendorList(vmAccess::getVendorId());
}
?>
		 </td>
	  </tr>
	</table>
	</div>
	<div id="resultscounter" ><?php 
echo $this->pagination->getResultsCounter();
?>
</div>
</div>

<div style="text-align: left;">
	<table class="adminlist table table-striped" cellspacing="0" cellpadding="0">
	<thead>
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:31,代码来源:default.php

示例5: sortSearchListQuery

 /**
  * New function for sorting, searching, filtering and pagination for product ids.
  *
  * @author Max Milbers
  */
 function sortSearchListQuery($onlyPublished = TRUE, $virtuemart_category_id = FALSE, $group = FALSE, $nbrReturnProducts = FALSE, $langFields = array())
 {
     $app = JFactory::getApplication();
     $db = JFactory::getDbo();
     //User Q.Stanley said that removing group by is increasing the speed of product listing in a bigger shop (10k products) by factor 60
     //So what was the reason for that we have it? TODO experiemental, find conditions for the need of group by
     $groupBy = ' group by p.`virtuemart_product_id` ';
     //administrative variables to organize the joining of tables
     $joinLang = false;
     $joinCategory = FALSE;
     $joinCatLang = false;
     $joinMf = FALSE;
     $joinMfLang = false;
     $joinPrice = FALSE;
     $joinCustom = FALSE;
     $joinShopper = FALSE;
     $joinChildren = FALSE;
     //$joinLang = false;
     $orderBy = ' ';
     $where = array();
     //$isSite = $app->isSite ();
     $isSite = true;
     if ($app->isAdmin() or vRequest::get('manage', false) and vmAccess::getVendorId()) {
         $isSite = false;
     }
     if (!empty($this->keyword) and $this->keyword !== '' and $group === FALSE) {
         $keyword = vRequest::filter(html_entity_decode($this->keyword, ENT_QUOTES, "UTF-8"), FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_LOW);
         $keyword = '"%' . str_replace(array(' ', '-'), '%', $keyword) . '%"';
         //$keyword = '"%' . $db->escape ($this->keyword, TRUE) . '%"';
         vmdebug('Current search field', $this->valid_search_fields);
         foreach ($this->valid_search_fields as $searchField) {
             if ($searchField == 'category_name' || $searchField == 'category_description') {
                 $joinCatLang = true;
             } else {
                 if ($searchField == 'mf_name') {
                     $joinMfLang = true;
                 } else {
                     if ($searchField == 'product_price') {
                         $joinPrice = TRUE;
                     } else {
                         if ($searchField == 'product_name' or $searchField == 'product_s_desc' or $searchField == 'product_desc' or $searchField == 'slug') {
                             $langFields[] = $searchField;
                             //if (strpos ($searchField, '`') !== FALSE){
                             //$searchField = '`l`.'.$searchField;
                             $keywords_plural = preg_replace('/\\s+/', '%" AND ' . $searchField . ' LIKE "%', $keyword);
                             if ($app->isSite() and VmConfig::$defaultLang != VmConfig::$vmlang and !VmConfig::get('prodOnlyWLang', false)) {
                                 $filter_search[] = '`ld`.' . $searchField . ' LIKE ' . $keywords_plural;
                                 if (VmConfig::$defaultLang != VmConfig::$jDefLang) {
                                     $filter_search[] = '`ljd`.' . $searchField . ' LIKE ' . $keywords_plural;
                                 }
                             }
                             $searchField = '`l`.' . $searchField;
                             //}
                         }
                     }
                 }
             }
             if (strpos($searchField, '`') !== FALSE) {
                 $keywords_plural = preg_replace('/\\s+/', '%" AND ' . $searchField . ' LIKE "%', $keyword);
                 $filter_search[] = $searchField . ' LIKE ' . $keywords_plural;
             } else {
                 $keywords_plural = preg_replace('/\\s+/', '%" AND `' . $searchField . '` LIKE "%', $keyword);
                 $filter_search[] = '`' . $searchField . '` LIKE ' . $keywords_plural;
                 //$filter_search[] = '`' . $searchField . '` LIKE ' . $keyword;
             }
         }
         if (!empty($filter_search)) {
             $where[] = '(' . implode(' OR ', $filter_search) . ')';
         } else {
             $where[] = '`l`.product_name LIKE ' . $keyword;
             $langFields[] = 'product_name';
             //If they have no check boxes selected it will default to product name at least.
         }
     }
     // 		vmdebug('my $this->searchcustoms ',$this->searchcustoms);
     if (!empty($this->searchcustoms)) {
         $joinCustom = TRUE;
         foreach ($this->searchcustoms as $key => $searchcustom) {
             $custom_search[] = '(pf.`virtuemart_custom_id`="' . (int) $key . '" and pf.`customfield_value` like "%' . $db->escape($searchcustom, TRUE) . '%")';
         }
         $where[] = " ( " . implode(' OR ', $custom_search) . " ) ";
     }
     if ($isSite and !VmConfig::get('use_as_catalog', 0)) {
         if (VmConfig::get('stockhandle', 'none') == 'disableit_children') {
             $where[] = ' ( (p.`product_in_stock` - p.`product_ordered`) >"0" OR (children.`product_in_stock` - children.`product_ordered`) > "0") ';
             $joinChildren = TRUE;
         } else {
             if (VmConfig::get('stockhandle', 'none') == 'disableit') {
                 $where[] = ' p.`product_in_stock` - p.`product_ordered` >"0" ';
             }
         }
     }
     if ($virtuemart_category_id > 0) {
         $joinCategory = TRUE;
         $where[] = ' `pc`.`virtuemart_category_id` = ' . $virtuemart_category_id;
//.........这里部分代码省略.........
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:101,代码来源:product.php

示例6: display

 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel('calc');
     //@todo should be depended by loggedVendor
     $this->vendorId = vmAccess::getVendorId();
     $this->SetViewTitle();
     $layoutName = vRequest::getCmd('layout', 'default');
     if ($layoutName == 'edit') {
         $calc = $model->getCalc();
         $this->assignRef('calc', $calc);
         $isNew = $calc->virtuemart_calc_id < 1;
         if ($isNew) {
             $calc->virtuemart_vendor_id = $this->vendorId;
             $db = JFactory::getDBO();
             //get default currency of the vendor, if not set get default of the shop
             $q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "' . $this->vendorId . '"';
             $db->setQuery($q);
             $currency = $db->loadResult();
             if (empty($currency)) {
                 $q = 'SELECT `vendor_currency` FROM `#__virtuemart_vendors` WHERE `virtuemart_vendor_id` = "1" ';
                 $db->setQuery($q);
                 $currency = $db->loadResult();
                 $calc->calc_currency = $currency;
             } else {
                 $calc->calc_currency = $currency;
             }
         }
         $this->entryPointsList = self::renderEntryPointsList($calc->calc_kind);
         $this->mathOpList = self::renderMathOpList($calc->calc_value_mathop);
         if (empty($calc->calc_categories)) {
             $calc->calc_categories = array();
         } else {
             if (!is_array($calc->calc_categories)) {
                 $calc->calc_categories = array($calc->calc_categories);
             }
         }
         $calc_categories = $calc->calc_categories;
         $this->categoryTree = ShopFunctions::categoryListTree($calc_categories);
         $currencyModel = VmModel::getModel('currency');
         $this->currencies = $currencyModel->getCurrencies();
         $this->shopperGroupList = ShopFunctions::renderShopperGroupList($calc->virtuemart_shoppergroup_ids, True);
         if (!class_exists('ShopFunctionsF')) {
             require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
         }
         $this->countriesList = ShopFunctionsF::renderCountryList($calc->calc_countries, True);
         $this->statesList = ShopFunctionsF::renderStateList($calc->virtuemart_state_ids, '', True);
         $this->manufacturerList = ShopFunctions::renderManufacturerList($calc->virtuemart_manufacturers, true);
         if ($this->showVendors()) {
             $this->vendorList = ShopFunctions::renderVendorList($calc->virtuemart_vendor_id);
         }
         $this->addStandardEditViewCommands();
     } else {
         if ($this->showVendors()) {
             JToolBarHelper::custom('toggle.shared.1', 'publish', 'yes', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_ON'), true);
             JToolBarHelper::custom('toggle.shared.0', 'unpublish', 'no', vmText::_('COM_VIRTUEMART_SHARED_TOGGLE_OFF'), true);
         }
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $search = vRequest::getCmd('search', false);
         $this->calcs = $model->getCalcs(false, false, $search);
         VmConfig::loadJLang('com_virtuemart_shoppers', true);
         foreach ($this->calcs as &$data) {
             $data->calcCategoriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'categories', 'category_name', 'category', 'calc_categories', 'virtuemart_calc_id');
             $data->calcShoppersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'shoppergroups', 'shopper_group_name', 'shoppergroup', 'calc_shoppergroups', 'virtuemart_calc_id');
             $data->calcCountriesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'countries', 'country_name', 'country', 'calc_countries', 'virtuemart_calc_id');
             $data->calcStatesList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'states', 'state_name', 'states', 'calc_states', 'virtuemart_calc_id');
             $data->calcManufacturersList = shopfunctions::renderGuiList($data->virtuemart_calc_id, 'manufacturers', 'mf_name', 'manufacturer', 'calc_manufacturers', 'virtuemart_calc_id');
         }
         $this->pagination = $model->getPagination();
     }
     parent::display($tpl);
 }
开发者ID:sam-akopyan,项目名称:hamradio,代码行数:75,代码来源:view.html.php

示例7: populateState

 /**
  * This functions updates the variables of the model which are used in the sortSearchListQuery
  *  with the variables from the Request
  *
  * @author Max Milbers
  */
 protected function populateState()
 {
     $app = JFactory::getApplication();
     $option = 'com_virtuemart';
     $view = 'product';
     $valid_search_fields = VmConfig::get('browse_search_fields');
     if ($app->isSite() and !vRequest::getInt('manage', false)) {
         $filter_order = vRequest::getString('orderby', "0");
         if ($filter_order == "0") {
             $filter_order_raw = $this->getLastProductOrdering($this->_selectedOrdering);
             $filter_order = $this->checkFilterOrder($filter_order_raw);
         } else {
             $filter_order = $this->checkFilterOrder($filter_order);
             $this->setLastProductOrdering($filter_order);
         }
         $filter_order_Dir = strtoupper(vRequest::getCmd('dir', VmConfig::get('prd_brws_orderby_dir', 'ASC')));
         $this->product_parent_id = vRequest::getInt('product_parent_id', FALSE);
         $this->virtuemart_manufacturer_id = vRequest::getInt('virtuemart_manufacturer_id', FALSE);
         $this->keyword = vRequest::getString('keyword', '');
         //vRequest::uword ('keyword', "", ' ,-,+,.,_,#,/');
         if ($this->keyword === '') {
             $this->keyword = vRequest::getString('filter_product', '');
             //vRequest::uword ('filter_product', "", ' ,-,+,.,_,#,/');
             vRequest::setVar('filter_product', $this->keyword);
         } else {
             vRequest::setVar('keyword', $this->keyword);
         }
     } else {
         $filter_order = strtolower($app->getUserStateFromRequest('com_virtuemart.' . $view . '.filter_order', 'filter_order', $this->_selectedOrdering, 'cmd'));
         $filter_order = $this->checkFilterOrder($filter_order);
         $filter_order_Dir = strtoupper($app->getUserStateFromRequest($option . '.' . $view . '.filter_order_Dir', 'filter_order_Dir', '', 'word'));
         $valid_search_fields = array_unique(array_merge($this->valid_BE_search_fields, $valid_search_fields));
         $view = vRequest::getCmd('view');
         $stateTypes = array('virtuemart_category_id' => 'int', 'virtuemart_manufacturer_id' => 'int', 'product_parent_id' => 'int', 'filter_product' => 'string', 'search_type' => 'string', 'search_order' => 'string', 'search_date' => 'string', 'virtuemart_vendor_id' => 'int');
         foreach ($stateTypes as $type => $filter) {
             $k = 'com_virtuemart.' . $view . '.' . $type;
             if ($filter == 'int') {
                 $new_state = vRequest::getInt($type, false);
             } else {
                 $new_state = vRequest::getVar($type, false);
             }
             if ($new_state === false) {
                 $this->{$type} = $app->getUserState($k, '');
             } else {
                 $app->setUserState($k, $new_state);
                 $this->{$type} = $new_state;
             }
         }
         $this->keyword = $this->filter_product;
     }
     $filter_order_Dir = $this->checkFilterDir($filter_order_Dir);
     $this->filter_order = $filter_order;
     $this->filter_order_Dir = $filter_order_Dir;
     $this->valid_search_fields = $valid_search_fields;
     $this->search_type = vRequest::getVar('search_type', '');
     $this->searchcustoms = vRequest::getVar('customfields', false, true);
     $this->searchplugin = vRequest::getInt('custom_parent_id', 0);
     //$this->virtuemart_vendor_id = vmAccess::isSuperVendor();
     $this->virtuemart_vendor_id = vmAccess::getVendorId();
     $this->__state_set = true;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:67,代码来源:product.php

示例8: display

 function display($tpl = null)
 {
     if (!class_exists('VirtueMartModelConfig')) {
         require VMPATH_ADMIN . 'models/config.php';
     }
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = VmModel::getModel();
     $layoutName = $this->getLayout();
     $task = vRequest::getCmd('task', $layoutName);
     $this->assignRef('task', $task);
     $this->user = $user = JFactory::getUser();
     if ($layoutName == 'edit') {
         $category = $model->getCategory('', false);
         // Toolbar
         $text = '';
         if (isset($category->category_name)) {
             $name = $category->category_name;
         } else {
             $name = '';
         }
         if (!empty($category->virtuemart_category_id)) {
             $text = '<a href="' . juri::root() . 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id . '" target="_blank" >' . $name . '<span class="vm2-modallink"></span></a>';
         }
         $this->SetViewTitle('CATEGORY', $text);
         $model->addImages($category);
         if ($category->virtuemart_category_id > 1) {
             $relationInfo = $model->getRelationInfo($category->virtuemart_category_id);
             $this->assignRef('relationInfo', $relationInfo);
         } else {
             $category->virtuemart_vendor_id = vmAccess::getVendorId();
         }
         $parent = $model->getParentCategory($category->virtuemart_category_id);
         $this->assignRef('parent', $parent);
         if (!class_exists('ShopFunctions')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'shopfunctions.php';
         }
         $templateList = ShopFunctions::renderTemplateList(vmText::_('COM_VIRTUEMART_CATEGORY_TEMPLATE_DEFAULT'));
         $this->assignRef('jTemplateList', $templateList);
         $categoryLayoutList = VirtueMartModelConfig::getLayoutList('category');
         $this->assignRef('categoryLayouts', $categoryLayoutList);
         $productLayouts = VirtueMartModelConfig::getLayoutList('productdetails');
         $this->assignRef('productLayouts', $productLayouts);
         //Nice fix by Joe, the 4. param prevents setting an category itself as child
         $categorylist = ShopFunctions::categoryListTree(array($parent->virtuemart_category_id), 0, 0, (array) $category->virtuemart_category_id);
         if ($this->showVendors()) {
             $vendorList = ShopFunctions::renderVendorList($category->virtuemart_vendor_id);
             $this->assignRef('vendorList', $vendorList);
         }
         $this->assignRef('category', $category);
         $this->assignRef('categorylist', $categorylist);
         $this->addStandardEditViewCommands($category->virtuemart_category_id, $category);
     } else {
         $this->SetViewTitle('CATEGORY_S');
         $keyWord = '';
         $this->assignRef('catmodel', $model);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model, 'category_name');
         $topCategory = vRequest::getInt('top_category_id', 0);
         $category_tree = ShopFunctions::categoryListTree(array($topCategory));
         $this->assignRef('category_tree', $category_tree);
         $categories = $model->getCategoryTree($topCategory, 0, false, $this->lists['search']);
         $this->assignRef('categories', $categories);
         $pagination = $model->getPagination();
         $this->assignRef('catpagination', $pagination);
         //we need a function of the FE shopfunctions helper to cut the category descriptions
         if (!class_exists('shopFunctionsF')) {
             require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
         }
     }
     parent::display($tpl);
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:73,代码来源:view.html.php

示例9:

$listOptions[] = JHtml::_('select.option', 'permanent', vmText::_('COM_VIRTUEMART_COUPON_TYPE_PERMANENT'));
$listOptions[] = JHtml::_('select.option', 'gift', vmText::_('COM_VIRTUEMART_COUPON_TYPE_GIFT'));
echo VmHTML::row('select', 'COM_VIRTUEMART_COUPON_TYPE', 'coupon_type', $listOptions, $this->coupon->coupon_type, '', 'value', 'text', false);
?>
 			<?php 
echo VmHTML::row('input', 'COM_VIRTUEMART_COUPON_VALUE_VALID_AT', 'coupon_value_valid', $this->coupon->coupon_value_valid, 'class="inputbox"', '', 10, 255, ' ' . $this->vendor_currency);
?>
			<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_COUPON_START', vmJsApi::jDate($this->coupon->coupon_start_date, 'coupon_start_date'));
?>
			<?php 
echo VmHTML::row('raw', 'COM_VIRTUEMART_COUPON_EXPIRY', vmJsApi::jDate($this->coupon->coupon_expiry_date, 'coupon_expiry_date'));
?>
			<?php 
if ($this->showVendors()) {
    echo VmHTML::row('raw', 'COM_VIRTUEMART_VENDOR', Shopfunctions::renderVendorList(vmAccess::getVendorId()));
}
?>
	    </table>
	</fieldset>
    <input type="hidden" name="virtuemart_coupon_id" value="<?php 
echo $this->coupon->virtuemart_coupon_id;
?>
" />

 	<?php 
echo $this->addStandardHiddenToForm();
?>
</form>

开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:29,代码来源:edit.php

示例10: updateRequests

 /**
  * This functions updates the variables of the model which are used in the sortSearchListQuery
  *  with the variables from the Request
  *
  * @author Max Milbers
  */
 function updateRequests()
 {
     $this->keyword = vRequest::getString('keyword', '');
     //vRequest::uword ('keyword', "", ' ,-,+,.,_,#,/');
     if ($this->keyword === '') {
         $this->keyword = vRequest::getString('filter_product', '');
         //vRequest::uword ('filter_product', "", ' ,-,+,.,_,#,/');
         vRequest::setVar('filter_product', $this->keyword);
     } else {
         vRequest::setVar('keyword', $this->keyword);
     }
     $app = JFactory::getApplication();
     $option = 'com_virtuemart';
     $view = 'product';
     $valid_search_fields = VmConfig::get('browse_search_fields');
     if ($app->isSite()) {
         $filter_order = vRequest::getString('orderby', "0");
         if ($filter_order == "0") {
             $filter_order_raw = $this->getLastProductOrdering($this->_selectedOrdering);
             $filter_order = $this->checkFilterOrder($filter_order_raw);
         } else {
             $filter_order = $this->checkFilterOrder($filter_order);
             $this->setLastProductOrdering($filter_order);
         }
         $filter_order_Dir = strtoupper(vRequest::getCmd('dir', VmConfig::get('prd_brws_orderby_dir', 'ASC')));
     } else {
         $filter_order = strtolower($app->getUserStateFromRequest('com_virtuemart.' . $view . '.filter_order', 'filter_order', $this->_selectedOrdering, 'cmd'));
         $filter_order = $this->checkFilterOrder($filter_order);
         $filter_order_Dir = strtoupper($app->getUserStateFromRequest($option . '.' . $view . '.filter_order_Dir', 'filter_order_Dir', '', 'word'));
         $valid_search_fields = array_unique(array_merge($this->valid_BE_search_fields, $valid_search_fields));
     }
     $filter_order_Dir = $this->checkFilterDir($filter_order_Dir);
     $this->filter_order = $filter_order;
     $this->filter_order_Dir = $filter_order_Dir;
     $this->valid_search_fields = $valid_search_fields;
     $this->product_parent_id = vRequest::getInt('product_parent_id', FALSE);
     $this->virtuemart_manufacturer_id = vRequest::getInt('virtuemart_manufacturer_id', FALSE);
     $this->search_type = vRequest::getVar('search_type', '');
     $this->searchcustoms = vRequest::getVar('customfields', false, true);
     $this->searchplugin = vRequest::getInt('custom_parent_id', 0);
     //$this->virtuemart_vendor_id = vmAccess::isSuperVendor();
     $this->virtuemart_vendor_id = vmAccess::getVendorId();
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:49,代码来源:product.php


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