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


PHP shopFunctionsF::setLastVisitedItemId方法代码示例

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


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

示例1: display


//.........这里部分代码省略.........
         }
         //No redirect here, for category id = 0 means show ALL categories! note by Max Milbers
         if (!empty($categoryId) and $categoryId !== -1 and (empty($category->slug) or !$category->published)) {
             if (empty($category->slug)) {
                 vmInfo(JText::_('COM_VIRTUEMART_CAT_NOT_FOUND'));
             } else {
                 if ($category->virtuemart_id !== 0 and !$category->published) {
                     vmInfo('COM_VIRTUEMART_CAT_NOT_PUBL', $category->category_name, $categoryId);
                 }
             }
             //Fallback
             $categoryLink = '';
             //This id is here not loaded. Fallback to last used category is adequate
             /*if ($category->category_parent_id) {
             			$categoryLink = '&view=category&virtuemart_category_id=' .$category->category_parent_id;
             		} else {*/
             $last_category_id = shopFunctionsF::getLastVisitedCategoryId();
             if (!$last_category_id or $categoryId == $last_category_id) {
                 $last_category_id = JRequest::getInt('virtuemart_category_id', false);
             }
             if ($last_category_id and $categoryId != $last_category_id) {
                 $categoryLink = '&view=category&virtuemart_category_id=' . $last_category_id;
             }
             //}
             if (VmConfig::get('handle_404', 1)) {
                 $app->redirect(JRoute::_('index.php?option=com_virtuemart' . $categoryLink . '&error=404', FALSE));
             } else {
                 JError::raise(E_ERROR, '404', 'Not found');
             }
             return;
         }
         shopFunctionsF::setLastVisitedCategoryId($categoryId);
         shopFunctionsF::setLastVisitedManuId($virtuemart_manufacturer_id);
         shopFunctionsF::setLastVisitedItemId(vRequest::getInt('Itemid', false));
         // Add the category name to the pathway
         if ($category->parents) {
             foreach ($category->parents as $c) {
                 $pathway->addItem(strip_tags($c->category_name), JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $c->virtuemart_category_id, FALSE));
             }
         }
         $categoryModel->addImages($category, 1);
         if ($category_layout == 'categories' or $categoryId > 0 and $virtuemart_manufacturer_id < 1) {
             $category->children = $categoryModel->getChildCategoryList($vendorId, $categoryId, $categoryModel->getDefaultOrdering(), $categoryModel->_selectedOrderingDir);
             $categoryModel->addImages($category->children, 1);
         } else {
             $category->children = false;
         }
         if (VmConfig::get('enable_content_plugin', 0)) {
             shopFunctionsF::triggerContentPlugin($category, 'category', 'category_description');
         }
         if ($category->metadesc) {
             $document->setDescription($category->metadesc);
         }
         if ($category->metakey) {
             $document->setMetaData('keywords', $category->metakey);
         }
         if ($category->metarobot) {
             $document->setMetaData('robots', $category->metarobot);
         }
         if ($app->getCfg('MetaAuthor') == '1') {
             $document->setMetaData('author', $category->metaauthor);
         }
         if (empty($category->category_template)) {
             $category->category_template = VmConfig::get('categorytemplate');
         }
         shopFunctionsF::setVmTemplate($this, $category->category_template, 0, $category_layout);
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:67,代码来源:view.html.php


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