Okay
  Public Ticket #3491631
Possible Options
Closed

Comments

  • Chris started the conversation

    Hello.

    I want to thank you for your plugin which is very good and have a lot of good stuff and possibilities what I need but when I go deeper I see that there is things that is needed to improve and I want to know if that possible and how to implement them.

    I am interested in the following options in the plugin and also I'm familiar with code and you can share some valuable information if needed.

    1.  Is it possible to show in agent panel actual commission that he gets from his orders and sub-agent orders. That is very important in cases this commision % changes often

    2. Can an agent get a commission (%) from the total price of the order, not just from the sub-agent's earnings commission?

    3. How to create new menu - for example "Documents" and create actual page with content into agent panel?

    4. In case if the product is on sale. How to make that agent's coupon not adding up sale price but works only from the full price?

    5. Explain please in Group rules "Monthly orders value (reset)" means. For example if the agent are on 10% commission and if he gets to 1000 eur in the middle of the month the commission changes to 20%. This "reset" means that each month's first date he starts with 15%?

    Thank you in advance, Chris

  •  1,906
    WebWizards replied

    Hello Chris,

    Thank you for purchasing our plugin,

    1.  Is it possible to show in agent panel actual commission that he gets from his orders and sub-agent orders. That is very important in cases this commision % changes often

    The commission is visible for each order, under the Agent Dashboard -> Earnings page.

    Do you mean for the agent to see the commission rules / percentages applied? There is no feature for that. It may be useful to create an "Announcement" where commission levels and logic are explained.

    2. Can an agent get a commission (%) from the total price of the order, not just from the sub-agent's earnings commission?

    For parent agents to get a commission from subagents, currently it can only be based on subagents earnings.

    3. How to create new menu - for example "Documents" and create actual page with content into agent panel?

    You can add this PHP code snippet to your site: https://pastecode.io/s/fdszen9n

    It creates a custom page with content as follows:

    6572798244.png

    4. In case if the product is on sale. How to make that agent's coupon not adding up sale price but works only from the full price?

    Hmm, I am not sure if that is possible with WooCommerce coupons, I believe it's not.

    If there is a feature for that with standard WooCommerce coupons, let me know and we can add a snippet or way to set this for agents' coupons.

    5. Explain please in Group rules "Monthly orders value (reset)" means. For example if the agent are on 10% commission and if he gets to 1000 eur in the middle of the month the commission changes to 20%. This "reset" means that each month's first date he starts with 15%?

    This applies at the beginning of each month (e.g. on the 1st of each month), based on the results of the previous month. The "reset" means that each month starts at 0, it does not count previous months.


    If we have this rule:

    7225485938.png

    If an agent in Group 1 has an order value of $1500 in September, they will be moved to Group 2 in October.

    If an agent in Group 2 has an order value of $800 in September, they will be moved to Group 1 in October.


    Kind regards,

    Stefan

  • Chris replied

    Thank you for your reply, Stefan.

    1. Can you please give me code that shows extracted info from database about commission rule name to exact agent, I will name it with % and implement in public template.

    2. Ok. Let's wait on that. :)

    3. Thank you, code for menu worked great!

    4. This is what I found, but it doesn't work for me. (https://stackoverflow.com/questions/43376879/coupon-discount-on-product-regular-price-not-sale-price/#answer-49385659) This is very needed feature to me. 

    5. Thank you for clarification.

    BR Chris

  •  1,906
    WebWizards replied

    Hi Chris,

    1. Can you please give me code that shows extracted info from database about commission rule name to exact agent, I will name it with % and implement in public template.

    You can use this code to get all the rules that apply to an agent (current agent):

    $agent_id = get_current_user_id();
    global $salesking_public;
    $rules = $salesking_public->get_all_agent_rules($agent_id);
    

    Then you can loop through the rules:

    foreach ($rules as $rule_id){
        $rule_name = get_the_title($rule_id);
        $rule_type = get_post_meta($rule_id,'salesking_rule_what', true); // percentage or fixed
        $howmuch = get_post_meta($rule_id,'salesking_rule_howmuch', true); // rule value
    }
    

    This gets you the name of each rule (title), rule type (percentage or fixed) and rule value


    Regarding 4:

    How do you want it to be handled if a product is on sale? should the coupon ignore the product? 


    For example, we have a product with regular price $100, sale price $50 and a 20% coupon.

    What is the price paid in this case? $50? $40?