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;








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?










share|improve this question




























    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?










    share|improve this question
























      0












      0








      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?










      share|improve this question














      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 10 at 13:35









      Luis FaconiLuis Faconi

      265 bronze badges




      265 bronze badges




















          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
          );



          );













          draft saved

          draft discarded


















          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















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form