@osovitny/anatoly 3.19.25 → 3.19.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4358,11 +4358,11 @@ class PaymentsService {
|
|
|
4358
4358
|
return subtotal > 0 ? subtotal : 0;
|
|
4359
4359
|
}
|
|
4360
4360
|
//DiscountCode
|
|
4361
|
-
applyDiscountCode(
|
|
4361
|
+
applyDiscountCode(data) {
|
|
4362
4362
|
if (!data) {
|
|
4363
4363
|
return;
|
|
4364
4364
|
}
|
|
4365
|
-
this.discountCode =
|
|
4365
|
+
this.discountCode = data.code;
|
|
4366
4366
|
if (data.amount) {
|
|
4367
4367
|
this.discountPercentage = 0;
|
|
4368
4368
|
this.discountAmount = parseInt(data.amount);
|
|
@@ -4544,7 +4544,7 @@ class OrderSummaryComponent extends ComponentBase {
|
|
|
4544
4544
|
}
|
|
4545
4545
|
switch (data.status) {
|
|
4546
4546
|
case DiscountCodeStatus.Exist:
|
|
4547
|
-
this.ps.applyDiscountCode(
|
|
4547
|
+
this.ps.applyDiscountCode(data);
|
|
4548
4548
|
this.discount = this.ps.getDiscountCodeAsString();
|
|
4549
4549
|
this.ns.success("Discount applied successfully");
|
|
4550
4550
|
break;
|