當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。