The following code I placed in my main template for my theme. It works as expected on virtuemart pages such as checkout, my profile... but on my home page the shopFunctionsF call breaks the page.
Can I not call shopFunctionsF anywhere? Is it possible to instantiate this class everywhere?
Is there a better alternative to what I'm doing?
<?php echo $this['modules']->render('toolbar-r');
$user = JFactory::getUser();
$status = $user->guest;
if (!$status == 1){
echo shopFunctionsF::getLoginForm ($this->cart, FALSE);
}
else
{
if ($this['modules']->count('toolbar-login')) :
echo $this['modules']->render('toolbar-login');
endif;
}
?></div>
<?php endif; ?>
</div>
<?php endif; ?>
Could you install it as a module instead of putting it on your template page?