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
@@ -180,39 +180,44 @@
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $order->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="item-row">
<div class="item-info">
<div class="item-name"><?php echo e($item->product->name); ?></div>
<div class="item-name"><?php echo e($item->product->name); ?><?php echo e($item->is_sample ? ' - Sample' : ''); ?></div>
<div class="item-qty">
<?php
$stock = $item->printStock;
$stockText = $stock ? "{$stock->name}" : "Standard";
$stockCost = 0;
if ($stock) {
$stockCost = $item->type === 'wallpaper' ? $stock->cost_per_meter : $stock->cost_per_m2;
if (!$item->is_sample && $stock) {
$stockCost = $item->type === 'wallpaper' ? $stock->cost_per_meter : $stock->cost_per_m2;
}
?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item->type === 'wallpaper'): ?>
Length: <?php echo e($item->length); ?>m | Finish: <?php echo e($stockText); ?><br>
<small>Stock Cost: R<?php echo e(number_format($stockCost, 2)); ?>/m</small>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item->is_sample): ?>
Sample - Fixed Price: R<?php echo e(number_format(\App\Services\ShippingService::getSampleCost(), 2)); ?>
<?php elseif($item->type === 'wallpaper'): ?>
Length: <?php echo e($item->length); ?>m | Finish: <?php echo e($stockText); ?><br>
<small>Stock Cost: R<?php echo e(number_format($stockCost, 2)); ?>/m</small>
<?php elseif($item->type === 'mural'): ?>
Dimensions: <?php echo e($item->width); ?>m × <?php echo e($item->height); ?>m (<?php echo e(number_format($item->width * $item->height, 2)); ?>m²) | Finish: <?php echo e($stockText); ?><br>
<small>Stock Cost: R<?php echo e(number_format($stockCost, 2)); ?>/m²</small>
Dimensions: <?php echo e($item->width); ?>m × <?php echo e($item->height); ?>m (<?php echo e(number_format($item->width * $item->height, 2)); ?>m²) | Finish: <?php echo e($stockText); ?><br>
<small>Stock Cost: R<?php echo e(number_format($stockCost, 2)); ?>/m²</small>
<?php else: ?>
<small>Price: R<?php echo e(number_format($stockCost, 2)); ?> per unit</small>
<small>Price: R<?php echo e(number_format($stockCost, 2)); ?> per unit</small>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<div class="item-price">
R<?php echo e(number_format(
$item->quantity * (
$item->type === 'wallpaper'
? $stockCost * $item->length
: ($item->type === 'mural'
? $stockCost * $item->width * $item->height
: $stockCost
)
),
$item->is_sample
? \App\Services\ShippingService::getSampleCost() * $item->quantity
: $item->quantity * (
$item->type === 'wallpaper'
? $stockCost * $item->length
: ($item->type === 'mural'
? $stockCost * $item->width * $item->height
: $stockCost
)
),
2
)); ?>
@@ -220,9 +225,19 @@
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="total-row" style="justify-content: space-between; border-top: 1px solid #eee; padding-top: 1rem; margin-top: 1rem; font-size: 0.95rem; color: #666;">
<span>Subtotal:</span>
<span>R<?php echo e(number_format($order->total, 2)); ?></span>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->shipping_fee): ?>
<div class="total-row" style="justify-content: space-between; border-top: none; padding-top: 0.5rem; margin-top: 0; font-size: 0.95rem; color: #666;">
<span>Shipping:</span>
<span>R<?php echo e(number_format($order->shipping_fee, 2)); ?></span>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="total-row">
<span>Order Total:</span>
<span>R<?php echo e(number_format($order->total, 2)); ?></span>
<span>R<?php echo e(number_format($order->total + ($order->shipping_fee ?? 0), 2)); ?></span>
</div>
</div>
<div class="card--pink">
@@ -1,426 +0,0 @@
<?php $__env->startSection('title', 'Order #' . $customOrder->order_number . ' - Custom Order Details'); ?>
<?php $__env->startSection('styles'); ?>
<style>
/* Page-specific typography overrides */
h1 {
font-family: 'Abril Fatface', cursive;
font-size: 2.5rem;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
h2 {
font-family: 'Abril Fatface', cursive;
font-size: 1.6rem;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
}
h3 {
font-family: var(--font-sans);
font-size: 1.1rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.page-intro {
margin-bottom: var(--spacing-lg);
}
.page-intro p {
color: var(--text-secondary);
font-size: 1rem;
}
/* Timeline-specific styles */
.timeline-container {
margin-bottom: var(--spacing-lg);
}
.timeline-container.card:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.timeline-title {
font-family: var(--font-serif);
font-size: 1.3rem;
color: var(--text-primary);
margin-bottom: var(--spacing-lg);
text-align: center;
}
.timeline {
display: flex;
align-items: center;
gap: 0;
position: relative;
overflow-x: auto;
padding: var(--spacing-md) 0;
}
.timeline::before {
content: '';
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 2px;
background-color: var(--border-color);
z-index: 1;
transform: translateY(-50%);
}
.timeline-item {
flex: 1;
min-width: 140px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 2;
}
.timeline-circle {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: white;
border: 3px solid var(--border-color);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
font-weight: 900;
font-size: 1.2rem;
color: var(--text-primary);
flex-shrink: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
.timeline-item.completed .timeline-circle {
background-color: var(--accent-pink);
border-color: var(--accent-pink);
color: white;
}
.timeline-item.active .timeline-circle {
background-color: var(--accent-light);
border-color: var(--accent-dark);
box-shadow: 0 0 0 4px var(--accent-light);
}
.timeline-label {
text-align: center;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-primary);
line-height: 1.3;
max-width: 120px;
margin-top: 60px;
}
.timeline-item.completed .timeline-label {
color: var(--accent-pink);
}
.timeline-item.active .timeline-label {
color: var(--accent-dark);
font-weight: 700;
}
@media (max-width: 768px) {
.content-grid {
grid-template-columns: 1fr;
}
h1 {
font-size: 1.8rem;
}
.image-gallery {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container">
<div class="page-intro">
<h1>Custom Order Details</h1>
<p>Order #<?php echo e($customOrder->order_number); ?></p>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('success')): ?>
<div class="alert alert-success">
<?php echo e(session('success')); ?>
</div>
<?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(session('info')): ?>
<div class="alert alert-info">
<?php echo e(session('info')); ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<!-- Timeline -->
<div class="timeline-container card">
<h2 class="timeline-title">Order Progress</h2>
<div class="timeline">
<?php
$timelineSteps = [
['status' => 'submitted', 'label' => 'Order\nSubmitted', 'completed' => $customOrder->status !== null],
['status' => 'deposit_paid', 'label' => 'Deposit\nPaid', 'completed' => $customOrder->deposit_status === 'paid'],
['status' => 'proof_sent', 'label' => 'Proofs\nSent', 'completed' => $customOrder->proofs()->exists()],
['status' => 'proof_approved', 'label' => 'Proofs\nApproved', 'completed' => $customOrder->proofs()->where('status', 'approved')->exists()],
['status' => 'processing', 'label' => 'Processing', 'completed' => $customOrder->status === 'processing'],
['status' => 'shipped', 'label' => 'Order\nShipped', 'completed' => $customOrder->status === 'completed'],
];
// Determine current step
$currentStep = 0;
if ($customOrder->status === 'completed') $currentStep = 5;
elseif ($customOrder->status === 'processing') $currentStep = 4;
elseif ($customOrder->proofs()->where('status', 'approved')->exists()) $currentStep = 3;
elseif ($customOrder->proofs()->exists()) $currentStep = 2;
elseif ($customOrder->deposit_status === 'paid') $currentStep = 1;
?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $timelineSteps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $step): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="timeline-item <?php if($index < $currentStep): ?> completed <?php elseif($index === $currentStep): ?> active <?php endif; ?>">
<div class="timeline-circle">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($index < $currentStep): ?>
<?php else: ?>
<?php echo e($index + 1); ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="timeline-label"><?php echo e($step['label']); ?></div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<div class="content-grid">
<!-- Main Content -->
<div>
<!-- Order Status -->
<div class="card">
<h2>Order Status</h2>
<div class="card-section">
<span class="status-badge <?php echo e($customOrder->status); ?>">
<?php echo e(str_replace('_', ' ', ucfirst($customOrder->status))); ?>
</span>
<p style="margin-top: var(--spacing-sm); color: var(--text-secondary); font-size: 0.9rem;">
Submitted on <?php echo e($customOrder->created_at->format('d M Y \a\t H:i')); ?>
</p>
</div>
</div>
<!-- Design Requirements -->
<div class="card">
<h2>Design Requirements</h2>
<div class="card-section">
<h3>Order Type</h3>
<p style="color: var(--text-secondary); text-transform: capitalize;"><?php echo e($customOrder->type); ?></p>
</div>
<div class="card-section">
<h3>Dimensions</h3>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->specifications): ?>
<dl style="color: var(--text-secondary);">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->specifications->length): ?>
<div class="spec-group">
<dt>Length:</dt>
<dd><?php echo e($customOrder->specifications->length); ?>m</dd>
</div>
<?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($customOrder->specifications->width): ?>
<div class="spec-group">
<dt>Width:</dt>
<dd><?php echo e($customOrder->specifications->width); ?>m</dd>
</div>
<?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($customOrder->specifications->height): ?>
<div class="spec-group">
<dt>Height:</dt>
<dd><?php echo e($customOrder->specifications->height); ?>m</dd>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="spec-group">
<dt>Quantity:</dt>
<dd><?php echo e($customOrder->specifications->quantity); ?></dd>
</div>
</dl>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="card-section">
<h3>Print Material</h3>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->specifications->printStock): ?>
<p style="color: var(--text-secondary);"><?php echo e($customOrder->specifications->printStock->name); ?></p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="card-section">
<h3>Design Brief</h3>
<p style="color: var(--text-secondary);"><?php echo e($customOrder->customer_brief); ?></p>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->specifications->special_instructions): ?>
<div class="card-section">
<h3>Special Instructions</h3>
<p style="color: var(--text-secondary);"><?php echo e($customOrder->specifications->special_instructions); ?></p>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Reference Images -->
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->files->count() > 0): ?>
<div class="card">
<h2>Reference Images</h2>
<div class="image-gallery">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $customOrder->files; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $file): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<a href="<?php echo e(Storage::url($file->file_path)); ?>" target="_blank" title="<?php echo e($file->original_filename); ?>">
<img src="<?php echo e(Storage::url($file->file_path)); ?>" alt="<?php echo e($file->original_filename); ?>">
</a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<!-- Design Proofs -->
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->proofs->count() > 0): ?>
<div class="card">
<h2>Design Proofs</h2>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $customOrder->proofs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $proof): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="proof-item <?php echo e($proof->status === 'approved' ? 'approved' : ''); ?>">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-sm);">
<h3>Proof <?php echo e($loop->iteration); ?></h3>
<span class="status-badge <?php echo e($proof->status); ?>">
<?php echo e(ucfirst($proof->status)); ?>
</span>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($proof->file_path): ?>
<a href="<?php echo e(Storage::url($proof->file_path)); ?>" target="_blank" style="color: var(--accent-dark); text-decoration: underline; font-size: 0.9rem;">
View Proof File
</a>
<?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($proof->feedback): ?>
<div style="margin-top: var(--spacing-sm); padding: var(--spacing-sm); background: white; border-radius: 4px; border-left: 3px solid var(--accent-dark);">
<strong style="color: var(--text-primary); font-size: 0.9rem;">Feedback:</strong>
<p style="color: var(--text-secondary); font-size: 0.85rem; margin: var(--spacing-xs) 0 0 0;"><?php echo e($proof->feedback); ?></p>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Sidebar -->
<div>
<!-- Cost & Payment Summary -->
<div class="card">
<h2>Order Summary</h2>
<!-- Cost Summary -->
<div class="payment-section">
<div class="payment-row">
<span>Design Fee:</span>
<span>R<?php echo e(number_format($customOrder->design_fee, 2)); ?></span>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->material_cost > 0): ?>
<div class="payment-row">
<span>Material Cost:</span>
<span>R<?php echo e(number_format($customOrder->material_cost, 2)); ?></span>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="payment-row total">
<span>Total:</span>
<span>R<?php echo e(number_format($customOrder->total_cost, 2)); ?></span>
</div>
</div>
<!-- Payment Status -->
<h3 style="margin-top: var(--spacing-lg); margin-bottom: var(--spacing-md);">Payment Status</h3>
<div class="card" style="padding: var(--spacing-sm); background-color: var(--accent-light); margin-bottom: var(--spacing-md);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);">
<strong>Deposit (20%)</strong>
<span class="status-badge <?php echo e($customOrder->deposit_status); ?>"><?php echo e(ucfirst($customOrder->deposit_status)); ?></span>
</div>
<p style="color: var(--text-secondary); margin: 0; font-size: 0.9rem;">R<?php echo e(number_format($customOrder->deposit_amount, 2)); ?></p>
</div>
<div class="card" style="padding: var(--spacing-sm); background-color: var(--accent-light); margin-bottom: var(--spacing-lg);">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--spacing-xs);">
<strong>Balance (80%)</strong>
<span class="status-badge <?php echo e($customOrder->balance_status); ?>"><?php echo e(ucfirst($customOrder->balance_status)); ?></span>
</div>
<p style="color: var(--text-secondary); margin: 0; font-size: 0.9rem;">R<?php echo e(number_format($customOrder->balance_amount, 2)); ?></p>
</div>
<!-- Payment Buttons -->
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->deposit_status !== 'paid'): ?>
<form method="POST" action="<?php echo e(route('yoco-custom-deposit')); ?>">
<?php echo csrf_field(); ?>
<input type="hidden" name="custom_order_id" value="<?php echo e($customOrder->id); ?>">
<button type="submit" class="btn">Pay Deposit (R<?php echo e(number_format($customOrder->deposit_amount, 2)); ?>)</button>
</form>
<?php elseif($customOrder->deposit_status === 'paid' && $customOrder->proofs->where('status', 'approved')->count() > 0 && $customOrder->balance_status !== 'paid'): ?>
<button class="btn" onclick="alert('Balance payment coming soon')">Pay Balance (R<?php echo e(number_format($customOrder->balance_amount, 2)); ?>)</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Terms -->
<div class="terms-box card--pink">
<h3 style="color: var(--text-primary); margin-top: 0;">Payment Terms</h3>
<ul>
<li>The 20% deposit is non-refundable</li>
<li>Balance of 80% must be paid before printing begins</li>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrder->library_discount_applied): ?>
<li>Design may be added to our library</li>
<?php else: ?>
<li>Bespoke, exclusive design</li>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</ul>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const paymentForm = document.querySelector('form[action*="payment"]');
if (paymentForm) {
console.log('Payment form found:', paymentForm);
console.log('Form action:', paymentForm.action);
paymentForm.addEventListener('submit', function(e) {
console.log('Payment form submitted!');
console.log('Form data:', new FormData(this));
});
} else {
console.log('Payment form NOT found');
console.log('All forms on page:', document.querySelectorAll('form'));
}
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/custom-orders/show.blade.php ENDPATH**/ ?>
@@ -0,0 +1,257 @@
<?php $__env->startSection('title', 'Wallpapers - Premium Custom Designs'); ?>
<?php $__env->startSection('styles'); ?>
<style>
.hero-slider {
position: relative;
overflow: hidden;
border-radius: 20px;
margin: 20px;
height: 600px;
}
.hero-slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.8s ease-in-out;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
.hero-slide.active {
opacity: 1;
}
.hero-slide-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
align-items: center;
padding: 6rem 5rem;
height: 100%;
}
.hero-dots {
position: absolute;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 12px;
z-index: 10;
}
.hero-dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
cursor: pointer;
transition: all 0.3s ease;
}
.hero-dot.active {
background: white;
width: 32px;
border-radius: 6px;
}
.hero-content {
color: white;
}
.hero-cta {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}
.hero-slider:hover .hero-dot {
background: rgba(255, 255, 255, 0.7);
}
.hero-slider:hover .hero-dot.active {
background: white;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- HERO SECTION -->
<section class="section" id="hero">
<div class="hero-slider">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $heroImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<div class="hero-slide <?php if($index === 0): ?> active <?php endif; ?>" style="background-image: url('<?php echo e(asset('storage/' . $image->image_path)); ?>');">
<div class="hero-slide-content">
<div>
<div class="hero-content">
<h1 style="color: white; font-size: 3rem;"><?php echo e($image->title); ?></h1>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($image->description): ?>
<p style="color: rgba(255, 255, 255, 0.9); font-size: 1.1rem; max-width: 95%;"><?php echo e($image->description); ?></p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="hero-cta">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($image->button_text && $image->button_link): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(str_starts_with($image->button_link, '#')): ?>
<button class="btn" onclick="document.getElementById('<?php echo e(substr($image->button_link, 1)); ?>').scrollIntoView({behavior: 'smooth'})"><?php echo e($image->button_text); ?></button>
<?php else: ?>
<a href="<?php echo e($image->button_link); ?>" class="btn"><?php echo e($image->button_text); ?></a>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php else: ?>
<button class="btn" onclick="document.getElementById('wallpaper-grid').scrollIntoView({behavior: 'smooth'})">Browse Wallpapers</button>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</div>
<div></div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<!-- Fallback hero image if none are configured in admin -->
<div class="hero-slide active" style="background: linear-gradient(to right, rgba(45, 80, 71, 0.7), rgba(45, 80, 71, 0.5)), url('https://images.unsplash.com/photo-1552321554-5fefe8c9ef14?w=1200&q=80') center/cover no-repeat;">
<div class="hero-slide-content">
<div>
<div class="hero-content">
<h1 style="color: white; font-size: 3rem;">Premium Custom Wallpapers</h1>
<p style="color: rgba(255, 255, 255, 0.95); font-size: 1.1rem;">Transform your spaces with our carefully curated collection of high-quality wallpapers. From botanical motifs to contemporary geometric patterns, each design is crafted with precision and printed to perfection.</p>
<div class="hero-cta">
<button class="btn" onclick="document.getElementById('wallpaper-grid').scrollIntoView({behavior: 'smooth'})">Browse Wallpapers</button>
</div>
</div>
</div>
<div></div>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="hero-dots">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $heroImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<div class="hero-dot <?php if($index === 0): ?> active <?php endif; ?>" data-slide="<?php echo e($index); ?>"></div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<div class="hero-dot active" data-slide="0"></div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</section>
<script>
document.addEventListener('DOMContentLoaded', function() {
const slides = document.querySelectorAll('.hero-slide');
const dots = document.querySelectorAll('.hero-dot');
const slider = document.querySelector('.hero-slider');
let currentSlide = 0;
let autoAdvanceInterval;
function showSlide(n) {
if (slides.length === 0) return;
slides.forEach(s => s.classList.remove('active'));
dots.forEach(d => d.classList.remove('active'));
currentSlide = (n + slides.length) % slides.length;
slides[currentSlide].classList.add('active');
dots[currentSlide].classList.add('active');
}
function startAutoAdvance() {
autoAdvanceInterval = setInterval(() => {
showSlide(currentSlide + 1);
}, 5000);
}
function resetAutoAdvance() {
clearInterval(autoAdvanceInterval);
startAutoAdvance();
}
dots.forEach(dot => {
dot.addEventListener('click', () => {
showSlide(parseInt(dot.getAttribute('data-slide')));
resetAutoAdvance();
});
});
slider.addEventListener('mouseenter', () => clearInterval(autoAdvanceInterval));
slider.addEventListener('mouseleave', startAutoAdvance);
startAutoAdvance();
});
</script>
<!-- WALLPAPER GRID -->
<section class="section" id="wallpaper-grid" style="padding: 2rem 0;">
<div class="container">
<div style="display: flex; gap: 2rem; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 2rem;">
<div>
<h3>All Wallpapers</h3>
<p style="color: var(--text-secondary);">Showing all designs</p>
</div>
<div style="display: flex; gap: 1rem;">
<select style="padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 0.9rem;">
<option>Sort by: Featured</option>
<option>Newest</option>
<option>Price: Low to High</option>
<option>Price: High to Low</option>
</select>
</div>
</div>
<div style="display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem;">
<button class="filter-btn active" data-filter="all">All</button>
<button class="filter-btn" data-filter="botanical">Botanical</button>
<button class="filter-btn" data-filter="vintage">Vintage</button>
<button class="filter-btn" data-filter="modern">Modern</button>
<button class="filter-btn" data-filter="geometric">Geometric</button>
<button class="filter-btn" data-filter="texture">Texture</button>
<button class="filter-btn" data-filter="floral">Floral</button>
</div>
</div>
<div class="container">
<div class="grid grid--3">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<?php echo $__env->make('components.product-card', ['product' => $product], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
<p>No products available</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</section>
<!-- CTA SECTION -->
<section class="section section--highlight">
<div class="container" style="text-align: center;">
<h2>Need Help Choosing?</h2>
<p style="max-width: 600px; margin: 0 auto var(--spacing-lg); color: var(--text-primary);">
Schedule a free consultation with our design experts. We'll help you find the perfect wallpaper for your space.
</p>
<button class="btn btn--secondary">Book a Free Consultation</button>
</div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
<script>
document.querySelectorAll('.filter-btn').forEach(btn => {
btn.addEventListener('click', function() {
const filter = this.dataset.filter;
document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
this.classList.add('active');
document.querySelectorAll('[data-category]').forEach(card => {
if (filter === 'all' || card.dataset.category === filter) {
card.style.display = '';
} else {
card.style.display = 'none';
}
});
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/wallpapers.blade.php ENDPATH**/ ?>
@@ -1,146 +0,0 @@
<?php $__env->startSection('title', 'Deposit Payment Successful'); ?>
<?php $__env->startSection('styles'); ?>
<style>
.success-container {
text-align: center;
margin: 3rem 0;
}
.success-icon {
font-size: 4rem;
margin-bottom: 1.5rem;
}
h1 {
font-family: 'Abril Fatface', cursive;
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 1rem;
}
.subtitle {
color: #666;
font-size: 1.1rem;
margin-bottom: 2rem;
}
.order-details {
margin: 2rem 0;
text-align: left;
}
.order-details-inner {
padding: 2rem;
border-radius: 20px;
}
.detail-row {
display: flex;
justify-content: space-between;
padding: 1rem 0;
border-bottom: 1px solid #eee;
}
.detail-row:last-child {
border-bottom: none;
}
.detail-label {
font-weight: 600;
color: var(--primary-color);
}
.detail-value {
color: #666;
}
.next-steps-title {
font-family: 'Abril Fatface', cursive;
font-size: 1.3rem;
color: var(--primary-color);
margin-bottom: 1.5rem;
text-align: left;
}
.next-steps-inner {
padding: 2rem;
border-radius: 20px;
}
.next-steps ul {
color: #666;
padding-left: 0;
list-style: none;
}
.next-steps li {
margin-bottom: 0.8rem;
}
.actions {
margin-top: 2rem;
text-align: center;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<main class="container">
<div class="success-container">
<div class="success-icon"></div>
<h1>Deposit Payment Successful!</h1>
<p class="subtitle">Your deposit payment has been received and processed successfully.</p>
<!-- Order Details -->
<div class="order-details card">
<div class="order-details-inner">
<div class="detail-row">
<span class="detail-label">Order Number:</span>
<span class="detail-value"><strong><?php echo e($customOrder->order_number); ?></strong></span>
</div>
<div class="detail-row">
<span class="detail-label">Order Type:</span>
<span class="detail-value"><?php echo e(ucfirst($customOrder->type)); ?></span>
</div>
<div class="detail-row">
<span class="detail-label">Deposit Amount Paid:</span>
<span class="detail-value"><strong>R<?php echo e(number_format($customOrder->deposit_amount, 2)); ?></strong></span>
</div>
<div class="detail-row">
<span class="detail-label">Remaining Balance:</span>
<span class="detail-value">R<?php echo e(number_format($customOrder->balance_amount, 2)); ?></span>
</div>
<div class="detail-row">
<span class="detail-label">Total Project Cost:</span>
<span class="detail-value"><strong>R<?php echo e(number_format($customOrder->total_cost, 2)); ?></strong></span>
</div>
</div>
</div>
<!-- What's Next -->
<div class="card--pink">
<div class="next-steps-inner">
<h2 class="next-steps-title" style="text-align: center;">What Happens Next?</h2>
<ul class="next-steps">
<li>Your design requirements have been received and confirmed</li>
<li>Our design team will review your specifications and reference images</li>
<li>You'll receive proof designs for your approval within 3-5 business days</li>
<li>Once you approve the proofs, we'll prepare for printing</li>
<li>The remaining balance (80%) will be due before printing begins</li>
</ul>
</div>
</div>
</div>
<!-- Actions -->
<div class="actions">
<a href="<?php echo e(route('custom-orders.show', $customOrder)); ?>" class="btn">View Order Details</a>
<a href="<?php echo e(route('custom-orders.index')); ?>" class="btn btn--secondary">Back to My Orders</a>
</div>
</main>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/custom-orders/deposit-success.blade.php ENDPATH**/ ?>
@@ -1,7 +0,0 @@
<?php $__env->startSection('title', __('Not Found')); ?>
<?php $__env->startSection('code', '404'); ?>
<?php $__env->startSection('message', __('Not Found')); ?>
<?php echo $__env->make('errors::minimal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/404.blade.php ENDPATH**/ ?>
@@ -480,10 +480,29 @@
<a href="<?php echo e(route('cart')); ?>" class="btn btn--secondary" style="flex: 1; text-align: center;">View Cart</a>
</div>
<div class="btn-group " style="margin-top: 1rem; gap: 1rem;">
<button class="btn btn--secondary" style="flex: 1;">Order Sample</button>
<button type="button" class="btn btn--secondary" style="flex: 1;" onclick="orderSample()">Order Sample</button>
</div>
</form>
<!-- Sample Order Form (Hidden) -->
<form id="sampleForm" action="<?php echo e(route('order-sample', $product)); ?>" method="POST" style="display: none;">
<?php echo csrf_field(); ?>
<input type="hidden" name="print_stock_id" id="sampleStockId">
</form>
<script>
function orderSample() {
const stockSelect = document.getElementById('print_stock_id');
if (!stockSelect.value) {
alert('Please select a stock option before ordering a sample.');
stockSelect.focus();
return;
}
document.getElementById('sampleStockId').value = stockSelect.value;
document.getElementById('sampleForm').submit();
}
</script>
<script>
const productType = 'wallpaper' === 'wallpaper' ? 'wallpaper' : 'mural';
const basePrice = <?php echo e($product->price); ?>;
@@ -1,358 +0,0 @@
<?php $__env->startSection('title', 'My Custom Orders'); ?>
<?php $__env->startSection('styles'); ?>
<style>
h1 {
font-family: 'Abril Fatface', cursive;
font-size: 2.5rem;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
h2 {
font-family: 'Abril Fatface', cursive;
font-size: 1.6rem;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
}
.page-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: var(--spacing-lg);
gap: var(--spacing-md);
}
.page-header-content {
flex: 1;
}
.page-header p {
color: var(--text-secondary);
font-size: 1rem;
}
.empty-state {
background-color: var(--bg-secondary);
border-radius: 8px;
padding: var(--spacing-xl);
text-align: center;
margin-bottom: var(--spacing-lg);
}
.empty-state-icon {
font-size: 3rem;
margin-bottom: var(--spacing-md);
}
.empty-state h2 {
margin-bottom: 0.5rem;
}
.empty-state p {
color: var(--text-secondary);
margin-bottom: var(--spacing-lg);
}
.orders-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
gap: var(--spacing-lg);
margin-bottom: var(--spacing-lg);
}
.order-card {
overflow: hidden;
}
.order-card.card:hover {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.order-card-header {
padding: var(--spacing-lg);
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.order-number {
font-family: var(--font-sans);
font-weight: 600;
color: var(--text-primary);
font-size: 1.1rem;
margin-bottom: 0.25rem;
}
.order-date {
color: var(--text-secondary);
font-size: 0.9rem;
}
.order-card-body {
padding: var(--spacing-lg);
}
.order-detail {
margin-bottom: var(--spacing-md);
}
.order-detail:last-child {
margin-bottom: 0;
}
.order-detail-label {
font-weight: 600;
color: var(--text-primary);
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 0.25rem;
}
.order-detail-value {
color: var(--text-secondary);
font-size: 1rem;
text-transform: capitalize;
}
.order-details-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--spacing-md);
}
.order-card-footer {
padding: var(--spacing-lg);
border-top: 1px solid var(--border-color);
display: flex;
gap: var(--spacing-md);
}
.order-card-footer a {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
}
.progress-indicator {
display: flex;
gap: var(--spacing-sm);
margin-bottom: var(--spacing-md);
}
.progress-step {
flex: 1;
height: 4px;
background-color: var(--border-color);
border-radius: 2px;
overflow: hidden;
}
.progress-step.active {
background-color: var(--accent-dark);
}
.progress-step.completed {
background-color: #4caf50;
}
.status-flow {
display: flex;
align-items: center;
gap: var(--spacing-sm);
font-size: 0.85rem;
color: var(--text-secondary);
margin-bottom: var(--spacing-md);
flex-wrap: wrap;
}
.status-flow-item {
display: flex;
align-items: center;
gap: 0.25rem;
}
.status-flow-arrow {
color: var(--border-color);
margin: 0 0.25rem;
}
.alert {
padding: var(--spacing-md);
border-radius: 8px;
margin-bottom: var(--spacing-lg);
border: 1px solid;
}
.alert-success {
background-color: #e8f5e9;
border-color: #c8e6c9;
color: #2e7d32;
}
@media (max-width: 768px) {
h1 {
font-size: 2rem;
}
.page-header {
flex-direction: column;
}
.orders-grid {
grid-template-columns: 1fr;
}
.order-details-grid {
grid-template-columns: 1fr;
}
.order-card-footer {
flex-direction: column;
}
.order-card-footer a {
display: block;
}
.status-flow {
flex-direction: column;
align-items: flex-start;
}
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container" style="margin-top:20px;">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(session('success')): ?>
<div class="alert alert-success">
<?php echo e(session('success')); ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="page-header">
<div class="page-header-content">
<h1>My Custom Orders</h1>
<p>Track and manage your custom printing orders</p>
</div>
<a href="<?php echo e(route('custom-orders.create')); ?>" class="btn">Create New Order</a>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrders->isEmpty()): ?>
<div class="empty-state">
<div class="empty-state-icon">📋</div>
<h2>No Custom Orders Yet</h2>
<p>You haven't created any custom orders yet. Start by designing your unique print today!</p>
<a href="<?php echo e(route('custom-orders.create')); ?>" class="btn">Create Your First Order</a>
</div>
<?php else: ?>
<div class="orders-grid">
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $customOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="order-card card">
<div class="order-card-header">
<div>
<div class="order-number">Order #<?php echo e($order->order_number); ?></div>
<div class="order-date"><?php echo e($order->created_at->format('d M Y')); ?></div>
</div>
<span class="status-badge <?php echo e($order->status); ?>">
<?php echo e(str_replace('_', ' ', ucfirst($order->status))); ?>
</span>
</div>
<div class="order-card-body">
<!-- Progress Indicator -->
<div class="progress-indicator">
<?php
$statuses = ['submitted', 'approved', 'in_production', 'proof_ready', 'completed'];
$currentIndex = array_search($order->status, $statuses);
?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $statuses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="progress-step <?php echo e($index <= $currentIndex ? 'completed' : ($index === $currentIndex + 1 ? 'active' : '')); ?>"></div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Order Details Grid -->
<div class="order-details-grid">
<div class="order-detail">
<div class="order-detail-label">Type</div>
<div class="order-detail-value"><?php echo e(ucfirst($order->type)); ?></div>
</div>
<div class="order-detail">
<div class="order-detail-label">Status</div>
<div class="order-detail-value">
<?php echo e(str_replace('_', ' ', ucfirst($order->status))); ?>
</div>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->specifications): ?>
<div class="order-detail">
<div class="order-detail-label">Quantity</div>
<div class="order-detail-value"><?php echo e($order->specifications->quantity); ?></div>
</div>
<div class="order-detail">
<div class="order-detail-label">Stock</div>
<div class="order-detail-value">
<?php echo e($order->specifications->printStock ? $order->specifications->printStock->name : 'N/A'); ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Payment Status -->
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->total_cost): ?>
<div class="order-detail">
<div class="order-detail-label">Total Cost</div>
<div class="order-detail-value" style="font-weight: 600; color: var(--accent-dark); font-size: 1.1rem;">
R<?php echo e(number_format($order->total_cost, 2)); ?>
</div>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<!-- Status Flow -->
<div class="status-flow">
<div class="status-flow-item">
<span><?php echo e($order->deposit_status === 'paid' ? '✓' : '○'); ?></span>
<span>Deposit</span>
</div>
<div class="status-flow-arrow"></div>
<div class="status-flow-item">
<span><?php echo e($order->status === 'approved' ? '✓' : '○'); ?></span>
<span>Approved</span>
</div>
<div class="status-flow-arrow"></div>
<div class="status-flow-item">
<span><?php echo e(in_array($order->status, ['in_production', 'proof_ready', 'completed']) ? '✓' : '○'); ?></span>
<span>Production</span>
</div>
</div>
</div>
<div class="order-card-footer">
<a href="<?php echo e(route('custom-orders.show', $order->uuid)); ?>">View Details</a>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($order->deposit_status === 'unpaid'): ?>
<a href="<?php echo e(route('custom-orders.show', $order->uuid)); ?>" class="secondary">Pay Deposit</a>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/custom-orders/index.blade.php ENDPATH**/ ?>
@@ -1,277 +0,0 @@
<?php $__env->startSection('title', 'My Orders - Additional Design'); ?>
<?php $__env->startSection('styles'); ?>
<style>
h1 {
font-family: 'Abril Fatface', cursive;
font-size: 2.5rem;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
h2 {
font-family: 'Abril Fatface', cursive;
font-size: 1.8rem;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
}
.page-intro {
margin-bottom: var(--spacing-lg);
}
.page-intro p {
color: var(--text-secondary);
font-size: 1.1rem;
}
.orders-section {
margin-bottom: var(--spacing-xl);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--spacing-md);
}
.btn-new {
display: inline-block;
}
@media (max-width: 768px) {
.btn-new {
display: block;
width: 100%;
}
}
.table-container {
border-radius: 20px;
overflow: hidden;
}
table {
width: 100%;
border-collapse: collapse;
}
thead {
background-color: var(--bg-secondary);
border-bottom: 1px solid var(--border-color);
}
th {
padding: var(--spacing-sm) var(--spacing-md);
text-align: left;
font-weight: 600;
font-size: 0.9rem;
color: var(--text-primary);
}
tbody tr {
border-bottom: 1px solid var(--border-color);
transition: background-color 0.2s;
}
tbody tr:hover {
background-color: var(--bg-primary);
}
td {
padding: var(--spacing-sm) var(--spacing-md);
font-size: 0.95rem;
color: var(--text-secondary);
}
.order-number {
font-weight: 600;
color: var(--text-primary);
}
.badge {
display: inline-block;
padding: 0.35rem 0.75rem;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
}
.btn-view {
color: var(--text-primary);
font-weight: 600;
text-decoration: none;
transition: var(--transition);
}
.btn-view:hover {
color: var(--accent-dark);
}
.empty-state {
border-radius: 20px;
}
.empty-state p {
font-size: 1.05rem;
margin-bottom: var(--spacing-md);
}
.empty-state a {
color: var(--text-primary);
font-weight: 600;
text-decoration: none;
padding: var(--spacing-sm) var(--spacing-lg);
background-color: var(--accent-dark);
color: white;
border-radius: 4px;
display: inline-block;
transition: var(--transition);
}
.empty-state a:hover {
background-color: #333;
}
@media (max-width: 768px) {
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.4rem;
}
.section-header {
flex-direction: column;
align-items: flex-start;
gap: var(--spacing-sm);
}
table {
font-size: 0.85rem;
}
th, td {
padding: var(--spacing-xs) var(--spacing-sm);
}
.btn-new {
width: 100%;
text-align: center;
}
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container">
<div class="page-intro">
<h1>My Orders</h1>
<p>View your standard and custom orders</p>
</div>
<!-- Standard Orders -->
<div class="orders-section">
<h2>Standard Orders</h2>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($standardOrders->count() > 0): ?>
<div class="table-container card">
<table>
<thead>
<tr>
<th>Order #</th>
<th>Date</th>
<th>Total</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $standardOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td class="order-number"><?php echo e($order->order_number); ?></td>
<td><?php echo e($order->created_at->format('d M Y')); ?></td>
<td><strong>R<?php echo e(number_format($order->total, 2)); ?></strong></td>
<td>
<span class="status-badge <?php echo e($order->status); ?>">
<?php echo e(ucfirst(str_replace('_', ' ', $order->status))); ?>
</span>
</td>
<td>
<a href="<?php echo e(route('my-orders.detail', $order)); ?>" class="btn-view">View Details</a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="empty-state card--pink">
<p>You haven't placed any standard orders yet.</p>
<a href="<?php echo e(route('wallpapers')); ?>">Browse Products</a>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<!-- Custom Orders -->
<div class="orders-section">
<div class="section-header">
<h2 style="margin-bottom: 0;">Custom Orders</h2>
<a href="<?php echo e(route('custom-orders.create')); ?>" class="btn btn-new">+ New Custom Order</a>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($customOrders->count() > 0): ?>
<div class="table-container card">
<table>
<thead>
<tr>
<th>Order #</th>
<th>Type</th>
<th>Total</th>
<th>Status</th>
<th>Deposit</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $customOrders; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $order): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td class="order-number"><?php echo e($order->order_number); ?></td>
<td class="capitalize"><?php echo e(ucfirst($order->type)); ?></td>
<td><strong>R<?php echo e(number_format($order->total_cost, 2)); ?></strong></td>
<td>
<span class="status-badge <?php echo e($order->status); ?>">
<?php echo e(str_replace('_', ' ', ucfirst($order->status))); ?>
</span>
</td>
<td>
<span class="status-badge <?php echo e($order->deposit_status); ?>">
<?php echo e(ucfirst($order->deposit_status)); ?>
</span>
</td>
<td>
<a href="<?php echo e(route('custom-orders.show', $order)); ?>" class="btn-view">View Details</a>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</tbody>
</table>
</div>
<?php else: ?>
<div class="empty-state card--pink">
<p>You haven't created any custom orders yet.</p>
<a href="<?php echo e(route('custom-orders.create')); ?>">Create Custom Order</a>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/account/orders.blade.php ENDPATH**/ ?>
@@ -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>
@@ -1,795 +0,0 @@
<?php $__env->startSection('title', 'Request Custom Design - Additional Design'); ?>
<?php $__env->startSection('styles'); ?>
<style>
.page-intro {
margin-bottom: var(--spacing-lg);
}
.page-intro h1 {
font-family: 'Abril Fatface', cursive;
font-size: 2.5rem;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.page-intro p {
color: var(--text-secondary);
font-size: 1.1rem;
}
.form-card {
margin-bottom: var(--spacing-lg);
max-width: 700px;
}
.form-section h2 {
font-family: 'Abril Fatface', cursive;
font-size: 1.6rem;
color: var(--text-primary);
/* margin-bottom: var(--spacing-md); */
}
.form-section {
/* margin-bottom: var(--spacing-lg); */
}
.form-section:last-child {
margin-bottom: 0;
}
.form-group {
margin-bottom: var(--spacing-md);
}
.form-group label {
display: block;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.form-group-hint {
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 0.75rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--spacing-sm);
}
.form-row.full {
grid-template-columns: 1fr;
}
.form-group input,
.form-group textarea,
.form-group select {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 1rem;
font-family: inherit;
background-color: white;
box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: var(--accent-dark);
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.form-group textarea {
resize: vertical;
min-height: 120px;
}
.upload-area {
border: 2px dashed var(--border-color);
border-radius: 8px;
padding: var(--spacing-lg);
text-align: center;
cursor: pointer;
transition: var(--transition);
background-color: var(--bg-primary);
}
.upload-area:hover {
border-color: var(--accent-dark);
background-color: var(--bg-secondary);
}
.upload-area svg {
width: 48px;
height: 48px;
color: var(--text-secondary);
margin: 0 auto var(--spacing-sm);
}
.upload-area p {
margin: 0.25rem 0;
}
.upload-area .hint {
font-size: 0.85rem;
color: var(--text-secondary);
}
.file-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
background-color: var(--bg-secondary);
border-radius: 4px;
margin-top: 0.5rem;
font-size: 0.9rem;
}
.file-item svg {
width: 18px;
height: 18px;
color: var(--accent-dark);
flex-shrink: 0;
}
.checkbox-group {
padding: var(--spacing-md);
background-color: var(--bg-secondary);
border-radius: 20px;
margin-bottom: var(--spacing-md);
}
.checkbox-option {
display: flex;
gap: var(--spacing-md);
cursor: pointer;
}
.checkbox-option input[type="checkbox"] {
margin-top: 2px;
cursor: pointer;
}
.checkbox-content p {
margin-bottom: 0.5rem;
}
.button-group {
display: flex;
gap: var(--spacing-md);
margin-top: var(--spacing-lg);
}
.button-group .btn {
flex: 1;
}
.btn-cancel {
background-color: var(--bg-secondary) !important;
color: var(--text-primary) !important;
border: 1px solid var(--border-color) !important;
}
.btn-cancel:hover {
background-color: var(--border-color) !important;
color: var(--text-primary) !important;
}
.error-message {
color: #c53030;
font-size: 0.9rem;
margin-top: 0.5rem;
}
.info-box {
margin-bottom: var(--spacing-lg);
}
.info-box h3 {
font-family: var(--font-sans);
font-size: 1.2rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
margin-top: 0;
}
.info-box ul {
list-style-position: inside;
margin: 0;
padding: 0;
}
.info-box li {
margin-bottom: 0.5rem;
}
.form-wrapper {
display: grid;
grid-template-columns: 1fr 450px;
gap: var(--spacing-lg);
margin-bottom: var(--spacing-lg);
}
.cost-summary {
height: fit-content;
position: sticky;
top: 120px;
}
.cost-summary-content {
margin-bottom: var(--spacing-md);
}
.cost-summary-content h3 {
font-family: 'Abril Fatface', cursive;
font-size: 1.3rem;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
}
.cost-item {
display: flex;
justify-content: space-between;
padding: var(--spacing-sm) 0;
border-bottom: 1px solid var(--border-color);
font-size: 0.95rem;
}
.cost-item.total {
font-weight: 700;
font-size: 1.1rem;
border-top: 2px solid var(--accent-dark);
border-bottom: none;
margin-top: var(--spacing-md);
padding-top: var(--spacing-md);
color: var(--accent-dark);
}
.cost-label {
color: var(--text-secondary);
}
.cost-value {
font-weight: 600;
color: var(--text-primary);
}
.cost-item.total .cost-value {
color: var(--accent-dark);
}
.design-fee-note {
font-size: 0.85rem;
color: var(--text-secondary);
margin-top: var(--spacing-md);
padding-top: var(--spacing-md);
border-top: 1px solid var(--border-color);
}
.cost-item.disabled {
opacity: 0.5;
color: var(--text-secondary);
}
.cost-item.discount {
color: var(--accent-pink);
}
.cost-item.discount .cost-value {
color: var(--accent-pink);
}
@media (max-width: 768px) {
.form-wrapper {
grid-template-columns: 1fr;
}
.cost-summary-content {
position: static;
}
.form-card {
padding: var(--spacing-md);
}
.form-row {
grid-template-columns: 1fr;
}
.button-group {
flex-direction: column;
}
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="container" style="padding:20px;">
<div class="page-intro">
<h1>Request Custom Design</h1>
<p>Create a custom wallpaper, mural, or fabric design tailored to your needs</p>
</div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($errors->any()): ?>
<div style="background-color: #f8d7da; border: 1px solid var(--border-color); color: var(--text-primary); padding: var(--spacing-md); border-radius: 8px; margin-bottom: var(--spacing-lg);">
<h4 style="margin-top: 0;">Please correct the following errors:</h4>
<ul>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><?php echo e($error); ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</ul>
</div>
<?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(session('success')): ?>
<div style="background-color: var(--accent-light); border: 1px solid var(--border-color); color: var(--text-primary); padding: var(--spacing-md); border-radius: 8px; margin-bottom: var(--spacing-lg);">
<?php echo e(session('success')); ?>
</div>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<!-- Info Box -->
<div class="info-box card--pink">
<h2>How It Works</h2>
<ul>
<li>Submit your custom order with design specifications and reference images</li>
<li>Pay a 20% non-refundable deposit to commence design work</li>
<li>Our team creates your design and prepares proofs for review</li>
<li>Pay the remaining 80% balance to proceed with printing and shipping</li>
</ul>
</div>
<!-- Form -->
<div class="form-wrapper">
<form action="<?php echo e(route('custom-orders.store')); ?>" method="POST" enctype="multipart/form-data" id="custom-order-form" class="form-card card" data-action="<?php echo e(route('custom-orders.store')); ?>">
<?php echo csrf_field(); ?>
<!-- Order Type & Dimensions -->
<div class="form-section">
<h2>Order Details</h2>
<div class="form-group">
<label for="type">Order Type *</label>
<select id="type" name="type" required>
<option value="">-- Select a type --</option>
<option value="wallpaper" <?php echo e(old('type') == 'wallpaper' ? 'selected' : ''); ?>>Wallpaper (tileable pattern)</option>
<option value="mural" <?php echo e(old('type') == 'mural' ? 'selected' : ''); ?>>Mural (large format)</option>
<option value="fabric" <?php echo e(old('type') == 'fabric' ? 'selected' : ''); ?>>Fabric (linear meter)</option>
</select>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="form-row">
<div class="form-group">
<label for="width">Width (meters) *</label>
<input type="number" id="width" name="width" step="0.01" min="0.1" value="<?php echo e(old('width')); ?>" required>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['width'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="form-group">
<label for="height">Height (meters) *</label>
<input type="number" id="height" name="height" step="0.01" min="0.1" value="<?php echo e(old('height')); ?>" required>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['height'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label for="quantity">Quantity *</label>
<input type="number" id="quantity" name="quantity" value="<?php echo e(old('quantity', 1)); ?>" min="1" required>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['quantity'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="form-group">
<label for="print_stock_id">Print Material *</label>
<select id="print_stock_id" name="print_stock_id" required>
<option value="">-- Select material --</option>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $printStocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($stock->id); ?>" <?php echo e(old('print_stock_id') == $stock->id ? 'selected' : ''); ?>>
<?php echo e($stock->name); ?> (<?php echo e($stock->cost_per_meter ? 'R' . number_format($stock->cost_per_meter, 2) . '/m' : 'R' . number_format($stock->cost_per_m2, 2) . '/m²'); ?>)
</option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</select>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['print_stock_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
</div>
<!-- Design Brief -->
<div class="form-section">
<h2>Design Brief</h2>
<div class="form-group form-row full">
<label for="customer_brief">Design Brief (minimum 50 characters) *</label>
<p class="form-group-hint">Tell us about your design concept, colors, style, and any specific requirements</p>
<textarea id="customer_brief" name="customer_brief" placeholder="Describe your custom design vision..." minlength="50" required><?php echo e(old('customer_brief')); ?></textarea>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['customer_brief'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
<div class="form-group form-row full">
<label for="special_instructions">Special Instructions (optional)</label>
<textarea id="special_instructions" name="special_instructions" placeholder="Any additional notes or requirements..."><?php echo e(old('special_instructions')); ?></textarea>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['special_instructions'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<!-- Reference Images -->
<div class="form-section">
<h2>Reference Images</h2>
<div class="form-group form-row full">
<label>Upload Reference Images</label>
<p class="form-group-hint">Upload inspiration images, mood boards, or reference materials for your design</p>
<div class="upload-area" onclick="document.getElementById('reference-images').click()">
<input type="file" id="reference-images" name="reference_images[]" multiple accept="image/*" style="display: none;">
<svg fill="none" stroke="currentColor" viewBox="0 0 48 48">
<path d="M28 8H12a4 4 0 00-4 4v20m32-12v8a4 4 0 01-4 4H12a4 4 0 01-4-4v-4m32-12l-3.172-3.172a4 4 0 00-5.656 0L28 12M12 32l3.172-3.172a4 4 0 015.656 0L32 32" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<p style="margin: 0;">Click to upload or drag and drop</p>
<p class="hint">PNG, JPG, GIF, WebP up to 5MB</p>
</div>
<div id="file-list"></div>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__errorArgs = ['reference_images.*'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
<p class="error-message"><?php echo e($message); ?></p>
<?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</div>
</div>
<!-- Library Agreement -->
<div class="form-section">
<h2>Design Library</h2>
<div class="checkbox-group">
<label class="checkbox-option">
<input type="checkbox" name="library_discount" value="1" <?php echo e(old('library_discount') ? 'checked' : ''); ?>>
<div class="checkbox-content">
<p style="font-weight: 600; margin-bottom: 0.25rem;">Allow us to use your design in our library</p>
<p>If you agree, we'll apply a <strong>20% discount to the design fee</strong>. This means we may offer similar designs to other customers in the future.</p>
</div>
</label>
</div>
</div>
<!-- Submit Buttons -->
<div class="button-group">
<button type="submit" class="btn">Submit Order</button>
<a href="<?php echo e(route('my-orders')); ?>" class="btn btn-cancel">Cancel</a>
</div>
</form>
<!-- Cost Summary Sidebar -->
<div class="cost-summary">
<div class="cost-summary-content card">
<h3>Cost Summary</h3>
<div class="cost-item disabled" id="material-cost-item">
<span class="cost-label">Material Cost</span>
<span class="cost-value">-</span>
</div>
<div class="cost-item disabled" id="design-fee-item">
<span class="cost-label">Design Fee</span>
<span class="cost-value">-</span>
</div>
<div class="cost-item disabled" id="discount-item" style="display: none;">
<span class="cost-label">Library Discount</span>
<span class="cost-value">-</span>
</div>
<div class="cost-item total">
<span>Deposit Required (20%)</span>
<span class="cost-value" id="deposit-amount">R0.00</span>
</div>
<div class="design-fee-note">
<strong>Note:</strong> 20% non-refundable deposit covers design work. Pay the remaining 80% after proof approval.
</div>
</div>
<div class="card" style="padding: 1.5rem; margin-bottom: 1rem; background: var(--accent-light);">
<p style="margin: 0 0 0.5rem 0; color: black;">Estimated Total:</p>
<div style="font-family: 'Abril Fatface', cursive; font-size: 3rem; font-weight: 400; color: white;">R<span id="total-cost">0.00</span></div>
<small style="color: #fff; display: block; margin-top: 0.5rem;">incl. VAT</small>
</div>
</div>
<!-- Total Cost Display -->
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
console.log('=== CUSTOM ORDER FORM DEBUG ===');
const form = document.getElementById('custom-order-form');
console.log('Form element:', form);
console.log('Form action:', form.action);
console.log('Form method:', form.method);
console.log('Form enctype:', form.enctype);
console.log('Form ID:', form.id);
console.log('Form classes:', form.className);
if (!form) {
console.error('FORM NOT FOUND!');
return;
}
// ===== COST CALCULATION =====
const DESIGN_FEE = 500; // Base design fee in Rands
const DISCOUNT_PERCENTAGE = 0.20; // 20% discount for library usage
// Get form inputs
const typeSelect = document.getElementById('type');
const widthInput = document.getElementById('width');
const heightInput = document.getElementById('height');
const quantityInput = document.getElementById('quantity');
const stockSelect = document.getElementById('print_stock_id');
const libraryCheckbox = document.querySelector('input[name="library_discount"]');
// Get summary elements
const materialCostItem = document.getElementById('material-cost-item');
const designFeeItem = document.getElementById('design-fee-item');
const discountItem = document.getElementById('discount-item');
const depositAmount = document.getElementById('deposit-amount');
// Store print stocks data
const printStocksData = {};
<?php $__currentLoopData = $printStocks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stock): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
printStocksData[<?php echo e($stock->id); ?>] = {
name: '<?php echo e($stock->name); ?>',
width: <?php echo e($stock->width ?? 0.53); ?>,
costPerMeter: <?php echo e($stock->cost_per_meter ?? 0); ?>,
costPerM2: <?php echo e($stock->cost_per_m2 ?? 0); ?>
};
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
function calculateCosts() {
const type = typeSelect.value;
const width = parseFloat(widthInput.value) || 0;
const height = parseFloat(heightInput.value) || 0;
const quantity = parseFloat(quantityInput.value) || 1;
const stockId = stockSelect.value;
const hasLibraryDiscount = libraryCheckbox?.checked || false;
if (!type || !stockId || width <= 0 || height <= 0) {
// Show disabled state
materialCostItem.classList.add('disabled');
designFeeItem.classList.add('disabled');
discountItem.style.display = 'none';
depositAmount.textContent = 'R0.00';
document.getElementById('total-cost').textContent = '0.00';
document.getElementById('cost-breakdown').textContent = '';
return;
}
const stock = printStocksData[stockId];
if (!stock) return;
// Calculate material cost based on type
let materialCost = 0;
let breakdown = '';
if (type === 'wallpaper') {
// Wallpaper: Takes into account stock width
// Calculate number of vertical strips needed: ceil(wall_height / stock_width)
// Calculate total length: number_of_strips × wall_width
// Cost = total_length × cost_per_meter × quantity
const stockWidth = stock.width || 0.53; // Default to standard wallpaper width if not specified
const stripsNeeded = Math.ceil(height / stockWidth);
const totalLength = stripsNeeded * width;
materialCost = totalLength * stock.costPerMeter * quantity;
breakdown = `Stock: R${stock.costPerMeter.toFixed(2)}/m × ${totalLength.toFixed(2)}m`;
} else if (type === 'mural') {
// Mural: width × height in m²
// Cost = cost_per_m2 × (width × height) × quantity
const area = width * height;
materialCost = area * stock.costPerM2 * quantity;
breakdown = `Stock: R${stock.costPerM2.toFixed(2)}/m² × ${area.toFixed(2)}m²`;
} else if (type === 'fabric') {
// Fabric: width input = length in linear meters
// Cost = cost_per_meter × length × quantity
materialCost = width * stock.costPerMeter * quantity;
breakdown = `Stock: R${stock.costPerMeter.toFixed(2)}/m × ${width.toFixed(2)}m`;
}
// Calculate design fee
let designFee = DESIGN_FEE;
let discount = 0;
if (hasLibraryDiscount) {
discount = designFee * DISCOUNT_PERCENTAGE;
designFee -= discount;
}
// Total cost
const totalCost = materialCost + designFee;
const depositRequired = totalCost * 0.20; // 20% deposit
const remainingBalance = totalCost * 0.80; // 80% remaining
// Update UI
materialCostItem.classList.remove('disabled');
materialCostItem.innerHTML = `<span class="cost-label">Material Cost</span><span class="cost-value">R${materialCost.toFixed(2)}</span>`;
designFeeItem.classList.remove('disabled');
designFeeItem.innerHTML = `<span class="cost-label">Design Fee</span><span class="cost-value">R${designFee.toFixed(2)}</span>`;
if (hasLibraryDiscount && discount > 0) {
discountItem.style.display = 'flex';
discountItem.classList.add('discount');
discountItem.innerHTML = `<span class="cost-label">Library Discount (20%)</span><span class="cost-value">-R${discount.toFixed(2)}</span>`;
} else {
discountItem.style.display = 'none';
}
depositAmount.textContent = `R${depositRequired.toFixed(2)}`;
document.getElementById('total-cost').textContent = `${totalCost.toFixed(2)}`;
document.getElementById('cost-breakdown').textContent = breakdown;
}
// Add event listeners for cost calculation
if (typeSelect) typeSelect.addEventListener('change', calculateCosts);
if (widthInput) widthInput.addEventListener('input', calculateCosts);
if (heightInput) heightInput.addEventListener('input', calculateCosts);
if (quantityInput) quantityInput.addEventListener('input', calculateCosts);
if (stockSelect) stockSelect.addEventListener('change', calculateCosts);
if (libraryCheckbox) libraryCheckbox.addEventListener('change', calculateCosts);
// Update field labels based on type
function updateFieldLabels() {
const type = typeSelect.value;
const widthLabel = document.querySelector('label[for="width"]');
const heightLabel = document.querySelector('label[for="height"]');
const heightGroup = heightInput?.parentElement;
if (type === 'wallpaper') {
if (widthLabel) widthLabel.innerHTML = 'Wall Width (meters) *';
if (heightLabel) heightLabel.innerHTML = 'Wall Height (meters) *<br><small style="font-weight: normal; color: var(--text-secondary); display: block; margin-top: 0.25rem;">The system will calculate strips needed based on stock width</small>';
if (heightGroup) heightGroup.style.display = 'block';
} else if (type === 'mural') {
if (widthLabel) widthLabel.textContent = 'Width (meters) *';
if (heightGroup) heightGroup.style.display = 'block';
if (heightLabel) heightLabel.textContent = 'Height (meters) *';
} else if (type === 'fabric') {
if (widthLabel) widthLabel.textContent = 'Length (meters) *';
if (heightGroup) heightGroup.style.display = 'none';
}
}
if (typeSelect) {
typeSelect.addEventListener('change', updateFieldLabels);
}
// Initial label update
updateFieldLabels();
// Initial calculation
calculateCosts();
// Handle reference image uploads
const referenceImagesInput = document.getElementById('reference-images');
if (referenceImagesInput) {
referenceImagesInput.addEventListener('change', function() {
const fileList = document.getElementById('file-list');
if (fileList) {
fileList.innerHTML = '';
for (let file of this.files) {
const item = document.createElement('div');
item.className = 'file-item';
item.innerHTML = `<svg fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z" clip-rule="evenodd"/></svg><span>${file.name}</span>`;
fileList.appendChild(item);
}
}
});
}
// Find the submit button and log when it's clicked
const submitBtn = form.querySelector('button[type="submit"]');
if (submitBtn) {
console.log('Submit button found:', submitBtn);
submitBtn.addEventListener('click', function(e) {
console.log('===== SUBMIT BUTTON CLICKED =====');
console.log('Event:', e);
console.log('Form will submit to:', form.action);
});
}
// Handle form submission - FORCE IT TO SUBMIT
form.addEventListener('submit', function(e) {
console.log('===== FORM SUBMIT EVENT FIRED =====');
console.log('Event type:', e.type);
console.log('Event defaultPrevented:', e.defaultPrevented);
console.log('Action:', form.action);
console.log('Method:', form.method);
console.log('About to submit to:', form.action);
console.log('Checking if global script should skip this form...');
console.log('Form action includes /custom-orders:', form.action.includes('/custom-orders'));
// Don't prevent - let it submit naturally
});
console.log('Event listeners attached successfully');
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /var/www/additional_design/resources/views/custom-orders/create.blade.php ENDPATH**/ ?>
@@ -226,28 +226,34 @@
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="item-details">
<h3><?php echo e($item['product']->name); ?></h3>
<h3><?php echo e($item['product']->name); ?><?php echo e($item['is_sample'] ? ' - Sample' : ''); ?></h3>
<p><?php echo e($item['product']->category->name); ?></p>
<?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;
}
?>
<?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']): ?>
<p style="font-size: 0.9rem; color: #666;">
Sample - Fixed Price: <span class="item-price">R<?php echo e(number_format(\App\Services\ShippingService::getSampleCost(), 2)); ?></span>
</p>
<?php elseif($item['stock']): ?>
<p style="font-size: 0.9rem; color: #666;">
<?php echo e($item['stock']->name); ?>: <span class="item-price">R<?php echo e(number_format($stockCost, 2)); ?><?php echo e($stockUnit); ?></span>
</p>
<?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'): ?>
<p style="color: #666; font-size: 0.9rem;">Length: <?php echo e($item['length']); ?>m</p>
<?php elseif($item['type'] === 'mural'): ?>
<p style="color: #666; font-size: 0.9rem;">Dimensions: <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)</p>
<?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'): ?>
<p style="color: #666; font-size: 0.9rem;">Length: <?php echo e($item['length']); ?>m</p>
<?php elseif($item['type'] === 'mural'): ?>
<p style="color: #666; font-size: 0.9rem;">Dimensions: <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)</p>
<?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; ?>
<p style="color: var(--primary-color); font-weight: 600;">Subtotal: R<?php echo e(number_format($item['subtotal'], 2)); ?></p>
@@ -279,20 +285,14 @@
<span>Subtotal:</span>
<span>R<?php echo e(number_format($total, 2)); ?></span>
</div>
<div class="summary-row">
<span>Shipping:</span>
<span>Free</span>
</div>
<div class="summary-row">
<span>Tax:</span>
<span>TBD</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($total + $shippingFee, 2)); ?></span>
</div>
<div class="summary-actions">