REST API - Add same item with different custom options to cart in Magento 2.1Rest api to get product by sku with custom attribute option value in Magento 2.1Order creation not working through rest api in Magento 2.1Magento 2 Rest Api get Products List including qty fieldLocalization for Cart/Quote APIs doesn't work properly in magento 2Add options to Visual Swatch by Rest APIPLacing Order Magento 2.1 REST APIMagento 2 Rest API get Quote Item Custom Option valuesHow to edit cart item in Mageto 2 REST API?Accessing Admin data from Magento 2.1 Rest APIMagento 2.3 Rest API: Error message for each cart item

What aircraft was used as Air Force One for the flight between Southampton and Shannon?

What would be the way to say "just saying" in German? (Not the literal translation)

Do people with slow metabolism tend to gain weight (fat) if they stop exercising?

Why did Intel abandon unified CPU cache?

Section numbering in binary

Do you need to let the DM know when you are multiclassing?

How can I make 12 tone and atonal melodies sound interesting?

Why does smartdiagram replace the Greek letter xi by a number?

empApi with Lightning Web Components?

How can I remove material from this wood beam?

Separate SPI data

What is this Amiga 1200 mod?

Why Does Mama Coco Look Old After Going to the Other World?

What differences exist between adamantine and adamantite in all editions of D&D?

Derivative of a double integral over a circular region

Who voices the small round football sized demon in Good Omens?

What would prevent chimeras from reproducing with each other?

Proving that a Russian cryptographic standard is too structured

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Should I put programming books I wrote a few years ago on my resume?

Is it possible to have 2 different but equal size real number sets that have the same mean and standard deviation?

Did Apple bundle a specific monitor with the Apple II+ for schools?

tabular: caption and align problem

Please figure out this Pan digital Prince



REST API - Add same item with different custom options to cart in Magento 2.1


Rest api to get product by sku with custom attribute option value in Magento 2.1Order creation not working through rest api in Magento 2.1Magento 2 Rest Api get Products List including qty fieldLocalization for Cart/Quote APIs doesn't work properly in magento 2Add options to Visual Swatch by Rest APIPLacing Order Magento 2.1 REST APIMagento 2 Rest API get Quote Item Custom Option valuesHow to edit cart item in Mageto 2 REST API?Accessing Admin data from Magento 2.1 Rest APIMagento 2.3 Rest API: Error message for each cart item






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the quantity is increased. looks like Magento is not considering the different options product as a separate item, rather, it just compares the SKU and adds the quantity regardless of the options.



is there a way to make Magento add multiple instances of the same SKU item (with different options) as separate items?



below is how the items of the order differ



 
"name": "product 1",
"sku": "ABC",
"qty": 1,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "blue"

]






"name": "product 2",
"sku": "ABC",
"qty": 3,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "red"

]













share|improve this question
























  • How about if you use child SKU instead?

    – PY Yick
    Sep 7 '17 at 4:44











  • the options are not predefined , the options input are TEXT fields where user can type any thing

    – Zorox
    Sep 7 '17 at 5:56











  • Seems it's a problem on frontend too.

    – PY Yick
    Sep 7 '17 at 8:47











  • i managed to use custom options on the front end , however , magetno saves only the 1st item options

    – Zorox
    Sep 7 '17 at 9:29












  • So this is obviously a Magento bug. You can report it via github.

    – PY Yick
    Sep 11 '17 at 3:28

















0















I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the quantity is increased. looks like Magento is not considering the different options product as a separate item, rather, it just compares the SKU and adds the quantity regardless of the options.



is there a way to make Magento add multiple instances of the same SKU item (with different options) as separate items?



below is how the items of the order differ



 
"name": "product 1",
"sku": "ABC",
"qty": 1,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "blue"

]






"name": "product 2",
"sku": "ABC",
"qty": 3,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "red"

]













share|improve this question
























  • How about if you use child SKU instead?

    – PY Yick
    Sep 7 '17 at 4:44











  • the options are not predefined , the options input are TEXT fields where user can type any thing

    – Zorox
    Sep 7 '17 at 5:56











  • Seems it's a problem on frontend too.

    – PY Yick
    Sep 7 '17 at 8:47











  • i managed to use custom options on the front end , however , magetno saves only the 1st item options

    – Zorox
    Sep 7 '17 at 9:29












  • So this is obviously a Magento bug. You can report it via github.

    – PY Yick
    Sep 11 '17 at 3:28













0












0








0








I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the quantity is increased. looks like Magento is not considering the different options product as a separate item, rather, it just compares the SKU and adds the quantity regardless of the options.



is there a way to make Magento add multiple instances of the same SKU item (with different options) as separate items?



below is how the items of the order differ



 
"name": "product 1",
"sku": "ABC",
"qty": 1,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "blue"

]






"name": "product 2",
"sku": "ABC",
"qty": 3,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "red"

]













share|improve this question
















I'm adding products to cart via REST API. I NEED to add the same product but with different options, However, when I post the 2nd request, The 2nd product is not added as new order item, but only the quantity is increased. looks like Magento is not considering the different options product as a separate item, rather, it just compares the SKU and adds the quantity regardless of the options.



is there a way to make Magento add multiple instances of the same SKU item (with different options) as separate items?



below is how the items of the order differ



 
"name": "product 1",
"sku": "ABC",
"qty": 1,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "blue"

]






"name": "product 2",
"sku": "ABC",
"qty": 3,
"product_option":
"extension_attributes":
"custom_options": [

"option_id": "color",
"option_value": "red"

]










magento-2.1 rest-api






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 6 '17 at 21:59







Zorox

















asked Sep 6 '17 at 21:34









ZoroxZorox

147110




147110












  • How about if you use child SKU instead?

    – PY Yick
    Sep 7 '17 at 4:44











  • the options are not predefined , the options input are TEXT fields where user can type any thing

    – Zorox
    Sep 7 '17 at 5:56











  • Seems it's a problem on frontend too.

    – PY Yick
    Sep 7 '17 at 8:47











  • i managed to use custom options on the front end , however , magetno saves only the 1st item options

    – Zorox
    Sep 7 '17 at 9:29












  • So this is obviously a Magento bug. You can report it via github.

    – PY Yick
    Sep 11 '17 at 3:28

















  • How about if you use child SKU instead?

    – PY Yick
    Sep 7 '17 at 4:44











  • the options are not predefined , the options input are TEXT fields where user can type any thing

    – Zorox
    Sep 7 '17 at 5:56











  • Seems it's a problem on frontend too.

    – PY Yick
    Sep 7 '17 at 8:47











  • i managed to use custom options on the front end , however , magetno saves only the 1st item options

    – Zorox
    Sep 7 '17 at 9:29












  • So this is obviously a Magento bug. You can report it via github.

    – PY Yick
    Sep 11 '17 at 3:28
















How about if you use child SKU instead?

– PY Yick
Sep 7 '17 at 4:44





How about if you use child SKU instead?

– PY Yick
Sep 7 '17 at 4:44













the options are not predefined , the options input are TEXT fields where user can type any thing

– Zorox
Sep 7 '17 at 5:56





the options are not predefined , the options input are TEXT fields where user can type any thing

– Zorox
Sep 7 '17 at 5:56













Seems it's a problem on frontend too.

– PY Yick
Sep 7 '17 at 8:47





Seems it's a problem on frontend too.

– PY Yick
Sep 7 '17 at 8:47













i managed to use custom options on the front end , however , magetno saves only the 1st item options

– Zorox
Sep 7 '17 at 9:29






i managed to use custom options on the front end , however , magetno saves only the 1st item options

– Zorox
Sep 7 '17 at 9:29














So this is obviously a Magento bug. You can report it via github.

– PY Yick
Sep 11 '17 at 3:28





So this is obviously a Magento bug. You can report it via github.

– PY Yick
Sep 11 '17 at 3:28










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%2f192278%2frest-api-add-same-item-with-different-custom-options-to-cart-in-magento-2-1%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%2f192278%2frest-api-add-same-item-with-different-custom-options-to-cart-in-magento-2-1%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