# Configuration for the plugin "p123coupon_lib" # # # # Konfigurationsbeispiel typoscript: # ************************************************************************************************************************************************ # .DEVK_WKZ-D2623 -> XML-Export: "code=DEVK_WKZ-D2623" // Bei "defaultCoupons" mit Präfix "defaultCoupons-" # { # count = 1 -> * # price = -7.5 -> * dezimal als Punkt! 7.5 # pos.lang.de = 7.5% Rabatt -> * Warenkorb-Text. KEIN "," "|" verwenden! # ext = p123search -> * p123search oder p123designer. Kombination als "p123search+p123designer" # unique = 1 -> * Bei "unique=1" -> Vorhandene Gutscheine im Warenkorb werden gelöscht. # coupon = var -> * "var" = Prozent / "fixed" = fixer Betrag / "amount" = Anzahl # combined = DEVK_WKZ-D2623-DK -> Kombination mit Coupon z.B. "DEVK_WKZ-D2623-DK". Möglich auch eine "databaseCoupons" - Konfiguration # min = 200 -> Betrag der min. übernommen wird. (Prüfung in Kombination mit "coupon = var oder amount") # max = 600 -> Betrag der max. übernommen wird. (Prüfung in Kombination mit "coupon = var oder amount") # rule.if (stdWrap) -> Regel ab wann der Gutschein gültig ist # rule.message -> Fehlermeldung bei negativen rule-checkif # } # * Angabe ist erforderlich! # ************************************************************************************************************************************************ # # # # Konfigurationsbeispiel DB-Tabelle: # ************************************************************************************************************************************************ # # Feld "conf" -> Verweis auf Konfiguration per "typoscript" z.B. "DEVK_WKZ-D2623". # DB-Konfiguration wird ignoriert. # # Feld "used" -> Wird bei Verwendung des Gutschein auf "1" gesetzt. # # # # Reihenfolge: # ************************************************************************************************************************************************ # # 1. defaultCoupons -> wird automatisch in den Warenkorb eingefügt # # 2. manuelle Eingaben: # # -> 1. Prüfen ob ein "specialCoupons" vorhanden ist # -> 2. Prüfen ob ein "databaseCoupons" vorhanden ist # Konfiguration des databaseCoupons entwerder per DB-Tabelle # oder # als "databaseCoupons" # # # # Delete-Funktion im Warenkorb: # ************************************************************************************************************************************************ # Gutschein-Position kann im Warenkorb gelöscht werden. Ist kein Gutschein mehr im Warenkorb vorhanden, wird # "defaultCoupons" erneut eingefügt. Dieser kann final gelöscht werden. # Wird "databaseCoupons" gelöscht wird "used" NICHT zurück gesetzt. plugin.tx_p123coupon { templateStdWrap = messageStdWrap = contentStdWrap.wrap = defaultCoupons = specialCoupons = databaseCoupons = _CSS_DEFAULT_STYLE ( .tx-p123coupon { display: inline-flex; width: 100%; margin-top: 5%; align-items: flex-end; justify-content: flex-end; } .tx-p123coupon form{ border: dashed 1px var(--border-color); padding: 3%; } .tx-p123coupon-input-text { width: 100%; float: left; } .tx-p123coupon-ctrl { display: inline-block; margin-top: 1%; } .tx-p123coupon-button { float: right; margin-top: 1%; } .tx-p123coupon-message.errormsg { color: var(--color-error); } .tx-p123coupon-message.successmsg { color: var(--color-ok); } ) } plugin.tx_p123_pi { basket.p123search.if { value = ZZ_coupon isInList.field = group negate = 1 } } plugin.tx_p123checkout_pi1 { joinMedia.append = COA joinMedia.append { 10 = TEXT 10.value = ZZ_coupon 10.if.isTrue { preUserFunc = tx_p123checkout_pi1->hook preUserFunc { funcName = basket_find dontIncludeSetup = 1 group = ZZ_coupon rKey = count format = 0 } } 10.wrap = , } extensions.stdWrap.outerWrap.cObject.if { value = ZZ_coupon isInList.field = format negate = 1 } positions { delete { cObject = LOAD_REGISTER cObject { repExt.data = field:ext repExt.stdWrap.replacement { 10 { search = p123 replace = ZZ_coupon } } } override.innerWrap = override.if.value = ZZ_coupon override.if.isInList.field = group } } templateStdWrap { postCObject = FILE postCObject.stdWrap.if.value.data = TSFE:id postCObject.stdWrap.if.equals = {$plugin.tx_p123_pi.pageBasket} postCObject { file = EXT:p123coupon/res/template.html } } } plugin.tx_p123paypal_pi2 { joinMedia < plugin.tx_p123checkout_pi1.joinMedia } plugin.tx_p123checkout_pi4 { paymentHooks.9.joinMedia < plugin.tx_p123checkout_pi1.joinMedia mailTemplate.html.subparts.tx_p123checkout_pi1 { joinMedia.append = COA joinMedia.append { 10 =