I want to get the customerid to do some custom code in volusion. Please help me if there is any way so that I can fetch the customerid. I can see in cookie there is a cookie named "CustomerID" but I am unable to decrypt it .
Asked
Active
Viewed 205 times
2 Answers
0
I put this in the jquery .ready() function...
$.ajax({
url: "/api/v1/users/current",
dataType: "json",
success: function (json) {
firstName = json.data.firstName;
lastName = json.data.lastName;
email = json.data.email;
id = json.data.id;
alert (firstName + " " + lastName + " " + email + " " + id + " ") ;
//return true;
},
error: function(e){
//alert('error '+e.responseText);
}
});

theCodeWhisperer
- 92
- 7
-1
You can use the Volusion frontend API:
www.yoursite.com /api/v1/users
This endpoint will return the logged in user as a JSON.

Yeslandi Perez
- 1
- 1
-
your link is not working. it keeps saying Page Not found. – ZarNi Myo Sett Win Sep 27 '19 at 02:14