I just tried on my end, replacing:
if(hikashop_loadUser() == null){
$filters = array('a.session_id='.$database->Quote($user->session).' AND a.cart_type ='.$database->quote($cart_type));
}else{
$filters = array('(a.user_id='.(int)$user->id.' OR a.session_id='.$database->Quote($user->session).') AND a.cart_type ='.$database->quote($cart_type));
}
By:
in the view.html.php file and:
if(hikashop_loadUser() == null){
echo JText::_('PLEASE_LOGIN_FIRST');
By:
if(false && hikashop_loadUser() == null){
echo JText::_('PLEASE_LOGIN_FIRST');
In the view "cart / showcarts".
And this is working like a charm. So if that doesn't work for you, I think that's because you are editing the view in the wrong template.