global discount price
This commit is contained in:
@@ -214,6 +214,8 @@ admin-discounts-desc = Set discounted product prices. A discount shows up as a s
|
||||
business-discount-desc = A baseline discount for all business accounts (off the regular price). Profiles and negotiated prices apply on top (lowest price wins).
|
||||
audience-personal = Personal
|
||||
audience-business = Business
|
||||
apply-profiles-personal-hint = These profiles lower the public price for all customers.
|
||||
apply-profiles-business-hint = These profiles lower the price for all business accounts. Businesses always get the lower of the personal and business price.
|
||||
on-sale = On sale
|
||||
no-discount = No discount
|
||||
discount = Discount
|
||||
|
||||
@@ -214,6 +214,8 @@ admin-discounts-desc = Nastavte zľavnené ceny produktov. Zľava sa v obchode z
|
||||
business-discount-desc = Základná zľava pre všetky firemné účty (z bežnej ceny). Profily a dohodnuté ceny sa uplatnia navyše (platí najnižšia cena).
|
||||
audience-personal = Osobné
|
||||
audience-business = Firemné
|
||||
apply-profiles-personal-hint = Tieto profily znížia verejnú cenu pre všetkých zákazníkov.
|
||||
apply-profiles-business-hint = Tieto profily znížia cenu pre všetky firemné účty. Firmy vždy dostanú nižšiu z osobnej a firemnej ceny.
|
||||
on-sale = V akcii
|
||||
no-discount = Bez zľavy
|
||||
discount = Zľava
|
||||
|
||||
@@ -27,6 +27,33 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- discount profiles applied to this audience -->
|
||||
<section class="mt-4 rounded-radius border border-outline bg-surface p-6 dark:border-outline-dark dark:bg-surface-dark-alt">
|
||||
<h2 class="text-lg font-semibold text-on-surface-strong dark:text-on-surface-dark-strong">{{ t(key="discount-profiles", lang=lang | default(value='sk')) }}</h2>
|
||||
<p class="mt-1 text-sm text-on-surface/70 dark:text-on-surface-dark/70">
|
||||
{% if business %}{{ t(key="apply-profiles-business-hint", lang=lang | default(value='sk')) }}{% else %}{{ t(key="apply-profiles-personal-hint", lang=lang | default(value='sk')) }}{% endif %}
|
||||
</p>
|
||||
{% if profiles | length > 0 %}
|
||||
<form method="post" action="/admin/catalog/discounts/profiles?audience={{ audience }}" class="mt-3 space-y-3">
|
||||
{{ ui::csrf_field() }}
|
||||
<div class="grid gap-2 sm:grid-cols-2">
|
||||
{% for profile in profiles %}
|
||||
<label class="flex items-center gap-2 text-sm text-on-surface dark:text-on-surface-dark">
|
||||
<input type="checkbox" name="profile_ids" value="{{ profile.id }}" {% if profile.assigned %}checked{% endif %}>
|
||||
<span>{{ profile.name }} <span class="text-on-surface/60 dark:text-on-surface-dark/60">(−{{ profile.percent }}%, {% if profile.scope_type == "all_except" %}{{ t(key="scope-all-except", lang=lang | default(value='sk')) }}{% else %}{{ t(key="scope-include", lang=lang | default(value='sk')) }}{% endif %})</span></span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{{ ui::button(label=t(key="save", lang=lang | default(value='sk')), type="submit", size="px-4 py-2 text-sm") }}
|
||||
</form>
|
||||
{% else %}
|
||||
<p class="mt-2 text-sm text-on-surface/70 dark:text-on-surface-dark/70">
|
||||
{{ t(key="admin-no-profiles", lang=lang | default(value='sk')) }}
|
||||
<a href="/admin/catalog/discount-profiles/new" class="text-primary dark:text-primary-dark">{{ t(key="new-profile", lang=lang | default(value='sk')) }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<div class="mt-4 {{ ui::table_wrap_cls() }}">
|
||||
{% if products | length > 0 %}
|
||||
<table class="{{ ui::table_cls() }}">
|
||||
|
||||
Reference in New Issue
Block a user