Hello, I'm trying to get the hang of customizing the mobile app of CS Cart. I have some custom code that (on the web) adds some details in $auth that are essential to something I'm doing.
My question is: Is there a way to grab the what the contents of the $auth array would be in using the CS Cart API that the mobile app uses?
Auth is generally a small subset of user and profile. it is also store in the Session which is not generally available via the API since the Session is only valid for the current transaction (other than for internal counters like number of records).
If your custom fields are implemented as profile fields, you should have them accessible from the Users entity of the API. But you will have to reference them by index given they are not stored/presented as associative arrays.
Thanks, I'll keep that in mind.
I also found out it's possible to extend the functionality of the API correct? And you can use the cs cart functions when extending the API to process data before sending it back to the requester? So I was thinking maybe I just extend the API and use the fn_fill_auth() function since it returns what $auth would contain at initialization and at log in and create an Entity for that can be returned when requesting from the API. Am I understanding the documentation properly that that would be possible?
I wouldn't bother with fn_fill_auth() for an API extension. Just grab what you need directly from the DB for your new (or extended) entity.
I see, appreciate the help!