Hi all. I'm working with scriptable cart and need ...
# suitecommerce
d
Hi all. I'm working with scriptable cart and need to find some sort of session or cart value to track non logged-in customers. Has anyone got any idea what order fields are accessible - or even just a suggested technique to dump a log of the order object? Thread in Slack Conversation
s
In your 
customPageInit
 function, add the following:
Copy code
var userId = nlapiGetFieldValue('entity');
if (parseInt(userId) === 0)
{
  // Guest User
}
else
{
  // Logged-in User
}
d
Thanks Steve. That article has been a big help over the last week, but the problem I'm having is identifying which fields can be "seen" in the scriptable cart. I really want to access a session or cart ID, but I've no idea whether either are exposed. Are the fields documented anywhere?
p
Cart id is not a concept that actually exists for API access 🙂
although there are some cookies that show visitorID and cartID in sca those are not exposed and only internal.
the only things that are visible (at most) in scriptable cart are what the record browser shows for the Sales Order transaction object.