Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hallo are CRUD operation possible on the profile/shipping information?
tx
Simone
Comment | File | Size | Author |
---|---|---|---|
#2 | customer_profile_crud-2643530-1.patch | 22.38 KB | tyler.frankenstein |
Comments
Comment #2
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedWith the following patch, we can now have CRUD operations for Customer Profiles. Without this, it's very difficult to build Orders, since we have to create/update customer profiles and attach them to orders using the customer profile entity id(s).
Create & Update
Create - POST:
?q=api/customer-profile.json
Update - PUT:
?q=api/customer-profile/123.json
Example JSON Data to POST/PUT:
Retrieve & DELETE
Retrieve - GET:
?q=api/customer-profile/123.json
Delete - DELETE:
?q=api/customer-profile/123.json
Disclaimer
This patch also contains numerous other RTBC patches (sorry, but I did not want to back track and I do not know enough patch-fu to be able to pull these ones out temporarily):
Comment #3
ruvenshilpakar CreditAttribution: ruvenshilpakar commented@tyler.frankenstein thank you for your patch. However, when i applied it and tested the customer-profile services, i am getting an access denied for user name response. I do not understand why is it occurring? could you please assist me on this?
Comment #4
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedI don't understand this, please be more specific. All permissions run through Commerce permission functions, so any access denied messages are most likely due to your commerce permission settings.
GET: @see commerce_services_customer_profile_retrieve_access()
POST: @see commerce_services_customer_profile_create_access()
PUT: @see commerce_services_customer_profile_update_access()
DELETE: @see commerce_services_customer_profile_delete_access()
Comment #5
ruvenshilpakar CreditAttribution: ruvenshilpakar commented@tyler.frankenstein
I looked it into the 4 functions, there are no issues there, i should be getting 401 error response based on those but i am getting a 403 error response, (which unlike 401 request, authenticating will not make any difference)
Comment #6
Media Crumb CreditAttribution: Media Crumb commentedWas this patch added into master or will i still need to apply. Thanks!
Comment #7
upunkt CreditAttribution: upunkt commented"Dev is all you need", don't remember that Beatles-tune?