Support » Plugin: Affiliates Manager » Dashboard integration into tabs

  • Resolved nicolasluoang


    I want to have the [Affiliateshome] displaying in one of the tabs of my user profile/my-account/, so i need to add &tab=my-affiliate at the end of the different affiliate menu links in order to have the page displaying with the right tab open (otherwise it loads the user profile default page).

    I’ve already spent some times translating the frontend of the plugin into Chinese, hope I can get this work…

    The current (default) affiliate user dashboard links point to
    /?sub=overview&page_id=897 is redirected to /my-account/?sub=overview
    /?sub=sales&page_id=897 is redirected to /my-account/?sub=sales
    /?sub=payments&page_id=897 is redirected to /my-account/?sub=payments
    /?sub=creatives&page_id=897 is redirected to /my-account/?sub=creatives
    And I need to have them instead redirected to

    I’ve already tried without success this:
    1. Change the Affiliate HomePage in settings to /my-account/?tab=my-affiliate
    2. Set 301 redirection from /?sub=overview&page_id=897 or /my-account/?sub=overview to /my-account/?sub=overview&tab=my-affiliate
    3. Looked into the AffiliatesHome.php found that:

    $response->viewData['navigation'] = array(
    						array( __( 'Overview', 'affiliates-manager' ), $this->getLink(array('sub' => 'overview'))),
    						array( __( 'Sales', 'affiliates-manager' ), $this->getLink(array('sub' => 'sales'))),
    						array( __( 'Payment History', 'affiliates-manager' ), $this->getLink(array('sub' => 'payments'))),
    						array( __( 'Creatives', 'affiliates-manager' ), $this->getLink(array('sub' => 'creatives'))),

    I’m not a developer so I thought I just need to add my tab name here like this
    $this->getLink(array('sub' => 'overview&tab=my-affiliate')) but the URL is not recognized, “&” and “=” are transformed into %something.

    Do you have an idea of a snippet I could use to resolve this?

    • This topic was modified 2 years, 11 months ago by nicolasluoang.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter nicolasluoang


    Got the answer!
    Changed in the AffiliatesHome.php to $this->getLink(array('sub' => 'overview','tab' => 'my-affiliate'))
    How could I transform that into a snippet so that I don’t have to edit the file at each update?
    Best regards

    Plugin Support mbrsolution


    Hi, thank you for sharing your solution. It looks very interesting.

    I have submitted a message to the developers to investigate further your question and solution.

    Kind regards

    Plugin Author affmngr


    @nicolasluoang, There is no way to add a new tab without editing the file at the moment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dashboard integration into tabs’ is closed to new replies.