From d2a77071cb6e7ef88a4d1a0ea78208080a1b11cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de> Date: Wed, 30 Jun 2021 15:12:22 +0200 Subject: [PATCH] refactor: coupon product field descriptions for clarification --- src/QUI/ERP/Coupons/Events.php | 53 +++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/src/QUI/ERP/Coupons/Events.php b/src/QUI/ERP/Coupons/Events.php index cccce0d..d79f013 100644 --- a/src/QUI/ERP/Coupons/Events.php +++ b/src/QUI/ERP/Coupons/Events.php @@ -439,6 +439,13 @@ protected static function createProductFields() 'de' => 'Gutschein-Code ist übertragbar', 'en' => 'Coupon code is transferable' ], + 'description' => [ + 'de' => 'Übertragbare Gutscheine sind auch von anderen Personen als dem Käufer einlösbar.' + .' Nicht übertragbare Gutscheine können nur vom Käufer eingelöst werden, wenn dieser' + .' eingeloggt ist.', + 'en' => 'Transferable coupons are also redeemable by persons other than the buyer.' + .' Non-transferable vouchers can only be redeemed by the buyer when logged in.' + ], 'type' => Fields::TYPE_BOOL, 'public' => false, 'standard' => false, @@ -449,6 +456,14 @@ protected static function createProductFields() 'de' => 'Gutschein-Code per E-Mail senden', 'en' => 'Send coupon code via email' ], + 'description' => [ + 'de' => 'Der Gutschein-Code wird dem Käufer per E-Mail gesendet. Gilt nicht, wenn der Benutzer zw.' + .' Post- und Mail-Versand wählen kann und den Postversand auswählt.' + .' Wird der Gutschein auch als PDF-Datei generiert, wird die PDF-Datei an diese E-Mail angehanden.', + 'en' => 'The coupon code is sent to the buyer via email. It is not sent if the customer is able to' + .' choose between email and mail delivery type and chooses delivery by mail.' + .' If the coupon is also generated as a PDF file, the file is attached to this email.' + ], 'type' => Fields::TYPE_BOOL, 'public' => false, 'standard' => false, @@ -459,6 +474,14 @@ protected static function createProductFields() 'de' => 'Gutschein-Code als PDF bereitstellen', 'en' => 'Provide coupon code as PDF' ], + 'description' => [ + 'de' => 'Der Gutschein wird auch als PDF-Datei erstellt und dem Käufer (je nach Wahl) per E-Mail gesendet.' + .' Zusätzlich wird die PDF-Datei dem Käufer in seinem Frontend-Profil (sofern eingerichtet)' + .' bereitgestellt.', + 'en' => 'The coupon is also generated as a PDF file and is sent to the customer (depending on choice)' + .' via email. Additionally, the PDF file is made available via the customers frontend profile' + .' (if set up).' + ], 'type' => Fields::TYPE_BOOL, 'public' => false, 'standard' => false, @@ -489,6 +512,10 @@ protected static function createProductFields() 'de' => 'Gutschein-Beschreibung', 'en' => 'Coupon description' ], + 'description' => [ + 'de' => 'Diese Beschreibung taucht unter dem Titel "GUTSCHEIN" auf der generierten PDF-Datei auf.', + 'en' => 'This description appears under the title caption "COUPON" on the generated PDF file.' + ], 'type' => Fields::TYPE_INPUT_MULTI_LANG, 'public' => false, 'standard' => false, @@ -499,6 +526,16 @@ protected static function createProductFields() 'de' => 'Ist Einzweck-Gutschein (Besteuerung bei Gutschein-Kauf)', 'en' => 'Is single purpose coupon (taxation on voucher purchase)' ], + 'description' => [ + 'de' => 'Einzweck-Gutscheine sind solche, bei denen die Besteuerung und der Leistungsort bereits' + .' beim Gutschein-Kauf feststehen. Beispiel: Gutschein für eine Massage in einem Spa.' + .' Alles andere (wie z.B. Wertgutscheine für den Einsatz unabhängig vom Artikel) sind' + .' Mehrzweck-Gutscheine und werden bei Einkauf nicht besteuert.', + 'en' => 'Single-purpose coupons are those for which the taxation and place of performance are already' + .' determined at the time of coupon purchase. Example: voucher for a massage in a spa.' + .' Everything else (such as money value coupons for use regardless of the item) are' + .' multi-purpose coupons and are not taxed at the time of purchase.' + ], 'type' => Fields::TYPE_BOOL, 'public' => false, 'standard' => false, @@ -506,7 +543,7 @@ protected static function createProductFields() ], CouponProductType::PRODUCT_FIELD_ID_USER_DELIVERY_TYPE_SELECT => [ 'title' => [ - 'de' => 'Gutschein-Versand', + 'de' => 'Gutschein - Versand', 'en' => 'Coupon delivery' ], 'type' => Fields::TYPE_ATTRIBUTE_LIST, @@ -517,7 +554,7 @@ protected static function createProductFields() 'entries' => [ [ 'title' => [ - 'de' => 'per E-Mail', + 'de' => 'per E - Mail', 'en' => 'via email' ], 'sum' => 0, @@ -540,14 +577,14 @@ protected static function createProductFields() ], CouponProductType::PRODUCT_FIELD_ID_USER_DELIVERY_TYPE_SELECT_ALLOW => [ 'title' => [ - 'de' => 'Kunde darf Gutschein-Versandart wählen', + 'de' => 'Kunde darf Gutschein - Versandart wählen', 'en' => 'Customer can choose coupon delivery type' ], 'description' => [ 'de' => 'Ist diese Funktion aktiviert, kann der Kunde beim Artikel im Shop wählen, ob der Gutschein' - .' per E-Mail oder Post versandt werden soll.', - 'en' => 'If this option is enabled, the customer can choose at the article in the store whether the' - .' coupon should be sent by e-mail or by (physical) mail.' + .' per E - Mail oder Post versandt werden soll.', + 'en' => 'if this option is enabled, the customer can choose at the article in the store whether the' + .' coupon should be sent by e - mail or by(physical) mail.' ], 'type' => Fields::TYPE_BOOL, 'public' => false, @@ -588,7 +625,7 @@ protected static function createProductFields() } if ($fieldsCreated) { - QUI\Translator::publish('quiqqer/products'); + QUI\Translator::publish('quiqqer / products'); } } @@ -677,7 +714,7 @@ public static function onQuiqqerProductsProductActivate(ProductInterface $Produc } throw new CouponProductException([ - 'quiqqer/coupons', + 'quiqqer / coupons', 'exception.CouponProduct.no_vat_tax_type_required', [ 'productTitle' => $Product->getTitle(), -- GitLab