This topic contains a post which is marked as Best Answer. Press here if you would like to see it.
*

Norm

  • **
  • 9 posts
Where is the 'My Account' sidebar menu located?
« on: February 06, 2024, 06:25:48 PM »
Re: Sigma theme...

I need to add/delete items in the sidebar displayed on the My Account page, where it lists things like Public Profile, Listings, Alerts, etc.

The question is...  where would I find this sidebar menu?

Thanks


*

MB Themes

Re: Where is the 'My Account' sidebar menu located?
« Reply #1 on: February 07, 2024, 08:54:39 AM »
It goes from Osclass core and may be added via hooks. Search for osc_user_menu function in core.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Norm

  • **
  • 9 posts
Re: Where is the 'My Account' sidebar menu located?
« Reply #2 on: February 07, 2024, 06:59:13 PM »
I may be wrong, but I don't think I am looking for the osc_user_menu function itself.  I want to change the contents of the user_menu list of items and links.

Perhaps I misunderstood?

Thanks,
Norm

*

MB Themes

Re: Where is the 'My Account' sidebar menu located?
« Reply #3 on: February 08, 2024, 03:06:34 PM »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Marked as best answer by frosticek on February 09, 2024, 03:27:51 PM
*

Norm

  • **
  • 9 posts
Re: Where is the 'My Account' sidebar menu located?
« Reply #4 on: February 08, 2024, 10:57:49 PM »
Quote
where would I find this sidebar menu?

Quote
may be added via hooks.

I guess my vision must be very poor, but I still cannot find where the actual user-menu is located, but I did discover a work around:

In 'oc_includes/osclass/helpers/hUtils.php' ...  around line 188, where it says:

function osc_private_user_menu($options = null)
{
  if($options == null) {

Change to:

  if($options != null) {

Then, I was able to change or update the lines below, to better suit my needs:

 $options = array();
    $options[] = array('name' => __('Public Profile'), 'url' => osc_user_public_profile_url(osc_logged_user_id()), 'class' => 'opt_publicprofile');
    $options[] = array('name' => __('Dashboard'), 'url' => osc_user_dashboard_url(), 'class' => 'opt_dashboard');
    $options[] = array('name' => __('Manage your listings'), 'url' => osc_user_list_items_url(), 'class' => 'opt_items');
    $options[] = array('name' => __('Manage your alerts'), 'url' => osc_user_alerts_url(), 'class' => 'opt_alerts');
    $options[] = array('name' => __('My profile'), 'url' => osc_user_profile_url(), 'class' => 'opt_account');
    $options[] = array('name' => __('Logout'), 'url' => osc_user_logout_url(), 'class' => 'opt_logout');

Problem solved!

Thanks
« Last Edit: February 09, 2024, 12:45:44 AM by Norm »