Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
coupons
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
6
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
0
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
coupons
Commits
116ee184
Commit
116ee184
erstellt
vor 3 Jahren
von
Patrick Müller
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
feat: coupon products
Übergeordneter
c580a59d
Branches
feat-couponproducts
Branches enthält Commit
No related tags found
Tags enthält Commit
Keine zugehörigen Merge Requests gefunden
Änderungen
3
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
3 geänderte Dateien
products.xml
+1
-0
1 Ergänzung, 0 Löschungen
products.xml
src/QUI/ERP/Coupons/Events.php
+43
-33
43 Ergänzungen, 33 Löschungen
src/QUI/ERP/Coupons/Events.php
src/QUI/ERP/Coupons/Products/Handler.php
+2
-1
2 Ergänzungen, 1 Löschung
src/QUI/ERP/Coupons/Products/Handler.php
werden angezeigt
mit
46 Ergänzungen
und
34 Löschungen
products.xml
+
1
−
0
Zeige Datei @
116ee184
...
...
@@ -12,6 +12,7 @@
<field>
672
</field>
<field>
673
</field>
<field>
674
</field>
<field>
675
</field>
</fields>
</fieldCategory>
</fieldCategories>
...
...
This diff is collapsed.
Zum Erweitern klicken.
src/QUI/ERP/Coupons/Events.php
+
43
−
33
Zeige Datei @
116ee184
...
...
@@ -420,58 +420,64 @@ protected static function createProductFields()
{
$fields
=
[
CouponProductType
::
PRODUCT_FIELD_ID_TRANSFERABLE
=>
[
'title'
=>
[
'title'
=>
[
'de'
=>
'Gutschein-Code ist übertragbar'
,
'en'
=>
'Coupon code is transferable'
],
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
false
],
CouponProductType
::
PRODUCT_FIELD_ID_GENERATE_PDF
=>
[
'title'
=>
[
'title'
=>
[
'de'
=>
'Gutschein-Code als PDF bereitstellen'
,
'en'
=>
'Provide coupon code as PDF'
],
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
false
],
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_AMOUNT
=>
[
'title'
=>
[
'title'
=>
[
'de'
=>
'Gutschein Wert'
,
'en'
=>
'Coupon amount'
],
'type'
=>
Fields
::
TYPE_FLOAT
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_FLOAT
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
true
],
CouponProductType
::
PRODUCT_FIELD_ID_DAYS_VALID
=>
[
'title'
=>
[
'title'
=>
[
'de'
=>
'Gutschein-Code Gültigkeit (Tage)'
,
'en'
=>
'Coupon code validity (days)'
],
'type'
=>
Fields
::
TYPE_INT
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_INT
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
true
],
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_DESCRIPTION
=>
[
'title'
=>
[
'title'
=>
[
'de'
=>
'Gutschein-Beschreibung'
,
'en'
=>
'Coupon description'
],
'type'
=>
Fields
::
TYPE_INPUT_MULTI_LANG
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_INPUT_MULTI_LANG
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
true
],
CouponProductType
::
PRODUCT_FIELD_ID_IS_PRODUCT_SPECIFIC_COUPON
=>
[
'title'
=>
[
'de'
=>
'Ist Gutschein für
ein
spezifische
s
Produkt ("Einzweck-Gutschein")'
,
'en'
=>
'Is coupon for
a
specific product ("single purpose coupon")'
'title'
=>
[
'de'
=>
'Ist Gutschein für spezifische Produkt
e
("Einzweck-Gutschein")'
,
'en'
=>
'Is coupon for specific product
s
("single purpose coupon")'
],
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
'type'
=>
Fields
::
TYPE_BOOL
,
'public'
=>
false
,
'standard'
=>
false
,
'requiredField'
=>
false
]
];
...
...
@@ -494,7 +500,8 @@ protected static function createProductFields()
'systemField'
=>
0
,
'standardField'
=>
!
empty
(
$field
[
'standard'
])
?
1
:
0
,
'publicField'
=>
!
empty
(
$field
[
'public'
])
?
1
:
0
,
'options'
=>
!
empty
(
$field
[
'options'
])
?
$field
[
'options'
]
:
null
'options'
=>
!
empty
(
$field
[
'options'
])
?
$field
[
'options'
]
:
null
,
'requiredField'
=>
!
empty
(
$field
[
'requiredField'
])
?
1
:
0
]);
}
catch
(
\Exception
$Exception
)
{
QUI\System\Log
::
writeException
(
$Exception
);
...
...
@@ -521,13 +528,16 @@ public static function onQuiqqerProductsProductCreate(ProductInterface $Product)
return
;
}
$UniqueProduct
=
$Product
->
createUniqueProduct
();
$UniqueProduct
->
calc
();
$fields
=
[
CouponProductType
::
PRODUCT_FIELD_ID_TRANSFERABLE
=>
true
,
CouponProductType
::
PRODUCT_FIELD_ID_GENERATE_PDF
=>
true
,
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_AMOUNT
=>
null
,
CouponProductType
::
PRODUCT_FIELD_ID_DAYS_VALID
=>
1095
,
// 3 years
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_DESCRIPTION
=>
null
,
CouponProductType
::
PRODUCT_FIELD_ID_IS_PRODUCT_SPECIFIC_COUPON
=>
false
CouponProductType
::
PRODUCT_FIELD_ID_TRANSFERABLE
=>
true
,
CouponProductType
::
PRODUCT_FIELD_ID_GENERATE_PDF
=>
true
,
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_AMOUNT
=>
$UniqueProduct
->
getPrice
()
->
getValue
()
,
CouponProductType
::
PRODUCT_FIELD_ID_DAYS_VALID
=>
1095
,
// 3 years
CouponProductType
::
PRODUCT_FIELD_ID_COUPON_DESCRIPTION
=>
null
,
//
CouponProductType::PRODUCT_FIELD_ID_IS_PRODUCT_SPECIFIC_COUPON => false
// @todo later
];
foreach
(
$fields
as
$fieldId
=>
$value
)
{
...
...
This diff is collapsed.
Zum Erweitern klicken.
src/QUI/ERP/Coupons/Products/Handler.php
+
2
−
1
Zeige Datei @
116ee184
...
...
@@ -170,7 +170,8 @@ protected static function createDiscountFromProduct(Product $Product): Discount
'active'
=>
1
,
'discount'
=>
$discountAmount
,
'discount_type'
=>
DiscountHandler
::
DISCOUNT_TYPE_CURRENCY
,
'hidden'
=>
1
'hidden'
=>
1
,
'scope'
=>
DiscountHandler
::
DISCOUNT_SCOPE_GRAND_TOTAL
]);
$L
=
new
QUI\Locale
();
...
...
This diff is collapsed.
Zum Erweitern klicken.
Vorschau
0%
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren