In item.php find:
<?php if($mobile <> __('No phone number', 'veronika')) { ?>
$('.phone-show, .phone-block').click(function(e){
e.preventDefault();
var mobile = "<?php echo $mobile; ?>";
if($('.phone-block').attr('href') == '#') {
$('.phone-block, .phone-show').attr('href', 'tel:' + mobile).addClass('shown');
$('.phone-block span').text(mobile).css('font-weight', 'bold');
$('#side-right .btn.contact-button .bot').text(mobile);
$('.phone-show').text("<?php _e('Click to call', 'veronika'); ?>");
return false;
}
});
<?php } else { ?>
$('.phone-show, .phone-block').click(function(){
return false;
});
<?php } ?>
replace with:
<?php if(osc_is_web_user_logged_in()) { ?>
<?php if($mobile <> __('No phone number', 'veronika')) { ?>
$('.phone-show, .phone-block').click(function(e){
e.preventDefault();
var mobile = "<?php echo $mobile; ?>";
if($('.phone-block').attr('href') == '#') {
$('.phone-block, .phone-show').attr('href', 'tel:' + mobile).addClass('shown');
$('.phone-block span').text(mobile).css('font-weight', 'bold');
$('#side-right .btn.contact-button .bot').text(mobile);
$('.phone-show').text("<?php _e('Click to call', 'veronika'); ?>");
return false;
}
});
<?php } else { ?>
$('.phone-show, .phone-block').click(function(){
return false;
});
<?php } ?>
<?php } else { ?>
$('.phone-show').attr('href', '<?php echo osc_user_login_url(); ?>');
$('.phone-show').text("<?php _e('Only for logged (click to login)', 'veronika'); ?>");
<?php } ?>