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

Delete product in cart when we set zero qty and submit with Enter key #607

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

boherm
Copy link
Member

@boherm boherm commented Mar 8, 2024

Questions Answers
Description? After tests review for #600 (review),
we need to delete the product in cart when we set zero and type Enter to submit.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Not yet.
Sponsor company PrestaShop SA
How to test? See @florine2623 review in #600 (review)

--

Additional info issue from the release tests

Screen.Recording.2024-02-23.at.14.17.14.mov

@@ -64,7 +64,18 @@ const useQuantityInput: Theme.QuantityInput.Function = (
}

if (event.key === ENTER_KEY) {
updateQuantity(qtyInputGroup, 1);
if (qtyInput.value === '0') {
const targetItem = qtyInput.closest('.cart__item');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should introduce a new entry in the selector-map 🤔
https://github.com/PrestaShop/hummingbird/blob/develop/src/js/constants/selectors-map.ts

Copy link
Contributor

@matthieu-rolland matthieu-rolland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except the selector to be added to the dedicated file as @kpodemski suggested 👍

@boherm boherm force-pushed the fix-zero-qty-in-cart branch from b7a3545 to 6ec8f3d Compare March 13, 2024 13:47
@florine2623 florine2623 self-assigned this Mar 14, 2024
Copy link

@florine2623 florine2623 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @boherm ,

Works like a charm !

Screen.Recording.2024-03-14.at.16.40.51.mov

It is QA ✅ !

@nicosomb nicosomb added this to the Beta milestone Mar 15, 2024
@nicosomb nicosomb merged commit 4e202d9 into PrestaShop:develop Mar 15, 2024
6 checks passed
@boherm boherm deleted the fix-zero-qty-in-cart branch March 15, 2024 09:52
@pawelkierklo
Copy link
Contributor

No loading animation when Enter is pressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants