Skip to content

Magento REST API returns not existing SKU when custom option was set #25461

Open
@ihor-sviziev

Description

@ihor-sviziev
Contributor

Preconditions (*)

  1. Magento 2.3.2 or 2.3-develop

Steps to reproduce (*)

  1. Create simple product with one custom option type drop-down with name "Color", and values "Red", "Green", also fill up SKU field for customizable options
    image
    image

  2. Create Configurable product with one custom option type drop-down with name "Color", and values "Red", "Green", also fill up SKU field for customizable options
    image
    image
    image

  3. Go to Frontend, add to cart two these products

  4. Get information about quote via REST API

  5. Go to checkout, execute following JS in developer console, see result:

require(['mage/storage'], function(storage) {
	storage.get('/rest/default/V1/guest-carts/' + window.checkoutConfig.quoteData.entity_id + '/')
	.done(function(result) {
		console.log(result.items);
	});
});

Expected result (*)

  1. You should have an ability to get real product SKU, it's useful for different types of integrations

sku: "Simple-1"
sku: "Configurable 2-a"

Actual result (*)

  1. You're having not real product SKU, but added all custom options

sku: "Simple-1-Red"
sku: "Configurable 2-a-Red"

image

Activity

m2-assistant

m2-assistant commented on Nov 4, 2019

@m2-assistant

Hi @ihor-sviziev. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
    Information on your environment
    Steps to reproduce
    Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@ihor-sviziev do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
    no

ihor-sviziev

ihor-sviziev commented on Nov 4, 2019

@ihor-sviziev
ContributorAuthor

@magento give me 2.3-develop instance

magento-engcom-team

magento-engcom-team commented on Nov 4, 2019

@magento-engcom-team
Contributor

Hi @ihor-sviziev. Thank you for your request. I'm working on Magento 2.3-develop instance for you

magento-engcom-team

magento-engcom-team commented on Nov 4, 2019

@magento-engcom-team
Contributor

Hi @ihor-sviziev, here is your Magento instance.
Admin access: https://i-25461-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

m2-assistant

m2-assistant commented on Nov 5, 2019

@m2-assistant

Hi @engcom-Charlie. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

    2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

    3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

    4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

    5. Add label Issue: Confirmed once verification is complete.

    6. Make sure that automatic system confirms that report has been added to the backlog.

added
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passed
Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Reproduced on 2.3.xThe issue has been reproduced on latest 2.3 release
on Nov 5, 2019
Repository owner unassigned on Nov 5, 2019
magento-engcom-team

magento-engcom-team commented on Nov 5, 2019

@magento-engcom-team
Contributor

✅ Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-22785 were created

Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

ihor-sviziev

ihor-sviziev commented on Nov 7, 2019

@ihor-sviziev
ContributorAuthor

Hi,

As we discussed in Slack - this issue appears only when "sku" field is shown.

The result SKU is following:

<original_product_sku>-<sku_option_1>-<sku_option_2>

There is an issue not in the SKU itself, the issue that we can't really find product in the catalog by this SKU, (<original_product_sku> in this case).

I see there at least two possible solutions:

  1. Drop functionality that appends option SKUs (backward incompatible change)
    This probably it's backward compatible change, but I'm not sure if this case is valid at all.

  2. Create new field that will contains only real product SKU (backward compatible change)
    Something like original_sku=<original_product_sku>

I think there might be more possible cases to fix this issue.

@akaplya could you review this issue as architect and decide what is expected result in this case?

31 remaining items

removed
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for development
Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passed
Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Reproduced on 2.3.xThe issue has been reproduced on latest 2.3 release
Issue: Format is validGate 1 Passed. Automatic verification of issue format passed
Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it
Severity: S2Major restrictions or short-term circumventions are required until a fix is available.
CDIssue recommended for the contribution day
on Jun 17, 2025
engcom-Bravo

engcom-Bravo commented on Jun 17, 2025

@engcom-Bravo
Contributor

Hi @ihor-sviziev,

Thanks for your reporting and collaboration.

We have tried to reproduce the issue in Latest 2.4-develop instance and the issue is still reproducible.Kindly refer the screenshots.

Image

we are having not real product SKU, but added all custom options.Hence Confirming the issue.

Thanks.

added
Issue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch
Reported on 2.4.xIndicates original Magento version for the Issue report.
on Jun 17, 2025
github-jira-sync-bot

github-jira-sync-bot commented on Jun 17, 2025

@github-jira-sync-bot

✅ Jira issue https://jira.corp.adobe.com/browse/AC-14966 is successfully created for this GitHub issue.

m2-assistant

m2-assistant commented on Jun 17, 2025

@m2-assistant

✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Cart & CheckoutComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Relationships

None yet

    Participants

    @ihor-sviziev@sivaschenko@gabrieldagama@sdzhepa@magento-engcom-team

    Issue actions

      Magento REST API returns not existing SKU when custom option was set · Issue #25461 · magento/magento2