TRACK YOUR ORDER
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Track Your Order</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
padding: 0;
margin: 0;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 40px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
h1 {
text-align: center;
color: #333;
}
form {
display: flex;
flex-direction: column;
gap: 20px;
}
input[type="text"] {
padding: 12px;
font-size: 16px;
border-radius: 5px;
border: 1px solid #ccc;
}
button {
padding: 14px;
background-color: #28a745;
color: white;
border: none;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #218838;
}
.order-status {
margin-top: 20px;
font-size: 18px;
text-align: center;
color: #28a745;
}
.error-message {
color: #ff0000;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h1>Track Your Order</h1>
<form id="trackOrderForm">
<label for="orderNumber">Order Number:</label>
<input type="text" id="orderNumber" name="orderNumber" placeholder="Enter your order number">
<button type="button" onclick="trackOrder()">Track Order</button>
</form>
<div id="orderStatus" class="order-status"></div>
<div id="errorMessage" class="error-message"></div>
</div>
<script>
function trackOrder() {
const orderNumber = document.getElementById("orderNumber").value;
const orderStatusDiv = document.getElementById("orderStatus");
const errorMessageDiv = document.getElementById("errorMessage");
if (orderNumber === "") {
errorMessageDiv.textContent = "Please enter your order number.";
orderStatusDiv.textContent = "";
return;
}
// Simulate an order tracking system
// In a real application, you would call your Shopify API or backend service
const validOrderNumber = "12345"; // Example valid order number
if (orderNumber === validOrderNumber) {
orderStatusDiv.textContent = "Your order is on the way!";
errorMessageDiv.textContent = "";
} else {
errorMessageDiv.textContent = "Order not found. Please check your order number.";
orderStatusDiv.textContent = "";
}
}
</script>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Track Your Order</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
padding: 0;
margin: 0;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 40px;
background-color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
h1 {
text-align: center;
color: #333;
}
form {
display: flex;
flex-direction: column;
gap: 20px;
}
input[type="text"] {
padding: 12px;
font-size: 16px;
border-radius: 5px;
border: 1px solid #ccc;
}
button {
padding: 14px;
background-color: #28a745;
color: white;
border: none;
font-size: 16px;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #218838;
}
.order-status {
margin-top: 20px;
font-size: 18px;
text-align: center;
color: #28a745;
}
.error-message {
color: #ff0000;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h1>Track Your Order</h1>
<form id="trackOrderForm">
<label for="orderNumber">Order Number:</label>
<input type="text" id="orderNumber" name="orderNumber" placeholder="Enter your order number">
<button type="button" onclick="trackOrder()">Track Order</button>
</form>
<div id="orderStatus" class="order-status"></div>
<div id="errorMessage" class="error-message"></div>
</div>
<script>
function trackOrder() {
const orderNumber = document.getElementById("orderNumber").value;
const orderStatusDiv = document.getElementById("orderStatus");
const errorMessageDiv = document.getElementById("errorMessage");
if (orderNumber === "") {
errorMessageDiv.textContent = "Please enter your order number.";
orderStatusDiv.textContent = "";
return;
}
// Simulate an order tracking system
// In a real application, you would call your Shopify API or backend service
const validOrderNumber = "12345"; // Example valid order number
if (orderNumber === validOrderNumber) {
orderStatusDiv.textContent = "Your order is on the way!";
errorMessageDiv.textContent = "";
} else {
errorMessageDiv.textContent = "Order not found. Please check your order number.";
orderStatusDiv.textContent = "";
}
}
</script>
</body>
</html>