cancel
Showing results for 
Search instead for 
Did you mean: 

Passing user details to extension

Passing user details to extension

Hi Guys,
I am extremely new to Magento. My company is testing out a few loyalty points extensions in magento and I have been asked to setup a website and integrate a few extensions.
I have integrated an extension called Zinrelo into the default website put am stuck as to how I would pass user details to the extension. The integration guide on their site says that I should embed this code snippet into HTML HEAD (which I have done) .

I am not sure how to pass the user details for anyone who creates an account on our site to this extension. Their guide says that "The customer information – email, name and user_id – must be filled dynamically and passed wherever available.". I am not sure how to do this. Any help would be much appreciated.



<script type="text/javascript">
        window._zrl  =  window._zrl || [];
        var  init_data =
        {
	    'partner_id' : 'xxxxxxxxx', /*REQUIRED: Zinrelo Partner ID*/
	    
	    'email' : 'useremail@gmail.com', /*REQUIRED: When User is Logged in.For Non-Logged in users,
					    pass an empty string ('')*/
	    'name' : 'User  Name',	    /*REQUIRED: When User is Logged in.For Non-Logged in users,
					    pass an empty string ('')*/
	    'user_id': 'Unique-user-ID'	    /*REQUIRED: When User is Logged in.For Non-Logged in users
					    and guest users who DO NOT have an account,
					    pass an empty string ('')*/
        }
        _zrl.push( [ 'init' , init_data ] );
	</script>
	<script src="//cdn.zinrelo.com/js/all.js" type="text/javascript"></script>
                        

 

4 REPLIES

Re: Passing user details to extension

Hi Denis, 

 

This is Akshay from Zinrelo. 

 

If you have already installed the magento extension , you dont need to do any further coding. The extension takes care of passing the user details to Zinrelo. All you have to do is click on the Register button in the Zinrelo Extension settings in Magento Admin panel and complete the loyalty program set up on Zinrelo Admin console.

Register button

 

Once you have completed the loyalty program set up, you will be prompted to launch the loyalty program. 

LaunchNow

Clicking on "Launch Now" will activate the loyalty program on your Magento Store. After this, your entire loyalty program can be managed from Zinrelo Admin Console.

 

If you have any problems setting our extension up on your website, please feel free to reach out to us at support@zinrelo.com and we'd be happy to assist.

 

Thanks,

Akshay

Re: Passing user details to extension

Hi Akshay
Thanks for your help. I have already done everything you said however
everytime I create a user or log into my website, It shows up as "user" in
zinrelo. That is no new accounts are created. All the accounts have the
generic name and email that is specified in the zinrelo code snippet. Only
one member ever gets created in the Zinrelo administration site
Thanks
Denis

Re: Passing user details to extension

Hi Denis,

I had a look at your website and figured out what the problem is. It seems like you have manually inserted the script from our integration snippet on to the store. As I have mentioned in my previous response, if you have installed the extension, you do not have to insert any integration code. The extension takes care of everything.

 

Here is what you need to do - 

1) Remove the code highlighted in the image below from your website

 

magentosupport.png

 

2) After removing the above code that you had manually inserted, visit your website and create an account on your website. You will see new accounts getting created in the Zinrelo Admin Console.

 

Please let me know if that helps.

 

Thanks,
Akshay

Re: Passing user details to extension

Hi Akshay,

Thanks that solved my problem.

Thanks a lot for your help!

 

Denis