magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

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

Open ihor-sviziev opened this issue 6 years ago • 15 comments

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

ihor-sviziev avatar Nov 04 '19 12:11 ihor-sviziev

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

  • [x] Summary of the issue
  • [x] Information on your environment
  • [x] Steps to reproduce
  • [x] 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?

  • [x] yes
  • [ ] no

m2-assistant[bot] avatar Nov 04 '19 12:11 m2-assistant[bot]

@magento give me 2.3-develop instance

ihor-sviziev avatar Nov 04 '19 12:11 ihor-sviziev

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

magento-engcom-team avatar Nov 04 '19 12:11 magento-engcom-team

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.

magento-engcom-team avatar Nov 04 '19 12:11 magento-engcom-team

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: :point_down:

  • [ ] 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.

m2-assistant[bot] avatar Nov 05 '19 09:11 m2-assistant[bot]

:white_check_mark: 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.

magento-engcom-team avatar Nov 05 '19 10:11 magento-engcom-team

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?

ihor-sviziev avatar Nov 07 '19 10:11 ihor-sviziev

@magento-engcom-team give me 2.2.10 instance

caitlinmekita avatar Nov 21 '19 15:11 caitlinmekita

Hi @caitlinmekita. Thank you for your request. Unfortunately, I can only deploy instances for 2.3 release line

magento-engcom-team avatar Nov 21 '19 15:11 magento-engcom-team

@magento add to contributors team

sagar-vasani avatar Oct 09 '20 14:10 sagar-vasani

Hi @sagar-vasani! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.

m2-assistant[bot] avatar Oct 09 '20 14:10 m2-assistant[bot]

@magento I am working on it

sagar-vasani avatar Oct 09 '20 14:10 sagar-vasani

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.

engcom-Bravo avatar Jun 17 '25 09:06 engcom-Bravo

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

github-jira-sync-bot avatar Jun 17 '25 09:06 github-jira-sync-bot

:white_check_mark: 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.

m2-assistant[bot] avatar Jun 17 '25 09:06 m2-assistant[bot]