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

Quantity change of Cart-Item clears Cart #22137

Closed
akimo opened this issue Apr 3, 2019 · 26 comments
Closed

Quantity change of Cart-Item clears Cart #22137

akimo opened this issue Apr 3, 2019 · 26 comments
Assignees
Labels
Event: cdkyiv2019 Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@akimo
Copy link

akimo commented Apr 3, 2019

Preconditions (*)

  1. Magento Version 2.3.1
  2. PHP 7.2

Upgraded from 2.3.0 - version without this issue

Steps to reproduce (*)

  1. Put something in the cart
  2. go to cart page
  3. change the Quantity of a Cart Item
  4. Press "Return" Key

This is reproducible, also when removing client storage and cookies. As Guest or Logged in Customer.

Expected result (*)

The cart-page should be reloaded with the modified quantities of items.

Actual result (*)

Your Cart is empty and a Message is displayed, which tells you that you don't have any items in your cart.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Apr 3, 2019
@m2-assistant
Copy link

m2-assistant bot commented Apr 3, 2019

Hi @akimo. 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-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

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

@akimo do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@akimo
Copy link
Author

akimo commented Apr 3, 2019

@magento-engcom-team give me 2.3.1 instance

@magento-engcom-team
Copy link
Contributor

Hi @akimo. Thank you for your request. I'm working on Magento 2.3.1 instance for you

@magento-engcom-team
Copy link
Contributor

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

@akimo
Copy link
Author

akimo commented Apr 3, 2019

@magento-engcom-team Yes, i can confirm that the bug is reproducible on the vanilla Magento instance

@akimo
Copy link
Author

akimo commented Apr 3, 2019

Reason: The "return" key invokes the submit action of the Form. The "submit" action is bound to the Button "Clear Shopping Cart".

@shikhamis11 shikhamis11 self-assigned this Apr 3, 2019
@m2-assistant
Copy link

m2-assistant bot commented Apr 3, 2019

Hi @shikhamis11. 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-engcom-team 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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

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

@shikhamis11
Copy link
Member

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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

@shikhamis11
Copy link
Member

@akimo I am not able to reproduce this issue based on provided steps on current magento 2.3-develop instance let me know if it requires any additional step to reproduce the issue

@akimo
Copy link
Author

akimo commented Apr 11, 2019

This issue is new in 2.3.1 and not present in 2.3.0 (I don't know which version "2.3-develop" is based on). You need to press the return key while the cursor is still in the quantity field.
The Problem is caused by the Button "Clear Shopping Cart" which is of type="submit". If you press return the form will perform a "submit".

@chichitsai0517
Copy link

I have exactly the same issue! I installed a fresh copy of Magento 2.3.1 with sample data just to test and like you mentioned, the cart empties after hitting the "ENTER" key.
I would really love to find a way to fix this!

@m2-assistant
Copy link

m2-assistant bot commented Apr 12, 2019

Hi @engcom-backlog-nazar. 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-engcom-team 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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

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

@Mobecls
Copy link
Contributor

Mobecls commented Apr 13, 2019

@magento-engcom-team give me 2.3-develop instance

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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

@Mobecls
Copy link
Contributor

Mobecls commented Apr 13, 2019

@akimo - wasn't able to reproduce it neither on 2.3-develop, nor on 2.3.1 latest official release.

  1. Added product to a cart (10 pcs)
  2. Proceeded to a cart page
  3. changed product qty to 5 and hit "update shopping cart"
  4. clicked on browser Return button (verified on latest Chrome and Safari on Mac).

The shopping cart had 5pcs (no products were flushed from a cart)...

@Mobecls Mobecls added Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Event: cdkyiv2019 labels Apr 13, 2019
@chichitsai0517
Copy link

Hi, this is weird. Is this 2.3.1? I have a website upgraded from 2.2.6 to 2.3.1 that does that. So I installed a fresh copy of the magento 2.3.1 with sample data and it also does the same. Am I able to message someone with the the cpanel and admin credentials to see?

@Mobecls
Copy link
Contributor

Mobecls commented Apr 13, 2019

@chichitsai0517 please, see if you can reproduce it here - https://i-22137-2-3-develop.instances.magento-community.engineering it's still up and running.

@chichitsai0517
Copy link

Hi Mobecls, I tried on yours and it does not do the same as mine. I don't understand because my test website has no extensions and no themes. It is the original 2.3.1 with sample data.

@Mobecls
Copy link
Contributor

Mobecls commented Apr 13, 2019

@chichitsai0517 - that's our latest environment, so if it is not getting reproduced there - it's either an environment issue. If you don't have any additional info on how to reproduce it here - please, close the issue.

@chichitsai0517
Copy link

Do you think this is a PHP Version issue? I just checked on my hosting account and they only have PHP 7.1.27 or 7.2.16.
I am using PHP 7.2.16.
However on Magento 2.3.X Stack technology requirements, it says that we should be using PHP 7.2.11

@hostep
Copy link
Contributor

hostep commented Apr 14, 2019

I can very easily reproduce this as well on a vanilla Magento 2.3.1 installed using composer. This isn't an environment issue.
@Mobecls: your steps to reproduce are incorrect. You shouldn't press the Update Shopping Cart button, you should simply increase the qty of an item in the cart and then press the enter/return key while the focus of your cursor is still in the qty field to confirm the change.

@hostep
Copy link
Contributor

hostep commented Apr 14, 2019

This is fixed in 2.3-develop however, and I've found a PR which fixes it: #21509

So we can close this issue, since it duplicates #21499 and was fixed by #21509 and the fix should get released in Magento 2.3.2 & 2.2.9.

@lupoiuAlinN
Copy link

If you still have this issue you have to know that on a html form the first element witch has type submit on it will be called when "enter" is hit. So in magento the first element on the form with type submit is the clear button. To solve this issue you can modify the order of the buttons in Magento_Checkout/templates/cart/form.phtml ( put update button before clear button)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Event: cdkyiv2019 Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

7 participants