commit before consolodating payment methods
This commit is contained in:
@@ -234,30 +234,34 @@
|
||||
|
||||
@foreach($items as $item)
|
||||
<div class="order-item">
|
||||
<div class="order-item-name">{{ $item['product']->name }}</div>
|
||||
<div class="order-item-name">{{ $item['product']->name }}{{ $item['is_sample'] ? ' - Sample' : '' }}</div>
|
||||
|
||||
@php
|
||||
$stockCost = 0;
|
||||
$stockUnit = $item['type'] === 'wallpaper' ? '/m' : '/m²';
|
||||
|
||||
if ($item['stock']) {
|
||||
if (!$item['is_sample'] && $item['stock']) {
|
||||
$stockCost = $item['type'] === 'wallpaper' ? $item['stock']->cost_per_meter : $item['stock']->cost_per_m2;
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="order-item-details">
|
||||
@if($item['stock'])
|
||||
@if($item['is_sample'])
|
||||
<strong>Sample - Fixed Price:</strong> R{{ number_format(\App\Services\ShippingService::getSampleCost(), 2) }}<br>
|
||||
@elseif($item['stock'])
|
||||
<strong>{{ $item['stock']->name }}:</strong> R{{ number_format($stockCost, 2) }}{{ $stockUnit }}<br>
|
||||
@endif
|
||||
|
||||
@if($item['type'] === 'wallpaper')
|
||||
<strong>Length:</strong> {{ $item['length'] }}m
|
||||
@elseif($item['type'] === 'mural')
|
||||
<strong>Dimensions:</strong> {{ $item['width'] }}m × {{ $item['height'] }}m ({{ number_format($item['width'] * $item['height'], 2) }}m²)
|
||||
@endif
|
||||
|
||||
@if($item['quantity'] > 1)
|
||||
<br><strong>Quantity:</strong> {{ $item['quantity'] }}
|
||||
@if(!$item['is_sample'])
|
||||
@if($item['type'] === 'wallpaper')
|
||||
<strong>Length:</strong> {{ $item['length'] }}m
|
||||
@elseif($item['type'] === 'mural')
|
||||
<strong>Dimensions:</strong> {{ $item['width'] }}m × {{ $item['height'] }}m ({{ number_format($item['width'] * $item['height'], 2) }}m²)
|
||||
@endif
|
||||
|
||||
@if($item['quantity'] > 1)
|
||||
<br><strong>Quantity:</strong> {{ $item['quantity'] }}
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
<div class="order-item-price">R{{ number_format($item['subtotal'], 2) }}</div>
|
||||
@@ -270,18 +274,13 @@
|
||||
</div>
|
||||
|
||||
<div class="summary-row">
|
||||
<span>Shipping:</span>
|
||||
<span>TBD at payment</span>
|
||||
</div>
|
||||
|
||||
<div class="summary-row">
|
||||
<span>Tax:</span>
|
||||
<span>TBD at payment</span>
|
||||
<span>{{ $shippingLabel }}:</span>
|
||||
<span>R{{ number_format($shippingFee, 2) }}</span>
|
||||
</div>
|
||||
|
||||
<div class="summary-row total">
|
||||
<span>Total:</span>
|
||||
<span>R{{ number_format($total, 2) }}</span>
|
||||
<span>R{{ number_format($grandTotal, 2) }}</span>
|
||||
</div>
|
||||
|
||||
<a href="{{ route('cart') }}" class="back-link">← Back to Cart</a>
|
||||
|
||||
Reference in New Issue
Block a user