Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ihor-sviziev opened this issue Nov 4, 2019 · 12 comments · May be fixed by #30667
Open

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

ihor-sviziev opened this issue Nov 4, 2019 · 12 comments · May be fixed by #30667
Assignees
Labels
CD Issue recommended for the contribution day Component: Catalog Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: PR in progress Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Milestone

Comments

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Nov 4, 2019

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

@m2-assistant
Copy link

m2-assistant bot commented Nov 4, 2019

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

Sorry, something went wrong.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 4, 2019
@ihor-sviziev
Copy link
Contributor Author

@magento give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
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.

@engcom-Charlie engcom-Charlie self-assigned this Nov 5, 2019
@m2-assistant
Copy link

m2-assistant bot commented Nov 5, 2019

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.

Sorry, something went wrong.

@engcom-Charlie engcom-Charlie added Component: Catalog Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Nov 5, 2019
@ghost ghost unassigned engcom-Charlie Nov 5, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Nov 5, 2019
@magento-engcom-team
Copy link
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
Copy link
Contributor Author

ihor-sviziev commented Nov 7, 2019

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?

@caitlinmekita
Copy link

@magento-engcom-team give me 2.2.10 instance

@magento-engcom-team
Copy link
Contributor

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

@ihor-sviziev ihor-sviziev added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Jul 30, 2020
@sdzhepa sdzhepa added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Aug 4, 2020
@gabrieldagama gabrieldagama added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Sep 22, 2020
@gabrieldagama gabrieldagama added this to the 2.5 milestone Sep 22, 2020
@sivaschenko sivaschenko added the CD Issue recommended for the contribution day label Oct 7, 2020
@sagar-vasani
Copy link

@magento add to contributors team

@m2-assistant
Copy link

m2-assistant bot commented Oct 9, 2020

Hi @sagar-vasani! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@sagar-vasani
Copy link

@magento I am working on it

@engcom-Hotel engcom-Hotel added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch and removed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Oct 27, 2020
@ghost ghost unassigned sagar-vasani Oct 27, 2020
@ghost ghost assigned engcom-Hotel Oct 27, 2020
@ghost ghost added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. and removed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Oct 27, 2020
@gabrieldagama gabrieldagama added WIP Work In Progress and removed WIP Work In Progress labels Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CD Issue recommended for the contribution day Component: Catalog Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: PR in progress Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
9 participants