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

Disable Customer group selection checkbox when single customer is set… #16088

Merged
merged 1 commit into from Oct 31, 2019

Conversation

@atomiix
Copy link
Contributor

atomiix commented Oct 23, 2019

Questions Answers
Branch? develop
Description? Disable Customer group selection checkbox when single customer is set and disable single customer field when Customer group selection is checked
Type? improvement
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #15938
How to test? In Sell > Catalog > Discounts, add a new Cart Rule, in conditions, set a single customer: Customer group selection checkbox should be disabled. Remove single customer, check Customer group selection: single customer field should be disabled

This change is Reviewable

@atomiix atomiix requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 23, 2019
@Robin-Fischer-PS Robin-Fischer-PS self-assigned this Oct 25, 2019
@Robin-Fischer-PS

This comment has been minimized.

Copy link

Robin-Fischer-PS commented Oct 25, 2019

Hi @atomiix ,

I've detected a defect on your fix :
When editing a cart rule (which was previously set to single customer or to customer group), the other choice (customer group or single customer) is no longer disabled.
So it's still possible to select both single customer and customer group when editing.

Here you can find a screen record of the workflow :
https://drive.google.com/file/d/1t0fhSfpkX2rBlrFmh8ZdTB4TNu_YZNWb/view?usp=sharing

Thanks :)

@matks matks added this to the 1.7.7.0 milestone Oct 28, 2019
}).change();

$('#customerFilter').on('change keyup', function() {
$('#group_restriction').prop('disabled', $(this).val() !== "");

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Oct 28, 2019

Contributor
Suggested change
$('#group_restriction').prop('disabled', $(this).val() !== "");
$('#group_restriction').prop('disabled', $(this).val() !== '');
@atomiix atomiix force-pushed the atomiix:fix-cart-rule-conflict branch from 407c7ab to caa2575 Oct 29, 2019
@atomiix atomiix force-pushed the atomiix:fix-cart-rule-conflict branch from caa2575 to b996178 Oct 31, 2019
@matks
matks approved these changes Oct 31, 2019
@matks

This comment has been minimized.

Copy link
Contributor

matks commented Oct 31, 2019

Thank you @atomiix

@matks matks merged commit 378bd21 into PrestaShop:develop Oct 31, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@atomiix atomiix deleted the atomiix:fix-cart-rule-conflict branch Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.