*

OCS

  • **
  • 18 posts
[New feature] Disable Viewing Email and Tel for Non logged Users
« on: February 01, 2018, 12:17:21 PM »
Hi,

I would like to request a custom feature which includes disabling the telephone number and email address for visitors that are not logged-in.
I want users only to be able to contact someone when they have an account.

How much to have this created and when can it be done?

Thanks

*

MB Themes

Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #1 on: February 01, 2018, 12:28:47 PM »
@OSC
you can simply wrap those field into:
Code: [Select]
<?php if(osc_is_web_user_logged_in()) { ?>
.... your field ...
<?php ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

OCS

  • **
  • 18 posts
Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #2 on: February 01, 2018, 12:47:29 PM »
Awesome, I think I got it right because the fields are not shown anymore and when I'm logged in they are.
Thank you so much for the fast reply.

Just another thing. Because the fields are not shown anymore I think it would be good to have some message there like:
"To contact this seller you must first login"

Anyway to have this done?

*

MB Themes

Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #3 on: February 01, 2018, 12:52:55 PM »
Code: [Select]
<?php if(osc_is_web_user_logged_in()) { ?>
.... your field ...
<?php } else { ?>
In order to contact seller you must log-in first.
<?php ?>

  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

OCS

  • **
  • 18 posts
Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #4 on: February 01, 2018, 01:43:26 PM »
Code: [Select]
<?php if(osc_is_web_user_logged_in()) { ?>
.... your field ...
<?php } else { ?>
In order to contact seller you must log-in first.
<?php ?>


Works like a charm!
Thanks again!

Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #5 on: August 10, 2018, 10:44:23 AM »
Where do i paste this code

*

MB Themes

Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #6 on: August 10, 2018, 10:47:35 AM »
@Metalsunny
Item.php
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: [New feature] Disable Viewing Email and Tel for Non logged Users
« Reply #7 on: August 10, 2018, 11:18:28 AM »
Pls tell me what line do i paste it. i pasted it any where and the phone number is still showing.