本文整理汇总了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);