93 lines
5.7 KiB
YAML
93 lines
5.7 KiB
YAML
generator:
|
|
class: stAdminGenerator
|
|
|
|
param:
|
|
product_model_class: Product
|
|
|
|
documentation:
|
|
pl: https://www.sote.pl/docs/rabaty
|
|
en: https://www.soteshop.com/docs/discounts
|
|
|
|
custom_actions:
|
|
list: [product]
|
|
|
|
model_class: DiscountCouponCode
|
|
|
|
theme: simple
|
|
|
|
head:
|
|
package: stDiscountPlugin
|
|
|
|
edit:
|
|
i18n: stDiscountBackend
|
|
title: Edycja kodu rabatowego
|
|
description: Zarządzanie rabatami w sklepie
|
|
menu:
|
|
display: [product]
|
|
fields:
|
|
product: {name: Przypisz produkty, action: "@stDiscountCouponCodeBackend?action=productList&discount_coupon_code_id=%%id%%", i18n: stDiscountBackend}
|
|
display:
|
|
"NONE": [code, _discount, valid_usage, valid_from, valid_to, allow_all_products]
|
|
"Kategorie i producenci": [_discount_coupon_code_categories, _discount_coupon_code_producers]
|
|
fields:
|
|
code: {name: Kod, params: maxlength=16, i18n: stDiscountBackend}
|
|
valid_usage: {name: Limit użyć, help: Wartość 0 oznacza brak limitu, i18n: stDiscountBackend}
|
|
valid_from: {name: Ważny od, help: Puste pole oznacza brak progu, i18n: stDiscountBackend}
|
|
valid_to: {name: Ważny do, help: Puste pole oznacza brak progu, i18n: stDiscountBackend}
|
|
discount: {name: Rabat, i18n: stDiscountBackend}
|
|
discount_coupon_code_categories: {name: Kategorie, i18n: stCategory}
|
|
discount_coupon_code_producers: {name: Producenci, i18n: stProducer}
|
|
allow_all_products: {name: Dla wszystkich produktów, required: false, help: Jeśli zaznaczone rabat będzie pokazywany dla wszystkich produktów w sklepie, params: class=all_products, i18n: stDiscountBackend}
|
|
actions:
|
|
_list: {name: Kody rabatowe, i18n: stDiscountBackend}
|
|
_save: {name: Zapisz}
|
|
_save_and_add: {name: Zapisz i dodaj nowy}
|
|
_delete: {name: Usuń}
|
|
|
|
list:
|
|
i18n: stDiscountBackend
|
|
title: Kody rabatowe
|
|
description: Zarządzanie rabatami w sklepie
|
|
display: [=code, _list_discount, valid_usage, valid_from, valid_to, _used, _generated_for]
|
|
fields:
|
|
code: {name: Kod, i18n: stDiscountBackend}
|
|
used: {name: Użyty, i18n: stDiscountBackend}
|
|
valid_usage: {name: Limit użyć, i18n: stDiscountBackend}
|
|
valid_from: {name: Ważny od, i18n: stDiscountBackend}
|
|
valid_to: {name: Ważny do, i18n: stDiscountBackend}
|
|
generated_for: {name: Wygenerowany dla, filterable: false, i18n: stDiscountBackend}
|
|
list_discount: {name: Rabat, sort_field: discount_coupon_code.discount, i18n: stDiscountBackend}
|
|
peer_method: doSelectJoinOrder
|
|
peer_count_method: doCountJoinOrder
|
|
object_actions:
|
|
_edit: -
|
|
_delete: -
|
|
actions:
|
|
_create: {name: Dodaj}
|
|
additional_filters: [generated_for]
|
|
filters:
|
|
generated_for: {partial: filter_generated_for}
|
|
|
|
product_list:
|
|
i18n: stDiscountBackend
|
|
title: Przypisz produkty
|
|
description: Zarządzanie rabatami w sklepie
|
|
use_stylesheet: [backend/stProductList.css]
|
|
use_helper: [stProduct/stProduct]
|
|
forward_parameters: [discount_coupon_code_id]
|
|
menu: {use: coupon_code_edit.menu}
|
|
display: [list_image, opt_name, code, opt_price_brutto, active, list_stock]
|
|
fields:
|
|
code: {name: Kod, width: 1%}
|
|
opt_name: {name: Nazwa, params: truncate_text=true}
|
|
list_image: {name: Zdjęcie, width: 1%, callback: list_product_image}
|
|
opt_price_brutto: {name: Cena, width: 1%, callback: list_product_price, label_callback: list_product_price_label}
|
|
active: {name: Aktywny, width: 1%, align: center}
|
|
list_stock: {name: Magazyn, align: right, width: 1%, i18n: stDepositoryBackend, callback: list_stock, sort_field: product.stock}
|
|
build_options:
|
|
through_class: DiscountCouponCodeHasProduct
|
|
related_id: forward_parameters.discount_coupon_code_id
|
|
object_actions: []
|
|
actions: []
|
|
filters:
|
|
list_image: {partial: filter_list_image, module: stProduct} |