magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.56k stars 9.32k forks source link

Wishlist: Issue while configurable product added to the wishlist and then adding them into the cart. #38497

Open gitgitmunassir opened 8 months ago

gitgitmunassir commented 8 months ago

Preconditions and environment

Steps to reproduce

Expected result

Expected Result should be:

To add a configurable product to the wishlist, it is important to ensure that all the necessary options are selected. This will save the required options for that specific product, and when it is added to the cart, it will be added smoothly without any issues.

Actual result

Actual Result:

When adding a configurable product to the wishlist, it is added without prompting for options. When attempting to add the product, a validation message is displayed because for adding configurable products to the cart we need super_attributes

$params = ['super_attribute'][
     'option1' => 'value',
     'option2' => 'value'
];
$params = new DataObject($params);
$session = $this->checkoutSession->create();
$quote = $session->getQuote();
$quote->addProduct($product, $params);

Screenshot from 2024-03-08 15-14-56

Additional information

Suggestion for the fix:

We can ask for the options for the configurable product while adding it to the wishlist.

                                      OR

We can ask the same while adding the product to the cart from the wishlist.

Release note

No response

Triage and priority

m2-assistant[bot] commented 8 months ago

Hi @gitgitmunassir. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 8 months ago

Hi @engcom-Bravo. 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:

engcom-Bravo commented 8 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 8 months ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 8 months ago

Hi @engcom-Bravo, here is your Magento Instance: https://5c987a43e69fd9f91a455d703bbc5eae.instances-prod.magento-community.engineering Admin access: https://5c987a43e69fd9f91a455d703bbc5eae.instances-prod.magento-community.engineering/admin_551b Login: 4910a475 Password: 41a0914037cb

engcom-Bravo commented 8 months ago

Hi @gitgitmunassir,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

Screenshot from 2024-03-11 11-26-20

We are getting proper validation message as "You need to choose options for your item for - product".

Kindly recheck the issue in Latest Magento 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

gitgitmunassir commented 8 months ago

Hello @engcom-Bravo thanks for your response,

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.

This is not an issue but the magento should need an update for the same as given below:

It is essential to validate and ask for the configurable options of a product while adding it to the wishlist. The product should be added to the wishlist with the selected configurable options. Alternatively, we can also ask for the configurable options while adding the product to the cart from the wishlist. Without asking for the configurable options, adding a configurable product to the wishlist would not be useful.

I hope this helps clarify the issue. Let me know if you have any further questions or concerns.

Thanks

engcom-Bravo commented 8 months ago

Hi @gitgitmunassir,

Thanks for your response.

We agreed with your response.There should be a validation while adding configurable product to wishlist and this is good feature to have.Hence Marking this as a feature request to proceed further.

Thanks.