//The Category ID it should appear on
$category_id = 37;
//Get Category ID of the current page
$jinput = JFactory::getApplication()->input;
$cat_id= $jinput->getInt('virtuemart_category_id', 0);
//Get Parent Category ID of the current page
if($cat_id){
$cattest = VmModel::getModel('category');
$cat=$cattest->getCategory($cat_id);
$parentid = $cat->category_parent_id;
}
else {$parentid=0;}
//Return true if the Category ID matches the Current Page's Category ID or that of its Parent Category
return($category_id == $cat_id or $category_id == $parentid);
// The Category ID it should appear on
$category_id = 37;
// Get Category ID of the current page
$current_category_id = $input->getInt('virtuemart_category_id', 0);
// Return false if no VM category ID is found
if ( ! $current_category_id)
{
return false;
}
// Return true if the Category ID matches the Current Page's Category ID
if ($category_id == $current_category_id)
{
return true;
}
// Get Parent Category ID of the current page
$vm_category = VmModel::getModel('category')->getCategory($current_category_id);
$parent_category_id = $vm_category->category_parent_id;
// Return true if the Category ID matches the Current Page's Parent Category ID
return $category_id == $parent_category_id;
$jinput = JFactory::getApplication()->input;
$current_category_id = $jinput->getInt('virtuemart_category_id', 0);
$current_category_id = $app->input->getInt('virtuemart_category_id', 0);
$app / $mainframe
$doc / $document
$db / $database
$user
$Itemid