Forum Replies Created
-
AuthorPosts
-
DanielParticipant
In my panel, the info says that Support Expire 10/17/2020
DanielParticipantActually, it’s only shown when we move the mouse over
Is there any option to show them the “+” and “-” outside like that?
- This reply was modified 5 years, 5 months ago by Daniel.
DanielParticipantHi there!
Thank you for the example, but still doesn’t work with my data.Could you please define what is it the “2209”, “mytextchange” and “business” from the example?
Thank you!
DanielParticipantThank you for the example, but I am afraid the original question was how to add a extra field in an ORDER.
We tried, something like this:
POST server_url/wp-json/ppom/v1/set/order/?order_id=14&secret_key=secret&fields={“9”:{[
{
“option”: “Option 1”,
“price”: “1,20”,
“id”: “option1”
}]]}Where id_product=9 and id_order=14.
The endpoint doesn’t give an error, but doesn’t add the fields neither.
Should the id_product (9 in my example) be the line item id of the order?
Using this endpoint will automatically add the price to the order price or we have to do it manually?A sample request might be really helpful.
Thank you!
DanielParticipantHi,
thank you for the reply. I did read the API guide, unfortunately the example is in PHP, and I am using Postman to test the endpoints to later use it on an Android application and isn’t clear for me.I have some questions about the documentation example:
1- What is it the “2209” ? The product id?
2- How and which options information shall I send in the “fields” parameters on the request URL?
3- Using this endpoint will automatically add the price to the order price or I have to do it manually?Thank you in advance 🙂
DanielParticipantHi!
I am sorry but I don’t understand what it is this 2209 and which information is “mytextchange”.In my case I have a user ordering an order (order_id=14) of a product (product_id=9) and added one extra option.
I created the basic order with WooCommerce REST API: POST server_url/wp-json/wc/v2/ordersAnd now want to add the PPOM extra field:
POST server_url/wp-json/ppom/v1/set/order/?order_id=14&secret_key=secret&fields=[{“9”:{????]
If my options are (using GET server_url/wp-json/ppom/v1/get/product/?product_id=9&secret_key=secret):
{
“status”: “success”,
“message”: “Meta found 1”,
“meta_id”: 1,
“product_id”: 9,
“ppom_fields”: [
{
“title”: “Fields title 1”,
“type”: “quantities”,
“data_name”: “Fields name 1”,
“description”: “Opcions to add”,
“required”: “”,
“options”: [
{
“option”: “Option 1”,
“price”: “1,20”,
“min”: “0”,
“max”: “”,
“id”: “option1”
}]
}]
}What shall I add on the “????” of the Rest API request?
Thank you in advance!
DanielParticipantHello again,
I am trying to add an extra field to an existing order with rest api:POST server_url/wp-json/ppom/v1/set/order/?order_id=14&secret_key=secret&fields=[{“id”:”rosaroja”}]
But I am not seeing any difference when I get the fields from the order with:
GET server_url/wp-json/ppom/v1/get/order/?order_id=14&secret_key=secret
Could you show me how to do it correctly?
Will the POST set/order update the order price aswell?
Thank you in advance
DanielParticipantHi, thanks for answer, but, the option “show only option’s total” is shown as:
product base: XXX€
total: ZZZ€ZZZ€ is the result of XXX€ + YYY€ ( all ppom metas )
And, what I’d like to show, is something like:
product base: XXX€
all ppom metas: YYY€
total: ZZZ€Thanks
-
AuthorPosts