Compare commits

..

5 Commits

Author SHA1 Message Date
Mira Weller
80958fd95a Fix conditional display of cross_selling_match_products 2024-10-31 14:46:28 +01:00
Raphael Michel
fc3b186b93 Badge export: Allow to filter and sort by order date (Z#23168742) (#4588) 2024-10-31 14:42:44 +01:00
Tinna Sandström
a406884575 Translations: Update Swedish
Currently translated at 98.3% (5679 of 5774 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/sv/

powered by weblate
2024-10-31 13:02:34 +01:00
Anarion Dunedain
57ccd5f289 Translations: Update Polish
Currently translated at 100.0% (5774 of 5774 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/pl/

powered by weblate
2024-10-31 13:02:34 +01:00
Mira
f4ac7e7f65 Add warning that cross-selling can't prevent unwanted combinations (#4596)
* Add warning that cross-selling can't prevent unwanted combinations

* Update src/pretix/control/templates/pretixcontrol/items/category.html

Co-authored-by: Raphael Michel <michel@rami.io>

---------

Co-authored-by: Raphael Michel <michel@rami.io>
2024-10-31 12:59:28 +01:00
5 changed files with 108 additions and 78 deletions

View File

@@ -16,9 +16,21 @@
{% bootstrap_field form.internal_name layout="control" %}
</div>
{% bootstrap_field form.description layout="control" %}
{% bootstrap_field form.category_type layout="control" horizontal_field_class="big-radio-wrapper col-lg-9" %}
{% bootstrap_field form.cross_selling_condition layout="control" horizontal_field_class="col-lg-9" %}
{% bootstrap_field form.cross_selling_match_products layout="control" %}
{% bootstrap_field form.category_type layout="control" horizontal_field_class="big-radio-wrapper col-md-9" %}
<div class="row" data-display-dependency="#id_category_type_2">
<div class="col-md-offset-3 col-md-9">
<div class="alert alert-info">
{% blocktrans trimmed %}
Please note that cross-selling categories are intended as a marketing feature and are not
suitable for strictly ensuring that products are only available in certain combinations.
{% endblocktrans %}
</div>
</div>
</div>
<div data-display-dependency="#id_category_type_2,#id_category_type_3">
{% bootstrap_field form.cross_selling_condition layout="control" horizontal_field_class="col-md-9" %}
{% bootstrap_field form.cross_selling_match_products layout="control" %}
</div>
</fieldset>
</div>
{% if category %}

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-29 08:53+0000\n"
"PO-Revision-Date: 2024-09-27 18:00+0000\n"
"PO-Revision-Date: 2024-10-29 21:00+0000\n"
"Last-Translator: Anarion Dunedain <anarion80@gmail.com>\n"
"Language-Team: Polish <https://translate.pretix.eu/projects/pretix/pretix/pl/"
">\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Generator: Weblate 5.8.1\n"
#: pretix/_base_settings.py:79
msgid "English"
@@ -4606,43 +4606,40 @@ msgstr ""
#: pretix/base/models/items.py:114 pretix/base/models/items.py:159
#: pretix/control/forms/item.py:99
#, fuzzy
#| msgid "No category"
msgid "Normal category"
msgstr "Brak kategorii"
msgstr "Normalna kategoria"
#: pretix/base/models/items.py:115 pretix/control/forms/item.py:112
msgid "Normal + cross-selling category"
msgstr ""
msgstr "Normalna + sprzedaż krzyżowa"
#: pretix/base/models/items.py:116 pretix/control/forms/item.py:107
#, fuzzy
#| msgid "No category"
msgid "Cross-selling category"
msgstr "Brak kategorii"
msgstr "Kategoria sprzedaży krzyżowej"
#: pretix/base/models/items.py:124
msgid "Always show in cross-selling step"
msgstr ""
msgstr "Zawsze pokazuj w kroku sprzedaży krzyżowej"
#: pretix/base/models/items.py:125
msgid ""
"Only show products that qualify for a discount according to discount rules"
msgstr ""
"Pokaż tylko produkty kwalifikujące się do zniżki zgodnie z zasadami "
"rabatowymi"
#: pretix/base/models/items.py:126
msgid "Only show if the cart contains one of the following products"
msgstr ""
"Pokaż tylko, jeśli w koszyku znajduje się jeden z następujących produktów"
#: pretix/base/models/items.py:129
msgid "Cross-selling condition"
msgstr ""
msgstr "Warunek sprzedaży krzyżowej"
#: pretix/base/models/items.py:137
#, fuzzy
#| msgid "Count add-on products"
msgid "Cross-selling condition products"
msgstr "Policz produkty dodatkowe"
msgstr "Produkty warunkowej sprzedaży krzyżowej"
#: pretix/base/models/items.py:143
#: pretix/control/templates/pretixcontrol/items/categories.html:3
@@ -4654,13 +4651,11 @@ msgstr "Kategorie produktów"
#: pretix/base/models/items.py:149
#, python-brace-format
msgid "{category} ({category_type})"
msgstr ""
msgstr "{category} ({category_type})"
#: pretix/base/models/items.py:155
#, fuzzy
#| msgid "No category"
msgid "Add-on category"
msgstr "Brak kategorii"
msgstr "Kategoria dodatków"
#: pretix/base/models/items.py:222 pretix/base/models/items.py:278
msgid "Disable product for this date"
@@ -6023,10 +6018,8 @@ msgid "Ticket"
msgstr "Bilet"
#: pretix/base/models/orders.py:3405
#, fuzzy
#| msgid "Verification"
msgid "Certificate"
msgstr "Weryfikacja"
msgstr "Certyfikat"
#: pretix/base/models/orders.py:3406 pretix/control/views/event.py:367
#: pretix/control/views/event.py:372
@@ -6192,11 +6185,13 @@ msgstr ""
#, python-brace-format
msgid "Seat with zone {zone}, row {row}, and number {number} has no seat ID."
msgstr ""
"Miejsce w strefie {zone}, rzędzie {row} i numerze {number} nie ma "
"identyfikatora miejsca."
#: pretix/base/models/seating.py:71
#, python-brace-format
msgid "Multiple seats have the same ID: {id}"
msgstr ""
msgstr "Wiele miejsc ma ten sam identyfikator: {id}"
#: pretix/base/models/seating.py:199
#, python-brace-format
@@ -9044,10 +9039,8 @@ msgid "Ask for beneficiary"
msgstr "Zapytaj o beneficjenta"
#: pretix/base/settings.py:574
#, fuzzy
#| msgid "Custom recipient field"
msgid "Custom recipient field label"
msgstr "Niestandardowe pole odbiorcy"
msgstr "Etykieta pola niestandardowego odbiorcy"
#: pretix/base/settings.py:576
msgid ""
@@ -9064,10 +9057,8 @@ msgstr ""
"ona wyświetlana na fakturze poniżej nagłówka. Pole nie będzie wymagane."
#: pretix/base/settings.py:589
#, fuzzy
#| msgid "Custom recipient field"
msgid "Custom recipient field help text"
msgstr "Niestandardowe pole odbiorcy"
msgstr "Tekst pomocy dotyczący pola odbiorcy niestandardowego"
#: pretix/base/settings.py:591
msgid ""
@@ -9075,6 +9066,8 @@ msgid ""
"will be displayed underneath the field. It will not be displayed on the "
"invoice."
msgstr ""
"Jeśli używasz niestandardowego pola odbiorcy, możesz określić tekst pomocy, "
"który będzie wyświetlany pod polem. Nie będzie on wyświetlany na fakturze."
#: pretix/base/settings.py:601
msgid "Ask for VAT ID"
@@ -12512,12 +12505,9 @@ msgstr ""
"zakończenia przedsprzedaży"
#: pretix/base/timeline.py:106
#, fuzzy
#| msgctxt "timeline"
#| msgid "Customers can no longer modify their orders"
msgctxt "timeline"
msgid "Customers can no longer modify their order information"
msgstr "Klienci nie mogą już modyfikować swoich zamówień"
msgstr "Klienci nie mogą już modyfikować swojego zamówienia"
#: pretix/base/timeline.py:119
msgctxt "timeline"
@@ -12540,9 +12530,6 @@ msgid "Customers can no longer cancel paid orders"
msgstr "Klienci nie mogą już anulować opłaconych zamówień"
#: pretix/base/timeline.py:167
#, fuzzy
#| msgctxt "timeline"
#| msgid "Customers can no longer modify their orders"
msgctxt "timeline"
msgid "Customers can no longer make changes to their orders"
msgstr "Klienci nie mogą już modyfikować swoich zamówień"
@@ -14088,31 +14075,30 @@ msgstr ""
"wtyczki. Będzie on publicznie dostępny. Upewnij się, że jest on aktualny!"
#: pretix/control/forms/item.py:100
#, fuzzy
#| msgid "Products in this category are add-on products"
msgid ""
"Products in this category are regular products displayed on the front page."
msgstr "Produkty w tej kategorii są dodatkami"
msgstr ""
"Produkty w tej kategorii to zwykłe produkty wyświetlane na stronie głównej."
#: pretix/control/forms/item.py:103
#, fuzzy
#| msgid "Product category"
msgid "Add-on product category"
msgstr "Kategoria produku"
msgstr "Kategoria produktu dodatkowego"
#: pretix/control/forms/item.py:104
#, fuzzy
#| msgid "Products in this category are add-on products"
msgid ""
"Products in this category are add-on products and can only be bought as add-"
"ons."
msgstr "Produkty w tej kategorii są dodatkami"
msgstr ""
"Produkty w tej kategorii są produktami dodatkowymi i można je kupić "
"wyłącznie jako dodatki."
#: pretix/control/forms/item.py:108
msgid ""
"Products in this category are regular products, but are only shown in the "
"cross-selling step, according to the configuration below."
msgstr ""
"Produkty w tej kategorii to zwykłe produkty, ale są wyświetlane tylko na "
"etapie sprzedaży krzyżowej, zgodnie z konfiguracją poniżej."
#: pretix/control/forms/item.py:113
msgid ""
@@ -14120,6 +14106,9 @@ msgid ""
"but are additionally shown in the cross-selling step, according to the "
"configuration below."
msgstr ""
"Produkty w tej kategorii to zwykłe produkty wyświetlane na stronie głównej, "
"ale są dodatkowo pokazywane na etapie sprzedaży krzyżowej, zgodnie z "
"poniższą konfiguracją."
#: pretix/control/forms/item.py:141 pretix/control/forms/item.py:211
msgid "This field is required"
@@ -16537,12 +16526,9 @@ msgid "The check-in of position #{posid} on list \"{list}\" has been reverted."
msgstr "Zameldowanie pozycji #{posid} na liście \"{list}\" zostało cofnięte."
#: pretix/control/logdisplay.py:644
#, fuzzy, python-brace-format
#| msgid ""
#| "Position #{posid} has been checked in at {datetime} for list \"{list}\"."
#, python-brace-format
msgid "Position #{posid} has been printed at {datetime} with type \"{type}\"."
msgstr ""
"Pozycja #{posid} została zameldowana w {datetime} dla listy \"{list}\"."
msgstr "Pozycja #{posid} została wydrukowana o {datetime} z typem „{type}”."
#: pretix/control/logdisplay.py:667
#, python-brace-format
@@ -17228,6 +17214,9 @@ msgid ""
"check that you have completed all installation steps and your cronjob is "
"executed correctly."
msgstr ""
"Komponent cronjob pretix nie został uruchomiony w ciągu ostatnich godzin. "
"Sprawdź, czy ukończyłeś wszystkie kroki instalacji i czy twój cronjob został "
"wykonany poprawnie."
#: pretix/control/templates/pretixcontrol/base.html:435
msgid ""
@@ -20079,10 +20068,8 @@ msgstr ""
#: pretix/control/templates/pretixcontrol/item/base.html:24
#: pretix/control/templates/pretixcontrol/item/include_variations.html:79
#, fuzzy
#| msgid "Manage questions"
msgid "Manage quotas"
msgstr "Zarządzaj pytaniami"
msgstr "Zarządzaj pulami"
#: pretix/control/templates/pretixcontrol/item/base.html:27
#: pretix/control/templates/pretixcontrol/item/include_variations.html:82
@@ -20455,10 +20442,8 @@ msgid "Create a new category"
msgstr "Utwórz nową kategorię"
#: pretix/control/templates/pretixcontrol/items/categories.html:34
#, fuzzy
#| msgid "Category name"
msgid "Category type"
msgstr "Nazwa kategorii"
msgstr "Typ kategorii"
#: pretix/control/templates/pretixcontrol/items/categories.html:48
#: pretix/control/templates/pretixcontrol/items/discounts.html:138
@@ -25392,6 +25377,8 @@ msgid ""
"According to your event settings, sold out products are hidden from "
"customers. This way, customers will not be able to discover the waiting list."
msgstr ""
"Zgodnie z ustawieniami wydarzenia, wyprzedane produkty są ukryte przed "
"klientami. W ten sposób klienci nie będą mogli znaleźć listy oczekujących."
#: pretix/control/templates/pretixcontrol/waitinglist/index.html:36
msgid "Send vouchers"
@@ -31819,28 +31806,25 @@ msgid ""
"A product in your cart is only sold in combination with add-on products that "
"are no longer available. Please contact the event organizer."
msgstr ""
"Produkt w Twoim koszyku jest sprzedawany tylko w połączeniu z produktami "
"dodatkowymi, które nie są już dostępne. Skontaktuj się z organizatorem "
"wydarzenia."
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:20
msgid "We're now trying to book these add-ons for you!"
msgstr "Staramy się teraz zarezerwować te dodatki dla Ciebie!"
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:28
#, fuzzy
#| msgid "Additional settings"
msgid "Additional options for"
msgstr "Dodatkowe ustawienia"
msgstr "Dodatkowe opcje dla"
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:64
#, fuzzy
#| msgid "Top recommendation"
msgid "More recommendations"
msgstr "Najlepsza rekomendacja"
msgstr "Więcej rekomendacji"
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:71
#, fuzzy
#| msgid "Top recommendation"
msgid "Our recommendations"
msgstr "Najlepsza rekomendacja"
msgstr "Nasze rekomendacje"
#: pretix/presale/templates/pretixpresale/event/checkout_addons.html:89
#: pretix/presale/templates/pretixpresale/event/checkout_confirm.html:201
@@ -32846,10 +32830,8 @@ msgid "Payment pending"
msgstr "W toku płatności"
#: pretix/presale/templates/pretixpresale/event/fragment_product_list.html:19
#, fuzzy
#| msgid "Your orders for {event}"
msgid "Your order qualifies for a discount"
msgstr "Twoje zamówienia na {event}"
msgstr "Twoje zamówienia kwalifikuje się do zniżki"
#: pretix/presale/templates/pretixpresale/event/fragment_product_list.html:28
#: pretix/presale/templates/pretixpresale/event/voucher.html:78
@@ -34390,6 +34372,8 @@ msgid ""
"No ticket types are available for the waiting list, have a look at the "
"ticket shop instead."
msgstr ""
"Nie ma dostępnych typów biletów dla listy oczekujących, zamiast tego należy "
"udać się do sklepu z biletami."
#: pretix/presale/views/waiting.py:137 pretix/presale/views/waiting.py:161
msgid "Waiting lists are disabled for this event."

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-10-29 08:53+0000\n"
"PO-Revision-Date: 2024-09-18 14:02+0000\n"
"PO-Revision-Date: 2024-10-30 19:00+0000\n"
"Last-Translator: Tinna Sandström <tinna@coeo.events>\n"
"Language-Team: Swedish <https://translate.pretix.eu/projects/pretix/pretix/"
"sv/>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Generator: Weblate 5.8.1\n"
#: pretix/_base_settings.py:79
msgid "English"
@@ -22131,7 +22131,7 @@ msgid ""
"After starting this operation, depending on the size of your event, it might "
"take a few minutes or longer until all orders are processed."
msgstr ""
"Efter att du har startat denna operation kan det, beroende på storleken på "
"Efter att du har startat denna process kan det, beroende på storleken på "
"ditt evenemang, ta några minuter eller längre tid innan alla bokningar är "
"behandlade."
@@ -31866,7 +31866,7 @@ msgstr "Ändra kontaktinformation"
#: pretix/presale/templates/pretixpresale/event/checkout_confirm.html:167
msgid "Confirmations"
msgstr "Bekräftelser"
msgstr "Villkor"
#: pretix/presale/templates/pretixpresale/event/checkout_confirm.html:185
msgid ""

View File

@@ -462,14 +462,28 @@ class BadgeExporter(BaseExporter):
)),
('date_from',
forms.DateField(
label=_('Start date'),
label=_('Start event date'),
widget=forms.DateInput(attrs={'class': 'datepickerfield'}),
required=False,
help_text=_('Only include tickets for dates on or after this date.')
)),
('date_to',
forms.DateField(
label=_('End date'),
label=_('End event date'),
widget=forms.DateInput(attrs={'class': 'datepickerfield'}),
required=False,
help_text=_('Only include tickets ordered on or before this date.')
)),
('order_date_from',
forms.DateField(
label=_('Start order date'),
widget=forms.DateInput(attrs={'class': 'datepickerfield'}),
required=False,
help_text=_('Only include tickets ordered on or after this date.')
)),
('order_date_to',
forms.DateField(
label=_('End order date'),
widget=forms.DateInput(attrs={'class': 'datepickerfield'}),
required=False,
help_text=_('Only include tickets for dates on or before this date.')
@@ -481,6 +495,7 @@ class BadgeExporter(BaseExporter):
('name', _('Attendee name')),
('company', _('Attendee company')),
('code', _('Order code')),
('order_date', _('Order date')),
('date', _('Event date')),
] + ([
('name:{}'.format(k), _('Attendee name: {part}').format(part=label))
@@ -533,6 +548,24 @@ class BadgeExporter(BaseExporter):
), self.event.timezone)
qs = qs.filter(Q(subevent__date_from__lt=dt) | Q(subevent__isnull=True, order__event__date_from__lt=dt))
if form_data.get('order_date_from'):
if not isinstance(form_data.get('order_date_from'), date):
form_data['order_date_from'] = dateutil.parser.parse(form_data['order_date_from']).date()
df = make_aware(datetime.combine(
form_data['order_date_from'],
time(hour=0, minute=0, second=0)
), self.event.timezone)
qs = qs.filter(order__datetime__gte=df)
if form_data.get('order_date_to'):
if not isinstance(form_data.get('order_date_to'), date):
form_data['order_date_to'] = dateutil.parser.parse(form_data['order_date_to']).date()
dt = make_aware(datetime.combine(
form_data['order_date_to'] + timedelta(days=1),
time(hour=0, minute=0, second=0)
), self.event.timezone)
qs = qs.filter(order__datetime__lt=dt)
if form_data.get('order_by') == 'name':
qs = qs.annotate(
resolved_name=Case(
@@ -553,6 +586,8 @@ class BadgeExporter(BaseExporter):
).order_by('resolved_company', 'order__code')
elif form_data.get('order_by') == 'code':
qs = qs.order_by('order__code')
elif form_data.get('order_by') == 'order_date':
qs = qs.order_by('order__datetime')
elif form_data.get('order_by') == 'date':
qs = qs.annotate(ed=Coalesce('subevent__date_from', 'order__event__date_from')).order_by('ed', 'order__code')
elif form_data.get('order_by', '').startswith('name:'):

View File

@@ -378,7 +378,6 @@ var form_handlers = function (el) {
dependency = findDependency($(this).attr("data-display-dependency"), this),
update = function (ev) {
var enabled = dependency.toArray().some(function(d) {
if (d.disabled) return false;
if (d.type === 'checkbox' || d.type === 'radio') {
return d.checked;
} else if (d.type === 'select-one') {
@@ -399,7 +398,7 @@ var form_handlers = function (el) {
}
var $toggling = dependent;
if (dependent.attr("data-disable-dependent")) {
$toggling.attr('disabled', !enabled).trigger("change");
$toggling.attr('disabled', !enabled);
}
if (dependent.get(0).tagName.toLowerCase() !== "div") {
$toggling = dependent.closest('.form-group');