price
This commit is contained in:
@@ -78,6 +78,12 @@
|
||||
} @else {
|
||||
<span class="current-price">{{ item.price }} {{ item.currency }}</span>
|
||||
}
|
||||
|
||||
@if (item.deliveryPrice != null) {
|
||||
<span class="delivery-price">
|
||||
{{ 'cart.deliveryLabel' | translate }}: {{ item.deliveryPrice | number:'1.2-2' }} {{ item.currency }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="quantity-controls">
|
||||
@@ -116,14 +122,16 @@
|
||||
<span class="value">{{ totalPrice() | number:'1.2-2' }} {{ currentCurrency }}</span>
|
||||
</div>
|
||||
|
||||
<div class="summary-row delivery">
|
||||
<span>{{ 'cart.deliveryLabel' | translate }}</span>
|
||||
<span>0 {{ currentCurrency }}</span>
|
||||
</div>
|
||||
@if (hasDeliveryPrice()) {
|
||||
<div class="summary-row delivery">
|
||||
<span>{{ 'cart.deliveryLabel' | translate }}</span>
|
||||
<span class="value">{{ totalDeliveryPrice() | number:'1.2-2' }} {{ currentCurrency }}</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="summary-row total">
|
||||
<span>{{ 'cart.toPay' | translate }}</span>
|
||||
<span class="total-price">{{ totalPrice() | number:'1.2-2' }} {{ currentCurrency }}</span>
|
||||
<span class="total-price">{{ totalWithDelivery() | number:'1.2-2' }} {{ currentCurrency }}</span>
|
||||
</div>
|
||||
|
||||
<div class="terms-agreement">
|
||||
|
||||
@@ -555,6 +555,12 @@
|
||||
font-weight: 700;
|
||||
color: #497671;
|
||||
}
|
||||
|
||||
.delivery-price {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
color: #697777;
|
||||
}
|
||||
}
|
||||
|
||||
// Dexar quantity controls
|
||||
@@ -838,7 +844,7 @@
|
||||
color: #6b7280;
|
||||
|
||||
&.delivery {
|
||||
display: none; // Hide delivery in Novo
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&.total {
|
||||
@@ -1830,6 +1836,7 @@
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
display: -webkit-box;
|
||||
line-clamp: 2;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -26,6 +26,9 @@ export class CartComponent implements OnDestroy {
|
||||
items;
|
||||
itemCount;
|
||||
totalPrice;
|
||||
totalDeliveryPrice;
|
||||
totalWithDelivery;
|
||||
hasDeliveryPrice;
|
||||
termsAccepted = false;
|
||||
isnovo = environment.theme === 'novo';
|
||||
|
||||
@@ -68,6 +71,9 @@ export class CartComponent implements OnDestroy {
|
||||
this.items = this.cartService.items;
|
||||
this.itemCount = this.cartService.itemCount;
|
||||
this.totalPrice = this.cartService.totalPrice;
|
||||
this.totalDeliveryPrice = this.cartService.totalDeliveryPrice;
|
||||
this.totalWithDelivery = this.cartService.totalWithDelivery;
|
||||
this.hasDeliveryPrice = this.cartService.hasDeliveryPrice;
|
||||
}
|
||||
|
||||
requestLogin(): void {
|
||||
@@ -195,7 +201,7 @@ export class CartComponent implements OnDestroy {
|
||||
createPayment(): void {
|
||||
const orderId = this.generateOrderId();
|
||||
const paymentPayload = {
|
||||
amount: Number(this.totalPrice()),
|
||||
amount: Number(this.totalWithDelivery()),
|
||||
currency: 'RUB' as const,
|
||||
siteuserID: this.getPaymentUserId(),
|
||||
siteorderID: orderId,
|
||||
|
||||
Reference in New Issue
Block a user