*

mwindey

  • *****
  • 468 posts
Redirect to user items after republish
« on: September 28, 2021, 12:15:56 PM »
At this moment when a user is renewing a listing in user_items they get routed to user_dashboard
Code: [Select]
header('Location: ' . osc_user_dashboard_url(osc_logged_user_id())); What is the correct route to keep them on user_items and not route them to there dashboard...
Will this do the trick?
Code: [Select]
header('Location: ' . osc_user_items_url(osc_item_id()));
« Last Edit: September 28, 2021, 12:18:35 PM by mwindey »

*

MB Themes

Re: Redirect to user items after republish
« Reply #1 on: September 28, 2021, 03:23:07 PM »
@mwindey
Yes your solution looks right.
Where is it located? I can update it in plugin as well.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 468 posts
Re: Redirect to user items after republish
« Reply #2 on: September 28, 2021, 07:56:27 PM »
@MB Themes

You can find it in backoffice_manager / file republish.php starting from line 115 there is:
Code: [Select]
//Send user to homepage or payment page with flash message
if($pay_per_post == 1 && $item_id <> '') {
  osc_add_flash_ok_message( __('There is fee for republishing listing. After payment is successful, your listing will be activated. Please continue to payment process.', 'backoffice_manager'));
  header('Location: ' . osc_route_url('payment-publish', array('itemId' => $item_id)));
} else {
  if($redirect == '') {
    if(osc_is_web_user_logged_in()) {
      header('Location: ' . osc_user_dashboard_url(osc_logged_user_id()));
    } else {
      header('Location: ' . osc_base_url());
    }
  }
}
« Last Edit: September 28, 2021, 08:33:27 PM by mwindey »

*

MB Themes

Re: Redirect to user items after republish
« Reply #3 on: September 29, 2021, 08:01:48 AM »
@mwindey
This is correct function, yours is wrong.
Code: [Select]
osc_user_list_items_url()
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 468 posts
Re: Redirect to user items after republish
« Reply #4 on: September 29, 2021, 12:27:12 PM »
@MB Themes

Mine was only a guess  ;) Yours is correct and works perfectly.... Thanks

Code: [Select]
    if(osc_is_web_user_logged_in()) {
      header('Location: ' . osc_user_list_items_url());