*

developGr

  • ***
  • 39 posts
How to REDIRECT users to the membership plugin page
« on: December 04, 2017, 09:05:54 AM »
I want to have in my website only the membership option available for the users but i want when they click the "index.php?page=item&action=item_add" (item post page) to REDIRECT the user to the "index.php?page=custom&route=osp-membership" page of the plugin

only when the user choose membership group and pay (ex. paypal, bank transfer...) to be able to publish listings!!

This is the reason that i bought the plugin!

*

MB Themes

Re: How to REDIRECT users to the membership plugin page
« Reply #1 on: December 04, 2017, 10:23:01 AM »
@developGr
In item-post.php, somewhere at start add:

Code: [Select]
<?php
  $user_group 
ModelOSP::newInstance()->getUserGroup(osc_logged_user_id());

  if(
$user_group <= 0) {
    
osc_add_flash_error_message(__('Only members of bellow listed groups can add new listing.''osclass_pay'));
    
header('Location:' osc_route_url('osp-membership'));
    exit;
  }
?>

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

*

developGr

  • ***
  • 39 posts
Re: How to REDIRECT users to the membership plugin page
« Reply #2 on: December 05, 2017, 02:04:37 AM »
thanks! ;)