order_sucess.
php
<?php
session_start();
require_once '[Link]';
// Check if order was successful
if (!isset($_SESSION['order_success']) || !$_SESSION['order_success']) {
header('Location: [Link]');
exit;
}
// Get order details from session
$order_id = $_SESSION['order_id'] ?? null;
$invoice_no = $_SESSION['invoice_no'] ?? null;
$total_amount = $_SESSION['total_amount'] ?? null;
$shipping_address = $_SESSION['shipping_address'] ?? [];
// Clear order session data after displaying
unset($_SESSION['order_success']);
unset($_SESSION['order_id']);
unset($_SESSION['invoice_no']);
unset($_SESSION['total_amount']);
unset($_SESSION['shipping_address']);
$pageTitle = 'Order Success - VISHAKHA FABRICS';
include '[Link]';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $pageTitle; ?></title>
<link rel="icon" type="image/png" href="[Link]" sizes="500x500">
<link rel="stylesheet" href="[Link]
awesome/6.4.0/css/[Link]">
<style>
/* Success Page Specific Styles */
.success-container {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
.success-card {
background: white;
border-radius: 1.5rem;
padding: 3rem;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
text-align: center;
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
}
.success-icon {
font-size: 4rem;
color: #10b981;
margin-bottom: 1.5rem;
}
.success-title {
font-size: 2.5rem;
color: #5b21b6;
margin-bottom: 1rem;
font-weight: 700;
}
.success-message {
font-size: 1.125rem;
color: #6b7280;
margin-bottom: 2rem;
line-height: 1.6;
}
.order-details {
background: #f3e8ff;
border-radius: 1rem;
padding: 2rem;
margin: 2rem 0;
text-align: left;
}
.detail-row {
display: flex;
justify-content: space-between;
margin-bottom: 0.75rem;
padding-bottom: 0.75rem;
border-bottom: 1px solid #e5e7eb;
}
.detail-row:last-child {
border-bottom: none;
margin-bottom: 0;
}
.detail-label {
font-weight: 600;
color: #5b21b6;
}
.detail-value {
color: #374151;
font-weight: 500;
}
.shipping-address {
background: #fce7f3;
border-radius: 1rem;
padding: 1.5rem;
margin: 1.5rem 0;
text-align: left;
}
.address-title {
font-weight: 600;
color: #ec4899;
margin-bottom: 1rem;
font-size: 1.125rem;
}
.action-buttons {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 2rem;
flex-wrap: wrap;
}
.btn {
padding: 1rem 2rem;
border-radius: 9999px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary {
background: linear-gradient(135deg, #5b21b6 0%, #ec4899 100%);
color: white;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.btn-secondary {
background: white;
color: #5b21b6;
border: 2px solid #5b21b6;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
.success-card {
padding: 2rem 1.5rem;
}
.success-title {
font-size: 2rem;
}
.action-buttons {
flex-direction: column;
}
.btn {
width: 100%;
justify-content: center;
}
}
</style>
</head>
<body>
<section class="hero-section">
<div class="hero-bg"></div>
<div class="hero-content">
<h1 class="elegant-heading vf-text-gradient" style="font-size: 4rem;">Order
Confirmed!</h1>
<p style="font-size: 1.25rem; color: #374151; max-width: 48rem; margin: 0
auto;">
Thank you for your purchase from Vishakha Fabrics
</p>
</div>
</section>
<section class="section section-white">
<div class="container">
<div class="success-container">
<div class="success-card glass-effect-strong">
<div class="success-icon">
<i class="fas fa-check-circle"></i>
</div>
<h1 class="success-title">Order Placed Successfully!</h1>
<p class="success-message">
Thank you for shopping with Vishakha Fabrics. Your order has
been confirmed and will be processed shortly.
</p>
<div class="order-details">
<h3 style="color: #5b21b6; margin-bottom: 1.5rem; text-align:
center;">Order Details</h3>
<div class="detail-row">
<span class="detail-label">Order ID:</span>
<span class="detail-value">#<?php echo
htmlspecialchars($order_id); ?></span>
</div>
<div class="detail-row">
<span class="detail-label">Invoice Number:</span>
<span class="detail-value"><?php echo
htmlspecialchars($invoice_no); ?></span>
</div>
<div class="detail-row">
<span class="detail-label">Total Amount:</span>
<span class="detail-value" style="font-weight: 700; color:
#5b21b6;">
₹<?php echo number_format($total_amount, 2); ?>
</span>
</div>
<div class="detail-row">
<span class="detail-label">Order Date:</span>
<span class="detail-value"><?php echo date('F j, Y');
?></span>
</div>
<div class="detail-row">
<span class="detail-label">Payment Method:</span>
<span class="detail-value">Cash on Delivery</span>
</div>
</div>
<?php if (!empty($shipping_address)): ?>
<div class="shipping-address">
<h4 class="address-title">Shipping Address</h4>
<p style="color: #374151; line-height: 1.6; margin: 0;">
<strong><?php echo
htmlspecialchars($shipping_address['name'] ?? ''); ?></strong><br>
<?php echo htmlspecialchars($shipping_address['address'] ??
''); ?><br>
<?php echo htmlspecialchars($shipping_address['city'] ??
''); ?>,
<?php echo htmlspecialchars($shipping_address['state'] ??
''); ?> -
<?php echo
htmlspecialchars($shipping_address['postal_code'] ?? ''); ?><br>
Phone: <?php echo
htmlspecialchars($shipping_address['phone'] ?? ''); ?>
</p>
</div>
<?php endif; ?>
<div class="success-message">
<p>You will receive an order confirmation email shortly. For
any queries, please contact our customer support.</p>
</div>
<div class="action-buttons">
<a href="[Link]" class="btn btn-primary">
<i class="fas fa-home"></i>
Continue Shopping
</a>
<a href="order_tracking.php?order_id=<?php echo $order_id; ?>"
class="btn btn-secondary">
<i class="fas fa-truck"></i>
Track Your Order
</a>
</div>
</div>
</div>
</div>
</section>
</body>
</html>