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

Reset quantity value to min value after adding to cart #11661

Merged
merged 2 commits into from Dec 20, 2018

Conversation

jolelievre
Copy link
Contributor

@jolelievre jolelievre commented Dec 7, 2018

Questions Answers
Branch? develop
Description? Reset quantity value to min value after adding to cart
Type? improvement
Category? FO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #9743
How to test? Add a product to your cart after changing the quantity, preferably one which has a min quantity superior to 1, and at the best with some discount depending on the quantity. After the product is added to the cart the quantity field is automatically updated to "min value" and the promotion is no longer visible.

This change is Reviewable

@jolelievre jolelievre added this to the 1.7.6.0 milestone Dec 7, 2018
@prestonBot prestonBot added develop Branch Improvement Type: Improvement labels Dec 7, 2018
themes/_core/js/product.js Outdated Show resolved Hide resolved
return;
}
const $productActions = $('.product-actions');
const $quantityWantedInput = $productActions.find('#quantity_wanted:first');
Copy link
Contributor

Choose a reason for hiding this comment

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

#quantity_wanted:first it's an idea, you don't need to add :first and select it from .product-actions, you need to fix the duplicate id :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually simply copied the existing code, but indeed the :first is useless since there is only one element with this id. I corrected it in other places as well.

Copy link
Contributor

@PierreRambaud PierreRambaud left a comment

Choose a reason for hiding this comment

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

Wrong selectors

PierreRambaud
PierreRambaud previously approved these changes Dec 10, 2018
Copy link
Contributor

@PierreRambaud PierreRambaud left a comment

Choose a reason for hiding this comment

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

❤️

@marionf marionf self-assigned this Dec 14, 2018
@marionf
Copy link
Contributor

marionf commented Dec 17, 2018

@jolelievre I see changes requested but the issue is in to be tested column, is it ready for QA or you need to make changes ?

@jolelievre
Copy link
Contributor Author

Yes, changes have been merged in the meantime. I think it's safer if I rebase it before testing.

@marionf marionf added Waiting for QA Status: action required, waiting for test feedback QA ✔️ Status: check done, code approved and removed Waiting for QA Status: action required, waiting for test feedback labels Dec 19, 2018
@marionf marionf removed their assignment Dec 19, 2018
@Quetzacoalt91 Quetzacoalt91 merged commit 2160d12 into PrestaShop:develop Dec 20, 2018
@jolelievre jolelievre deleted the reset-quantity branch July 12, 2019 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
develop Branch Improvement Type: Improvement QA ✔️ Status: check done, code approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants