Below is the code which I used for Veronika theme in item.php file to get the contact details show for registered users only. But it seems like same solution doesn't work on Gamma theme. If someone please help!
<?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 } ?>
replaced 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 } ?>