Okay
  Public Ticket #3524503
I have three questions ?
Closed

Comments

  • peter started the conversation

    hello,
    I have three questions ?
    1. If the sub-agent purchases by himself, the superior agent cannot share the commission?
    2. After a sub-agent develops customers, how can the customer become a subordinate agent of the sub-agent?
    3. Can an agent set up a system so that he can only get commissions from his own sub-agents? The sub-agents of the sub-agents do not need to distribute commissions to grandparent agents, but are only allowed to distribute commissions to parent-level agents?
    Or the commission is distributed to the parent agent and the grandfather agent, but cannot be distributed to the upper level of the grandfather, that is, only second-level distribution is allowed. How to set it up?
    have a nice day!
    peter

  •  2,218
    WebWizards replied

    Hello Peter,

    Thank you for getting in touch,


    (1) It is possible for the superior agent to get a share of the commission, even if the subagent places the order for themselves.

    You would just need a commission rule based on subagent earnings:

    6770271700.png


    (2) You can allow multiple subagent levels, depending on this setting:

    9094303431.png

    A subagent can then create their own subagents.


    If the subagent first creates a user as a customer, they cannot convert that account to an agent - the admin would need to assist.


    (3) This can be set with the following code snippet (globally, for all agents):

    add_filter('salesking_max_parent_agents_commission', function($agents){
        return 2;
    }, 10, 1);
    

    This snippet sets it to 2 parent agents getting commission. You can set it to "return 3;" , "return 5;" etc to control how many parent agents will get commission.


    Kind regards,

    Stefan

  • peter replied

    1. Still the first question, 

    ----------------------------------------------------------------------

    (1) It is possible for the superior agent to get a share of the commission, even if the subagent places the order for themselves.

    ----------------------------------------------------------------------------

    we have set the commission rules for sub-agents. For example, A is the parent agent, B is the sub-agent, and C is B’s customer. Now the problem is that when C places an order, both B and A can get the commission. When B places an order, A cannot share the commission.

    2. add_filter( 'salesking_max_parent_agents_commission' , function ($agents) {
          return 2;
    }, 10, 1); Where is this global setting? How to set it?

  •  2,218
    WebWizards replied

    The following:

    add_filter( 'salesking_max_parent_agents_commission' , function ($agents) {
          return 2;
    }, 10, 1);
    

    is a PHP code snippet.

    A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/



    we have set the commission rules for sub-agents. For example, A is the parent agent, B is the sub-agent, and C is B’s customer. Now the problem is that when C places an order, both B and A can get the commission. When B places an order, A cannot share the commission.

    If you would like to have commissions for agent's own orders, this setting needs to be enabled:

    4724603976.png


    I understand that you are already using the SalesKing plugin on your site? If so, kindly please provide us with your license key for the plugin, as we need to add that to our database:

    To get your key:

    - If you purchased on KingsPlugins.com - Where is my KingsPlugins license key? 

    - If you purchased on CodeCanyon (Envato/ThemeForest): Where is my Envato purchase code?


    We can check the issue directly if you are able to share a backend login to the site or staging site,


    Kind regards,

    Stefan