*

slicer

  • ****
  • 204 posts
send message
« on: October 09, 2018, 11:08:22 PM »
Hi there, there is something I'm tryging to achieve but I haven't get the right solution.

To add a button lets say in item.php, if I use:
Code: [Select]
<?php if(function_exists('im_contact_button')) { im_contact_button(); } ?>
And also I pretty much understand what @frosticek said

Quote
<?php if(osc_is_web_user_logged_in()) { ?>
.... button code, form code, whatever ...
<?php } ?>

But I don't want to hide that button from not registered users, instead I want them to see it it and encourage them to register before using "send a message."

something like posting an ad that requires registration, you can actually see the button, once you click it, redirects you to register/login form.


How can that be done?
« Last Edit: October 23, 2018, 02:44:15 PM by slicer »

*

MB Themes

Re: send message
« Reply #1 on: October 10, 2018, 08:51:23 AM »
<?php if(osc_is_web_user_logged_in()) { ?>
  ... message button ...
<?php } else  { ?>
  ... register button
<?php } ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: send message
« Reply #2 on: October 20, 2018, 02:58:17 PM »
<?php if(osc_is_web_user_logged_in()) { ?>
  ... message button ...
<?php } else  { ?>
  ... register button
<?php } ?>

Still facing the same problem, once I use that code the button is hidden for everyone unless  logged. :'( :'( :'(

We want this to be shown for everyone, so we let visitors to know they can send messages, but need a valid account first.

The problem we found is people are using the feature to contact seller, but 60% typed wrong mail, and the answer never gets the user, this really bad because makes the site useless, so so we need to enforce users to register to make sure their email account is valid.


« Last Edit: October 23, 2018, 02:43:46 PM by slicer »

*

slicer

  • ****
  • 204 posts
Re: send message
« Reply #3 on: October 27, 2018, 03:08:50 PM »
Are we getting a real solution for this? using function currently expose you to that situation, there should be an option or at least require login before sending a message from that button.

*

MB Themes

Re: send message
« Reply #4 on: October 28, 2018, 08:53:23 PM »
@slicer
I've already posted solution to hide button for non-logged users.

<?php if(osc_is_web_user_logged_in()) { ?>
  ... message button ...
<?php } else  { ?>
  ... register button
<?php } ?>
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

slicer

  • ****
  • 204 posts
Re: send message
« Reply #5 on: October 29, 2018, 01:05:27 PM »
@slicer
I've already posted solution to hide button for non-logged users.

<?php if(osc_is_web_user_logged_in()) { ?>
  ... message button ...
<?php } else  { ?>
  ... register button
<?php } ?>


@frost is not hidding, we don't want to hide it at all, we want to require login, only that, but make it visible for everyone.

*

MB Themes

Re: send message
« Reply #6 on: October 29, 2018, 01:25:21 PM »
@slicer
Than you must modify link and put there condition if logged, then message, else go to login page.
or do it in same way as I described and put there different links
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Tiger

  • ***
  • 55 posts
Re: send message
« Reply #7 on: October 29, 2018, 03:36:24 PM »
@ slicer
You mean like download button in osclasspoint product. You need create button style like contact button that don’t link to any or to login page

*

slicer

  • ****
  • 204 posts
Re: send message
« Reply #8 on: October 31, 2018, 07:45:08 PM »
@ slicer
You mean like download button in osclasspoint product. You need create button style like contact button that don’t link to any or to login page

Hello @tiger can you give me an example ?