magento2
magento2 copied to clipboard
Magento REST API returns not existing SKU when custom option was set
Preconditions (*)
- Magento 2.3.2 or 2.3-develop
Steps to reproduce (*)
-
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

-
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

-
Go to Frontend, add to cart two these products
-
Get information about quote via REST API
-
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 (*)
- 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 (*)
- You're having not real product SKU, but added all custom options
sku: "Simple-1-Red" sku: "Configurable 2-a-Red"

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
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@magento give me 2.3-develop instance
Hi @ihor-sviziev. Thank you for your request. I'm working on Magento 2.3-develop instance for you
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.
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).
Details
If the issue has a valid description, the labelIssue: Format is validwill be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is validappears. -
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Descriptionlabel to the issue by yourself. -
[ ] 3. Add
Component: XXXXXlabel(s) to the ticket, indicating the components it may be related to. -
[ ] 4. Verify that the issue is reproducible on
2.3-developbranchDetails
- Add the comment@magento give me 2.3-develop instanceto deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.3-developbranch, please, add the labelReproduced 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: Confirmedonce verification is complete. -
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
: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.
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:
-
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.
-
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?
@magento-engcom-team give me 2.2.10 instance
Hi @caitlinmekita. Thank you for your request.
Unfortunately, I can only deploy instances for 2.3 release line
@magento add to contributors team
Hi @sagar-vasani! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.
@magento I am working on it
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.
we are having not real product SKU, but added all custom options.Hence Confirming the issue.
Thanks.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-14966 is successfully created for this GitHub issue.
: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.