commit before consolodating payment methods

This commit is contained in:
twotalesanimation
2025-12-30 10:40:45 +02:00
parent 3c24c0e9ef
commit a898c35a39
23 changed files with 673 additions and 2184 deletions
@@ -234,31 +234,35 @@
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="order-item">
<div class="order-item-name"><?php echo e($item['product']->name); ?></div>
<div class="order-item-name"><?php echo e($item['product']->name); ?><?php echo e($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;
}
?>
<div class="order-item-details">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['stock']): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['is_sample']): ?>
<strong>Sample - Fixed Price:</strong> R<?php echo e(number_format(\App\Services\ShippingService::getSampleCost(), 2)); ?><br>
<?php elseif($item['stock']): ?>
<strong><?php echo e($item['stock']->name); ?>:</strong> R<?php echo e(number_format($stockCost, 2)); ?><?php echo e($stockUnit); ?><br>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['type'] === 'wallpaper'): ?>
<strong>Length:</strong> <?php echo e($item['length']); ?>m
<?php elseif($item['type'] === 'mural'): ?>
<strong>Dimensions:</strong> <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['quantity'] > 1): ?>
<br><strong>Quantity:</strong> <?php echo e($item['quantity']); ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$item['is_sample']): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['type'] === 'wallpaper'): ?>
<strong>Length:</strong> <?php echo e($item['length']); ?>m
<?php elseif($item['type'] === 'mural'): ?>
<strong>Dimensions:</strong> <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['quantity'] > 1): ?>
<br><strong>Quantity:</strong> <?php echo e($item['quantity']); ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="order-item-price">R<?php echo e(number_format($item['subtotal'], 2)); ?></div>
@@ -271,18 +275,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><?php echo e($shippingLabel); ?>:</span>
<span>R<?php echo e(number_format($shippingFee, 2)); ?></span>
</div>
<div class="summary-row total">
<span>Total:</span>
<span>R<?php echo e(number_format($total, 2)); ?></span>
<span>R<?php echo e(number_format($grandTotal, 2)); ?></span>
</div>
<a href="<?php echo e(route('cart')); ?>" class="back-link"> Back to Cart</a>