I am working on Joomla 1.5. I have to override Joomla default template of my component (Virtuemart). It's working fine. But problem is i have to override my template if user is logged in only. I have to check look like this :
$user = JFactory::getUser();
if($user->guest==1){
// Not override my template
}else{
// Override this template
}
I know my condition works, but where should I write this condition. And if the condition is wrong then how can i do this?