#Customer Data

1 messages · Page 1 of 1 (latest)

glad blade
#

How can I make it possible to retrieve a client's information, such as their name and profile picture, using their client ID even if they are not registered? I need this so that when they add a comment to a product, this information can be saved with the comment.

icy gorge
#

If they are not registered, how are you going to let them upload a profile picture, etc? Seems pretty insecure. If they are registered, you can get it from the customers endpoint, although it currently is not fully functional. There's a PR open to enable querying relations. You could use that PR to know how you would need to contruct a custom route.

glad blade
#

But in the database, I only store the client's ID. Can I retrieve more information about the client with this ID? This is so that when I render the comments, I can add this information (name and image).

#

PSDT: I'm working with your plugin, although I modified it because I couldn't send 'req.params' or 'req.user.client_id'. Haha, it must be a CORS error that I won't solve for now.

icy gorge
#

I'll be working on the plugin again soon to finally add the admin ui piece. After that, I'll be more familiar with it to talk about it. It's been a while since I worked on it deeply. I have some other work this week, but maybe soon.

For you customer data issue, I would try first to see if I could store and retrieve everything with the metadata field. You can put a json object in there. It's pretty cool. I haven't experimented with it much myself.