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
Attribute related changes #2467
Attribute related changes #2467
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2467 +/- ##
==========================================
+ Coverage 88.20% 88.22% +0.02%
==========================================
Files 860 862 +2
Lines 38651 38820 +169
Branches 5000 5021 +21
==========================================
+ Hits 34092 34250 +158
- Misses 3421 3427 +6
- Partials 1138 1143 +5
Continue to review full report at Codecov.
|
0d8848a
to
80292f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Add the max_choices field in the base form part
You can show/hide it according to the user selection. Add some JS to the template to do it.
2. Use a different icon (maybe fa-list-ol
) for the Choice Options and rename it to Choices
3. Add some buttons to add and remove forms this way, better user experience.
39fe456
to
8594221
Compare
- Admin: New type of attribute: CHOICES - Admin: Selection of multiple choices from attribute for product - Front: Product filter by attribute choices
8594221
to
fcd9838
Compare
fcd9838
to
540f16a
Compare
shuup/utils/fields.py
Outdated
value = super().clean(value) | ||
if self.min_limit is not None and len(value) < self.min_limit: | ||
ending = "" if self.min_limit % 10 == 1 else "s" | ||
raise forms.ValidationError(f"You can't select less than {self.min_limit} item{ending}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use pluralization https://docs.djangoproject.com/en/3.2/topics/i18n/translation/#pluralization
3211e9f
to
8cb3ceb
Compare
8cb3ceb
to
5f91d63
Compare
Added