how to get the FULL details for the current user using UserService, including their default address? [closed] - addressbook

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
The default address data returned contains country and region codes, but not country and region names.
Any one know if there's a way to do that in Spartacus, or would that be something custom?

Good question! You can use Spartacus's configurable endpoint mechanism to achieve this.
For your particular case, you would want to override the addressDetail and addresses endpoints. You will need to add the FULL fields for country and regions your endpoints will look like this:
addresses: 'users/${userId}/addresses?fields=DEFAULT,addresses(country(FULL),region(FULL))',
addressDetail: 'users/${userId}/addresses/${addressId}?fields=country(FULL),region(FULL)',
Alternatively, you could just add fields=FULL to receive ALL the available details.

Related

How to use PayPal in not allowed countries? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
In some countries, PayPal functionality is trimmed (you can't sell, you can't recieve money), but I want to use it like for full. Can it be here some workaround? Can I use some VPN for this?
You can't do that, they'll will catch you. And where do you live? This can not be because you have to provide personal legal information. In some cases, you may be required to show even a passport or id. Why don't use local payment systems?
You have to respect terms of service of face being disallowed from any service or merchant that you use. If you want to operate in multiple countries, you'll just need to find systems that work in each, and a way to implement that routes the order through the right merchant gateway.

How to add country drop down using openUI5 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
Is there's a simple way to create a country drop down using openUI5? or a sample that i can be use to create a drop down list of country.
Well it seems like you've tried nothing to solve your problem, but I'll give it a shot anyway.
You need a list of countries, preferably in a non-human readable format (JSON). You can find such lists via google (list of countries json).
You then use this JSON list to create a new sap.ui.model.json.JSONModel. After that, bind the model to your view.
Your view should contain a sap.m.Select which references your bound model in its items aggregation.
Example on how to bind data: http://openui5.org/getstarted.html#step5
Example on how to use select: https://openui5beta.netweaver.ondemand.com/explored.html#/entity/sap.m.Select/samples

Can you override routes and make it database driven? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to override the default routes file by making it database driven in the playframework?
I want to be able to have routes defined in a more dynamic way instead of hard-coding the routes in a configuration file
Yes it is possible, just create a dynamic route as described in Dynamic parts spanning several / - then in your action divide parts by slash, validate how required and then make your query.
Depending on your DB response you can just call a method which returns a valid Result. That's all

Is there a way to get the ID of a message thread in Facebook? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
If I have the URL of a facebook thread from a user's messages, is there a way to get the id of that thread? I get how to construct a url given an id, but not the other way around.
The URL can have two formats:
https://www.facebook.com/messages/123456789
or
https://www.facebook.com/messages/<username>
I need to be able to handle both cases.
Thanks.
SELECT thread_fbid
FROM unified_thread
WHERE single_recipient = <USER ID>
Doc: https://developers.facebook.com/docs/reference/fql/unified_thread
This gives exactly what you want. The problem is:
(#298) You must be a developer of the application
Please read unified_thread still not open for public?
So, one actual workaround would be to loop on all the threads from graph.facebook.com/me/inbox?fields=to as long as you didn't find one which:
has only 2 participants (because some threads are group conversations and you don't want them),
and contains the participant who is the person represented by a user ID/username.
This has to be done manually, using your favorite language.

Testing user experience from multiple countries [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm working on an app that displays slightly different behavior based on the country that the user is in. I'm using the signed_request['user']['country'] parameter (which from my research appears to be set by a geographic lookup), and I'd like to find a way to simulate a visitor hitting my app from a different country.
Things I've tried:
Looking for special settings for test users
Changing locale settings
in facebook
Is there anything that can help me short of proxying my access to Facebook through a foreign http proxy?