Add product with customized option in the cart through APIUnable to add configurable product to shopping cart using soap apiAdd product programmatically to cart through observerUnable to add product to cart through api in customer's cart. How to do that?Getting error in Rest Api guest-cart. [POST] V1/guest-carts/cart-id/itemsThe requested Payment Method is not available When creating an orderMagento 2 - Adding 2 (or more) configurable products to cart with custom options causes Integrity constraint violationAdd product to guest cart with custom option and its price in Magento 2 apiMagento 2.2 REST API Add Item to cart issueSimple products detached from configurabe products after importMagento 2 API add item to Cart ignore price
What's a German word for »Sandbagger«?
Why can't I hear fret buzz through the amp?
Apex Legends stuck at 60 FPS (G-Sync 144hz monitor)
How do you send money when you're not sure it's not a scam?
Random piece of plastic
Demographic consequences of closed loop reincarnation
Why are flying carpets banned while flying brooms are not?
Real orthogonal and sign
Will the internet speed decrease on second router if there are multiple devices connected to primary router?
Why is the Intel 8086 CPU called a 16-bit CPU?
Wildcards not interpreted by shell script when used with output redirection
How do I reproduce this layout and typography?
Three Subway Escalators
Why doesn't Venus have a magnetic field? How does the speed of rotation affect the magnetic field of a planet?
How to belay quickly ascending top-rope climbers?
Proof that every field is perfect???
How to tell readers that I know my story is factually incorrect?
Are there any satellites in geosynchronous but not geostationary orbits?
Did Hitler say this quote about homeschooling?
In this iconic lunar orbit rendezvous photo of John Houbolt, why do arrows #5 and #6 point the "wrong" way?
Company looks for long-term employees, but I know I won't be interested in staying long
How was Luke's prosthetic hand in Episode V filmed?
Does unblocking power bar outlets through short extension cords increase fire risk?
Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?
Add product with customized option in the cart through API
Unable to add configurable product to shopping cart using soap apiAdd product programmatically to cart through observerUnable to add product to cart through api in customer's cart. How to do that?Getting error in Rest Api guest-cart. [POST] V1/guest-carts/cart-id/itemsThe requested Payment Method is not available When creating an orderMagento 2 - Adding 2 (or more) configurable products to cart with custom options causes Integrity constraint violationAdd product to guest cart with custom option and its price in Magento 2 apiMagento 2.2 REST API Add Item to cart issueSimple products detached from configurabe products after importMagento 2 API add item to Cart ignore price
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm having a problem adding a product with custom options in the Magento cart 2.3.1.
After defining a custom option as multiple selection, I tried to add the product to the cart with the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "106,107"
]
However, the error is returned when sending a request:
"message": "The product's required option(s) weren't entered. Make sure the options are entered and try again."
So I tried to make the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "[106,107]"
]
Where I added brackets and the request was accepted. However, the sum of the values of the custom options in the quote does not occur, that is, it remains as if they were not applied.
Can anyone tell me what is the correct way to do this request?
magento2 cart api addtocart quote
add a comment |
I'm having a problem adding a product with custom options in the Magento cart 2.3.1.
After defining a custom option as multiple selection, I tried to add the product to the cart with the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "106,107"
]
However, the error is returned when sending a request:
"message": "The product's required option(s) weren't entered. Make sure the options are entered and try again."
So I tried to make the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "[106,107]"
]
Where I added brackets and the request was accepted. However, the sum of the values of the custom options in the quote does not occur, that is, it remains as if they were not applied.
Can anyone tell me what is the correct way to do this request?
magento2 cart api addtocart quote
add a comment |
I'm having a problem adding a product with custom options in the Magento cart 2.3.1.
After defining a custom option as multiple selection, I tried to add the product to the cart with the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "106,107"
]
However, the error is returned when sending a request:
"message": "The product's required option(s) weren't entered. Make sure the options are entered and try again."
So I tried to make the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "[106,107]"
]
Where I added brackets and the request was accepted. However, the sum of the values of the custom options in the quote does not occur, that is, it remains as if they were not applied.
Can anyone tell me what is the correct way to do this request?
magento2 cart api addtocart quote
I'm having a problem adding a product with custom options in the Magento cart 2.3.1.
After defining a custom option as multiple selection, I tried to add the product to the cart with the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "106,107"
]
However, the error is returned when sending a request:
"message": "The product's required option(s) weren't entered. Make sure the options are entered and try again."
So I tried to make the following request:
POST /V1/carts/mine/items
JSON:
"cartItem":
"sku": "Big Lanche-1",
"qty": 1,
"product_type":"simple",
"quote_id": "631",
"product_option":
"extension_attributes":
"custom_options": [
"option_id": "23",
"option_value": "[106,107]"
]
Where I added brackets and the request was accepted. However, the sum of the values of the custom options in the quote does not occur, that is, it remains as if they were not applied.
Can anyone tell me what is the correct way to do this request?
magento2 cart api addtocart quote
magento2 cart api addtocart quote
asked Jul 10 at 13:35
Luis FaconiLuis Faconi
265 bronze badges
265 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281582%2fadd-product-with-customized-option-in-the-cart-through-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281582%2fadd-product-with-customized-option-in-the-cart-through-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown