Okay
  Public Ticket #2858795
Customer not assigned to agent if register from affiliate link
Closed

Comments

  • Niraj Karwa started the conversation

    Actually I am using a plugin digits for login with otp. Your plugin affiliate link not working with that plugin. When user login with agent affiliate link it is not assigned to agent.

    Suppose my website is example.com And user affiliate link is https://www.example.com/myaccount/?regid=BQEQJPW8A7

    When new user clicks on affiliate link it goes to my account page and then my account page redirect to digits login page having url https://www.example.com/myaccount/?regid=BQEQJPW8A7&login=true&back=home&page=1

    Help me !

  •  2,619
    WebWizards replied

    Hi Niraj,

    Thanks for purchasing SalesKing. 


    This seems to be a compatibility issue with the Digits plugin.

    Would you be able to provide us with a backend login to the site (or a Staging Site) so we can test and check settings and options? We don't have the Digits plugin for testing and it is difficult for us to replicate your setup.

    We will try to look for options and workaround to make the 2 plugins work together.


    Kind regards,

    Stefan


  •   Niraj Karwa replied privately
  •  2,619
    WebWizards replied

    Thank you for the login.

    I checked and it appears the main issue is that Digits does not show our custom registration field. Normally there should be a "Sales Representative ID" field added to registration, that is essential for this to work.


    I see that Digits does not work with the hook our plugin uses ( " woocommerce_register_form " ). 


    I have messaged the Digits team via CodeCanyon to see if they can advise on what hook could be used instead for compatibility. I will update you as soon as I can.


    Kind regards,

    Stefan

  • Niraj Karwa replied

    Any process.?

  •  2,619
    WebWizards replied

    Hi Niraj,

    The Digits team has not replied to us yet. We asked them about this here https://codecanyon.net/item/digits-wordpress-mobile-number-signup-and-login/19801105/comments

    They have not replied to comments in the past 8-9 days.

  • Niraj Karwa replied

    Any update sir.

  •  2,619
    WebWizards replied

    Hi Niraj,

    The Digits team replied advising us to contact their support email. I have done so, but we have not heard back from them yet.

    3707951339.png
  • Niraj Karwa replied

    HELLO SIR. 


    ANY PROGRESS

  •  2,619
    WebWizards replied

    Hi Niraj,

    We received a reply from the Digits team and I was able to add a code snippet here based on the info they provided: https://www.jktoners.in/wp-admin/admin.php?page=edit-snippet&id=1&result=updated

    After testing, user registration through affiliate links seems to work now.

    For example, you can register a customer at this link:

    https://www.jktoners.in/my-account/?regid=LJCYBC4C4Q

    And the customer will be assigned to the agent [email protected]

    To log in as the agent, username and password are both [email protected]

    Kind regards,

    Stefan

  • Niraj Karwa replied

    Fantastic.

    Now I am facing 2 issue.

    1. when agent buy as customer website header is not showing.

    2. agent update price is not updating when purchase as customer.



  •  2,619
    WebWizards replied

    Regarding

    1:

    I've added some additional CSS that I believes resolves it. Let me know if you encounter any further issues.


    2:

    This functionality requires the "Update Cart" button to be pressed. This was not enabled in your theme settings. I enabled it now and now it can be used:

    3940093684.png

    Pricing is saved after clicking Update.

  • Niraj Karwa replied

    Hello sir.

    As i has provided you staging website dashboard. Please guide how to or snippet code so that same i do in my main site. Thanks

  •  2,619
    WebWizards replied

    Hi,

    To achieve that:

    1. Make sure to update SalesKing to the attached version.

    To update to this version:

    - first deactivate the current plugin version in your site

    - then upload and activate the attached plugin version

    2. In the backend, go to Appearance -> Customize -> Additional CSS, and add this:

    .salesking_shopping_as_customer #tbay-header{
        margin-top: 30px;
    }
    

    3. Go to Puca Options -> WooCommerce -> And disable "AJAX UPDATE QUANTITY":

    1736443471.png
  • Niraj Karwa replied

    version shared in previous message is different from latest version available at codecanyon??


  •  2,619
    WebWizards replied

    Yes Sir, The version attached is newer, so please use the attached version, not the one from CodeCanyon.

  • Niraj Karwa replied

    Sir. you mean i have to ask for separate edited version every time after new version updated on codecanyon.


  •  2,619
    WebWizards replied

    No, no. The change we made here will be in the next SalesKing update on CodeCanyon.


    We sent you a newer version,  we just did not yet update it on CodeCanyon. After we update it, you can use that version there, you do not need a separate edited version.


  • Niraj Karwa replied

    Can i use updated version from codecanyon website. Or still use old version which you provided manually in this conversion

  •  2,619
    WebWizards replied

    Hi,

    You can now use the updated version from CodeCanyon, it already includes the changes we made here.


    Kind regards,

    Stefan

  • Niraj Karwa replied

    Again same issue facing. Customer not assigned to agent after registering with affiliated link

  •  2,619
    WebWizards replied

    Hi there,

    I tested right now and this is working normally in my tests.


    I registered with this link:

    https://www.jktoners.in/my-account/?regid=LJCYBC4C4Q

    And the customer will be assigned to the agent [email protected]

    To log in as the agent, username and password are both [email protected]


    I registered with OTP and customers show here:

    8312727023.png


  • Niraj Karwa replied

    Hello sir. i has updated plugin with codecanyan latest update. please try now.

  •  2,619
    WebWizards replied

    I registered now the account with username 9090407368

    I used an India phone number, I received the SMS at https://receive-sms-free.cc/Free-India-Phone-Number/919090407368/


    The user shows normally here in the Customers list for the agent:

    5635335193.png
  • Niraj Karwa replied

    Hello sir. Actually you are testing at stagging website. I am facing issue on main site. I had put code snippet directly in function.php file instead code snippet plugin. 

    add_action('plugins_loaded', function(){

    global $salesking_public;
    add_action( 'register_form', array($salesking_public,'salesking_registration_link') );
    add_action( 'digits_user_created', array($salesking_public,'salesking_assign_agent_registration') );

    add_action ('digits_user_created', function($user_id){
    if (isset($_POST['salesking_registration_link_hidden'])){
        $registration_value = sanitize_text_field($_POST['salesking_registration_link_hidden']);
        if (!empty($registration_value)){
        // get agent user ID
        $agent = get_users(array(
        'meta_key'     => 'salesking_agentid',
        'meta_value'   => $registration_value,
        'meta_compare' => '=',
        'fields' => 'ids',
    ));
    if (count($agent) === 1){
    update_user_meta($user_id,'salesking_assigned_agent', $agent[0]);

    }
        }
        }
    }, 10, 1);

    });

  •  2,619
    WebWizards replied

    You may need to move it to the code snippets plugin.

    Sometimes it works a little differently in functions.php. Please try to set it identical to the jktoners.in site.

  • Niraj Karwa replied

    Hello sir. But I don't want to install extra plugin. Hope you understand my concern. Please provide code for function.php file.

  •  2,619
    WebWizards replied

    Hi there,

    I can assure you the Code Snippets plugin is a very small plugin, with no effects on site performance. We use it all the time with no issues.


    I am sorry, but we cannot rewrite the snippet for functions.php. The issue is that there is an order in which the hooks are fired in the site that is different when added differently. We discussed with the Digits team, and they advised us for what hooks to use in this setup. We would not know how to rewrite this. It would be necessary to contact the Digits team again.

  • Niraj Karwa replied

    I find out the issue. Actually I am using digits addon ( One click login and signup). Please recontact them them sir. Ask them for accordingly snippet code. 


    thanks

  •  2,619
    WebWizards replied

    All right, I understand the issue is with the One click login / signup addon.

    I will contact them to ask about compatibility in this situation.


  • Niraj Karwa replied

    Any update??

  •  2,619
    WebWizards replied

    Hi there,

    I checked now but I'm afraid we haven't received a reply on this yet. 

    I will get follow up with them, and I will get back to you on this as soon as we can.

    Kind regards,

    Stefan

  • Niraj Karwa replied

    Any update sir??

  •  2,619
    WebWizards replied

    Sorry but they haven't gotten back to us.
    If you can provide me with a staging site login that is identical to the main site, I can check to see if there is anything we can do to make it work.

  • Niraj Karwa replied

    Ant progress on this?

  •  2,619
    WebWizards replied

    Sorry but it seems the Digits team isn't able to help us with this.


    If you can provide me with a staging site login that is identical to the main site, I can check to see if there is anything we can do to make it work.

  • Niraj Karwa replied

    I had already provided you details. Please look in this. unable to use your plugin after purchase yet.

  •  2,619
    WebWizards replied

    Sir, you have provided us access to your staging site.

    You said that the issue is not in your staging site, only in your main site:

    7681959146.png

    If you would like to provide us access to the main site so we can see the problem, I am happy to check. 

    Thank you

  • Niraj Karwa replied

    Hello sir. Now i has activated one click signup/login to this stagging website too. Please now look in this.

  •  2,619
    WebWizards replied

    Hi,

    I have modified the snippet here to try to get this working https://www.jktoners.in/wp-admin/admin.php?page=edit-snippet&id=1&result=updated


    You will see that for example if you go to https://www.jktoners.in/my-account/?regid=LJCYBC4C4Q , the input value is set correctly:

    1889829625.png


    Then in the snippet we hook to digits_user_created and digits_new_user but it appears for some reason these are not firing as expected.


    You can try the snippet to see if it works in your site, but likely we would need the digits team to provide us with a different hook, as it is likely not the right hook to use. I don't have another solution for this as we do not know their code and do not know what hooks are needed to be used here. 


    Kind regards,

    Stefan

  • Niraj Karwa replied

    its not working. Customer is not assigned to agent.

  • Niraj Karwa replied

    any update?

  •  2,619
    WebWizards replied

    Hi Niraj,

    I'm afraid this is not something we can assist with further without direct help from the Digits team regarding an integration. Ultimately this is customization and it's not something directly covered by support. As much as we'd like to help, it's beyond our ability as we do not have knowledge of the other plugin. You'd have to either work with a programmer to take on this as a custom project, or look at whether the Digits team can do anything on their end.

    Kind regards,
    Stefan

  • Niraj Karwa replied

    Still waiting your resolution. As I connected with digits plugin author he is saying no one is contacted or mail them from your side.

     Please do some needfull still I am not able to use your plugin even after 3 months gone.

  •  2,619
    WebWizards replied

    Hi Niraj,

    I am sorry but this is a plugin customization matter, and is not something that is covered by Envato Support : https://codecanyon.net/page/item_support_policy

    While we've done our best to assist, we're not able to dedicate additional time to this, as integrating 3rd party plugins is not covered under support.

    Thank you for understanding.