mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 09:40:24 -05:00
Add FAQ, shipping, returns, track order, and privacy policy pages
- faq.php: accordion FAQ with Orders, Coffee & Products, Coffee Freshness & Storage, and Account sections - shipping.php: rates table (3-5 days after processing), processing time, delivery flow - returns.php: three-tier policy (your/our/shared responsibility) adapted from DripShipper - track-order.php: order lookup by order number + email, progress steps, tracking link - privacy.php: full privacy policy adapted for Toms Java Jive - footer.php: added Privacy Policy link to Support section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
$pageTitle = "FAQ - Tom's Java Jive";
|
||||
$metaDescription = "Frequently asked questions about Tom's Java Jive coffee, orders, shipping, and more.";
|
||||
$breadcrumbs = [
|
||||
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
|
||||
['name' => 'FAQ', 'url' => 'https://tomsjavajive.com/faq.php']
|
||||
];
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Frequently Asked Questions</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1.1rem;">Everything you need to know about Tom's Java Jive.</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$faqs = [
|
||||
'Orders & Payment' => [
|
||||
['q' => 'How do I place an order?', 'a' => 'Browse our <a href="/shop.php">shop</a>, add items to your cart, and proceed to checkout. We accept all major credit cards, debit cards, and PayPal.'],
|
||||
['q' => 'Can I modify or cancel my order?', 'a' => 'Orders can be modified or cancelled within 1 hour of placement. After that, orders enter processing and cannot be changed. Contact us immediately at hello@tomsjavajive.com if you need to make a change.'],
|
||||
['q' => 'Is my payment information secure?', 'a' => 'Yes. All payments are processed through Stripe, a PCI-DSS Level 1 certified payment processor. We never store your card details on our servers.'],
|
||||
['q' => 'Do you offer gift cards?', 'a' => 'Yes! Digital gift cards are available in our shop and are delivered by email. They never expire.'],
|
||||
],
|
||||
'Coffee & Products' => [
|
||||
['q' => 'When is my coffee roasted?', 'a' => 'We roast to order — your beans are roasted within 24–48 hours of your order being placed, ensuring maximum freshness when they arrive.'],
|
||||
['q' => 'What grind sizes do you offer?', 'a' => 'We offer whole bean, coarse (French press/cold brew), medium (drip/pour-over), and fine (espresso). Select your preferred grind at checkout.'],
|
||||
['q' => 'How should I store my coffee?', 'a' => 'For maximum freshness, store your coffee in an airtight container in the freezer. Whole beans keep longer than ground coffee. If storing at room temperature, keep in a cool, dark place away from direct sunlight, heat, and moisture.'],
|
||||
['q' => 'Are your coffees organic or fair trade?', 'a' => 'Many of our single origin coffees are sourced from farms with organic and fair trade practices. Each product listing includes sourcing details.'],
|
||||
],
|
||||
'Coffee Freshness & Storage' => [
|
||||
['q' => 'How long does coffee last?', 'a' => 'Properly stored coffee can last for months and even years, though flavor is best enjoyed within a few weeks of the roast date. Whole beans stay fresh longer than ground coffee because less surface area is exposed to air.'],
|
||||
['q' => 'How can I tell if my coffee has gone bad?', 'a' => 'The best way to tell is by smell. If the pleasant aroma is gone, the coffee has likely gone stale. Stale coffee won\'t harm you, but it will have little flavor. It may also appear a lighter brown rather than its usual deep, dark color.'],
|
||||
['q' => 'How should I store coffee beans to keep them fresh?', 'a' => 'Store beans in an airtight container in the freezer for maximum freshness. Whole beans keep longer than ground coffee because less surface area is exposed to air. Grind only the amount you plan to use each day to minimize unnecessary exposure.'],
|
||||
['q' => 'How should I store ground coffee?', 'a' => 'Store ground coffee in an airtight container in your freezer immediately after opening. Freezer storage doesn\'t freeze it solid — it\'s always ready to use without defrosting. Just scoop and brew.'],
|
||||
],
|
||||
'Account & Loyalty' => [
|
||||
['q' => 'Do I need an account to order?', 'a' => 'No, you can check out as a guest. However, creating an account lets you track orders, earn loyalty points, save addresses, and view your order history.'],
|
||||
['q' => 'How does the loyalty program work?', 'a' => 'You earn 1 point for every $1 spent. Points can be redeemed for discounts on future orders. Points are credited once your order is delivered.'],
|
||||
['q' => 'How do I reset my password?', 'a' => 'Click "Forgot Password" on the <a href="/login.php">login page</a> and we\'ll email you a reset link.'],
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($faqs as $category => $items): ?>
|
||||
<div style="margin-bottom: 2.5rem;">
|
||||
<h2 style="font-size: 1.3rem; color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 0.5rem; margin-bottom: 1.25rem;"><?= $category ?></h2>
|
||||
<div style="display: flex; flex-direction: column; gap: 0.75rem;">
|
||||
<?php foreach ($items as $i => $faq): ?>
|
||||
<div style="border: 1px solid var(--border); border-radius: 8px; overflow: hidden;">
|
||||
<button onclick="toggleFaq(this)"
|
||||
style="width: 100%; text-align: left; padding: 1.1rem 1.25rem; background: none; border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; font-weight: 600; color: var(--text);">
|
||||
<?= htmlspecialchars($faq['q']) ?>
|
||||
<span style="font-size: 1.4rem; line-height: 1; color: var(--primary); transition: transform 0.2s; flex-shrink: 0; margin-left: 1rem;">+</span>
|
||||
</button>
|
||||
<div style="display: none; padding: 0 1.25rem 1.1rem; color: var(--text-muted); line-height: 1.7;">
|
||||
<?= $faq['a'] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<div class="card" style="background: var(--primary); color: white; text-align: center; margin-top: 3rem;">
|
||||
<div class="card-body" style="padding: 2rem;">
|
||||
<h3 style="color: white; margin-bottom: 0.5rem;">Still have questions?</h3>
|
||||
<p style="opacity: 0.9; margin-bottom: 1.25rem;">We're happy to help. Reach out and we'll get back to you within one business day.</p>
|
||||
<a href="/contact.php" class="btn" style="background: white; color: var(--primary); font-weight: 600;">Contact Us</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
function toggleFaq(btn) {
|
||||
const answer = btn.nextElementSibling;
|
||||
const icon = btn.querySelector('span');
|
||||
const isOpen = answer.style.display === 'block';
|
||||
answer.style.display = isOpen ? 'none' : 'block';
|
||||
icon.textContent = isOpen ? '+' : '−';
|
||||
icon.style.transform = isOpen ? '' : 'rotate(0deg)';
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
@@ -40,6 +40,7 @@
|
||||
<li><a href="/shipping.php">Shipping Info</a></li>
|
||||
<li><a href="/returns.php">Returns</a></li>
|
||||
<li><a href="/track-order.php">Track Order</a></li>
|
||||
<li><a href="/privacy.php">Privacy Policy</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
$pageTitle = "Privacy Policy - Tom's Java Jive";
|
||||
$metaDescription = "Tom's Java Jive Privacy Policy — how we collect, use, and protect your personal information.";
|
||||
$breadcrumbs = [
|
||||
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
|
||||
['name' => 'Privacy Policy', 'url' => 'https://tomsjavajive.com/privacy.php']
|
||||
];
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Privacy Policy</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1.1rem;">Last updated: <?= date('F j, Y') ?></p>
|
||||
</div>
|
||||
|
||||
<!-- Consent -->
|
||||
<div style="background: rgba(var(--primary-rgb, 255, 94, 26), 0.08); border: 2px solid var(--primary); border-radius: 12px; padding: 1.5rem 1.75rem; margin-bottom: 2rem;">
|
||||
<h2 style="font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--primary);">Consent</h2>
|
||||
<p style="color: var(--text-muted); margin: 0; line-height: 1.7;">By using our website, you hereby consent to our Privacy Policy and agree to its terms.</p>
|
||||
</div>
|
||||
|
||||
<!-- Intro -->
|
||||
<div class="card" style="margin-bottom: 1.5rem;">
|
||||
<div class="card-body">
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin: 0;">At Tom's Java Jive, accessible from <a href="https://tomsjavajive.com">tomsjavajive.com</a>, one of our main priorities is the privacy of our visitors and customers. This Privacy Policy document describes the types of information that is collected and recorded by Tom's Java Jive and how we use it.</p>
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin-top: 1rem; margin-bottom: 0;">If you have additional questions or require more information about our Privacy Policy, do not hesitate to <a href="/contact.php">contact us</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$sections = [
|
||||
[
|
||||
'icon' => '📋',
|
||||
'title' => 'Personal Information We Collect',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">When you place an order or create an account on our website, we collect certain personal information including your name, email address, shipping address, phone number, and payment information. We also collect information about visitors to our site using the following technologies:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin:0;">
|
||||
<li><strong>Cookies</strong> — data files placed on your device that often include an anonymous unique identifier. For more information about cookies and how to disable them, visit <a href="http://www.allaboutcookies.org" target="_blank" rel="noopener">allaboutcookies.org</a>.</li>
|
||||
<li><strong>Log files</strong> — track actions on the site and collect data including your IP address, browser type, internet service provider, referring/exit pages, and date/time stamps.</li>
|
||||
<li><strong>Web beacons, tags, and pixels</strong> — electronic files used to record information about how you browse our site.</li>
|
||||
</ul>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🔍',
|
||||
'title' => 'How We Use Your Personal Information',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:0.75rem;">We use the personal information we collect to:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin:0;">
|
||||
<li>Process and fulfill your orders</li>
|
||||
<li>Communicate with you about your order, account, or inquiries</li>
|
||||
<li>Send you updates, promotions, and information about our products (you may opt out at any time)</li>
|
||||
<li>Improve and optimize our website and customer experience</li>
|
||||
<li>Comply with applicable laws and regulations</li>
|
||||
</ul>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🤝',
|
||||
'title' => 'Sharing Your Personal Information',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:0.75rem;">We may share your personal information with trusted third parties strictly to fulfill your order, including:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin-bottom:1rem;">
|
||||
<li><strong>Payment processors</strong> (Stripe) to securely handle transactions</li>
|
||||
<li><strong>Shipping carriers</strong> to deliver your order</li>
|
||||
<li><strong>Email service providers</strong> to send order confirmations and updates</li>
|
||||
</ul>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">We may also share your information to comply with applicable laws and regulations, to respond to a subpoena, search warrant, or other lawful request for information, or to otherwise protect our rights.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '📢',
|
||||
'title' => 'Behavioural Advertising',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">We may use your personal information to provide you with targeted advertisements or marketing communications we believe may be of interest to you. For more information about how targeted advertising works, visit the <a href="http://www.networkadvertising.org/understanding-online-advertising/how-does-it-work" target="_blank" rel="noopener">Network Advertising Initiative</a>.</p>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">You can opt out of targeted advertising at <a href="http://www.aboutads.info/choices/" target="_blank" rel="noopener">aboutads.info/choices</a> or through the <a href="http://optout.aboutads.info/" target="_blank" rel="noopener">Digital Advertising Alliance opt-out portal</a>.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🍪',
|
||||
'title' => 'Cookies and Web Beacons',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">Tom\'s Java Jive uses cookies to store information including your preferences and the pages you visited on our website. This information is used to optimize your experience by customizing our content based on your browser type and other information.</p>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">You can choose to disable cookies through your browser settings. For more information about managing cookies in your specific browser, please refer to your browser\'s documentation.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '📁',
|
||||
'title' => 'Log Files',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:0.75rem;">Tom\'s Java Jive follows standard practice of using log files. These files log visitors when they visit our website. The information collected includes:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin:0;">
|
||||
<li>Internet protocol (IP) addresses</li>
|
||||
<li>Browser type and Internet Service Provider (ISP)</li>
|
||||
<li>Date and time stamps</li>
|
||||
<li>Referring and exit pages</li>
|
||||
</ul>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-top:0.75rem;margin-bottom:0;">This information is not linked to any personally identifiable data and is used for analyzing trends, administering the site, and gathering demographic information.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🇪🇺',
|
||||
'title' => 'General Data Protection Regulation (GDPR)',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">Tom\'s Java Jive is a Data Controller of your personal information. Our legal basis for collecting and using your personal information includes:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin-bottom:1rem;">
|
||||
<li>Performing a contract with you (e.g. fulfilling your order)</li>
|
||||
<li>Your consent to do so</li>
|
||||
<li>Pursuing our legitimate business interests</li>
|
||||
<li>Compliance with the law</li>
|
||||
</ul>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">If you are a resident of the European Economic Area (EEA), you have the following data protection rights:</p>
|
||||
<ul style="color:var(--text-muted);line-height:2;padding-left:1.25rem;margin:0;">
|
||||
<li>The right to access, update, or delete the information we hold about you</li>
|
||||
<li>The right of rectification</li>
|
||||
<li>The right to object to processing</li>
|
||||
<li>The right to restriction of processing</li>
|
||||
<li>The right to data portability</li>
|
||||
<li>The right to withdraw consent</li>
|
||||
</ul>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-top:0.75rem;margin-bottom:0;">To exercise any of these rights, please <a href="/contact.php">contact us</a>. Please note that your information may be transferred outside of Europe, including to the United States.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🔒',
|
||||
'title' => 'Data Retention',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">When you place an order through our site, we will maintain your order information for our records unless and until you ask us to delete it. We will retain and use your information to the extent necessary to comply with our legal obligations, resolve disputes, and enforce our policies.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🔗',
|
||||
'title' => 'Third-Party Privacy Policies',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">Tom\'s Java Jive\'s Privacy Policy does not apply to other advertisers or third-party websites. We advise you to consult the respective privacy policies of any third-party services for more detailed information about their practices.</p>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">Third-party services we use may utilize technologies such as cookies, JavaScript, or web beacons in their advertisements or service delivery. Tom\'s Java Jive has no access to or control over cookies used by third-party providers.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🌐',
|
||||
'title' => 'Online Privacy Policy Only',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">This Privacy Policy applies only to our online activities and is valid for visitors to our website with regard to information shared and/or collected through tomsjavajive.com. This policy does not apply to any information collected offline or via channels other than this website.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '👶',
|
||||
'title' => "Children's Information",
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin-bottom:1rem;">Protecting children\'s privacy online is important to us. We encourage parents and guardians to observe, participate in, and monitor their children\'s online activity.</p>
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">Tom\'s Java Jive does not knowingly collect any personally identifiable information from children under the age of 13. If you believe your child has provided such information on our website, please <a href="/contact.php">contact us immediately</a> and we will promptly remove that information from our records.</p>
|
||||
'
|
||||
],
|
||||
[
|
||||
'icon' => '🔄',
|
||||
'title' => 'Changes to This Policy',
|
||||
'body' => '
|
||||
<p style="color:var(--text-muted);line-height:1.8;margin:0;">We may update this Privacy Policy from time to time to reflect changes to our practices or for operational, legal, or regulatory reasons. When we do, we will update the date at the top of this page. We encourage you to review this policy periodically.</p>
|
||||
'
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($sections as $s): ?>
|
||||
<div class="card" style="margin-bottom: 1.25rem;">
|
||||
<div class="card-body">
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;">
|
||||
<div style="width: 38px; height: 38px; background: rgba(var(--primary-rgb,255,94,26),0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;"><?= $s['icon'] ?></div>
|
||||
<h2 style="font-size: 1.15rem; margin: 0;"><?= $s['title'] ?></h2>
|
||||
</div>
|
||||
<?= $s['body'] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- Contact -->
|
||||
<div class="card" style="margin-top: 2rem;">
|
||||
<div class="card-body" style="text-align: center;">
|
||||
<div style="font-size: 2rem; margin-bottom: 0.5rem;">✉️</div>
|
||||
<h2 style="font-size: 1.2rem; margin-bottom: 0.5rem;">Contact Us</h2>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.7;">For more information about our privacy practices, if you have questions, or if you would like to make a complaint, please reach out:</p>
|
||||
<p style="margin-bottom: 0.25rem;"><strong>Tom's Java Jive</strong></p>
|
||||
<p style="color: var(--text-muted); margin-bottom: 0.25rem;">Weatherford, TX 76086</p>
|
||||
<p style="margin: 0;"><a href="mailto:hello@tomsjavajive.com">hello@tomsjavajive.com</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
$pageTitle = "Returns & Refunds - Tom's Java Jive";
|
||||
$metaDescription = "Tom's Java Jive return and refund policy. Simple, transparent, and always on your side.";
|
||||
$breadcrumbs = [
|
||||
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
|
||||
['name' => 'Returns', 'url' => 'https://tomsjavajive.com/returns.php']
|
||||
];
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Returns & Refunds</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1.1rem;">Simple, transparent, and always focused on making things right.</p>
|
||||
</div>
|
||||
|
||||
<!-- Intro -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin: 0;">At Tom's Java Jive, we believe in keeping things simple and transparent — especially when it comes to our return policy. Here's how we handle issues, with a focus on making things right as quickly as possible.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Your Responsibility -->
|
||||
<div class="card" style="margin-bottom: 1.5rem;">
|
||||
<div class="card-body">
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;">
|
||||
<div style="width: 42px; height: 42px; background: rgba(59,130,246,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;">👤</div>
|
||||
<h2 style="font-size: 1.2rem; margin: 0;">Your Responsibility</h2>
|
||||
</div>
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem;">If there's a mistake on your end — such as providing an incorrect shipping address or ordering the wrong item — you'll be responsible for the cost of correcting it.</p>
|
||||
<div style="background: var(--bg-secondary); border-radius: 8px; padding: 1rem 1.25rem;">
|
||||
<div style="font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem;">What to do:</div>
|
||||
<p style="color: var(--text-muted); margin: 0; line-height: 1.7; font-size: 0.95rem;">Simply <a href="/shop.php">place a new order</a> and <a href="/contact.php">let us know</a> about both the issue and your new order number. We'll prioritize the corrected order to get it on its way quickly.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Our Responsibility -->
|
||||
<div class="card" style="margin-bottom: 1.5rem;">
|
||||
<div class="card-body">
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;">
|
||||
<div style="width: 42px; height: 42px; background: rgba(16,185,129,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;">☕</div>
|
||||
<h2 style="font-size: 1.2rem; margin: 0;">Our Responsibility</h2>
|
||||
</div>
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem;">We're all human, and occasionally mistakes happen on our end too. Our error rate is very low, but if we slip up — like sending the wrong grind, the wrong product, or using the wrong label — we fully take responsibility.</p>
|
||||
<div style="background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); border-radius: 8px; padding: 1rem 1.25rem;">
|
||||
<div style="font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; color: #10b981;">What we'll do:</div>
|
||||
<p style="color: var(--text-muted); margin: 0; line-height: 1.7; font-size: 0.95rem;">Contact us, place a new order, and send us a note about the mistake along with your new order number. We'll cover all costs for the replacement coffee and its shipping, and we'll get the corrected order out as fast as we can.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Shared Responsibility -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem;">
|
||||
<div style="width: 42px; height: 42px; background: rgba(245,158,11,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;">🤝</div>
|
||||
<h2 style="font-size: 1.2rem; margin: 0;">Shared Responsibility</h2>
|
||||
</div>
|
||||
<p style="color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem;">Sometimes issues arise that are beyond anyone's control — carrier mistakes, package theft, or items reported as undelivered. In these cases, you have flexibility in deciding the best course of action, whether that's filing a claim with the carrier or requesting a replacement.</p>
|
||||
<div style="background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3); border-radius: 8px; padding: 1rem 1.25rem;">
|
||||
<div style="font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; color: #d97706;">How it works:</div>
|
||||
<p style="color: var(--text-muted); margin: 0; line-height: 1.7; font-size: 0.95rem;">If you choose to replace the order, you'll cover the shipping cost and we'll cover the coffee cost up to <strong>$25.00</strong>. Place a new order, <a href="/contact.php">email us</a> with the details and your new order number, and we'll refund the coffee cost and expedite the replacement.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- How to Contact -->
|
||||
<div class="card" style="margin-bottom: 2.5rem;">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.2rem; margin-bottom: 1rem;">How to Reach Us</h2>
|
||||
<ol style="padding-left: 1.25rem; color: var(--text-muted); line-height: 1.9; margin: 0;">
|
||||
<li>Email <a href="mailto:hello@tomsjavajive.com">hello@tomsjavajive.com</a> with your <strong>order number</strong> and a description of the issue.</li>
|
||||
<li>If your order arrived damaged, include a photo — it helps us resolve things faster.</li>
|
||||
<li>We'll respond within <strong>1 business day</strong> with next steps.</li>
|
||||
<li>Refunds are returned to your original payment method within <strong>3–5 business days</strong>.</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="text-align: center; color: var(--text-muted);">Have a question about your order? <a href="/contact.php">Contact us</a> and we'll take care of you.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
$pageTitle = "Shipping Info - Tom's Java Jive";
|
||||
$metaDescription = "Shipping information for Tom's Java Jive — rates, delivery times, and free shipping details.";
|
||||
$breadcrumbs = [
|
||||
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
|
||||
['name' => 'Shipping Info', 'url' => 'https://tomsjavajive.com/shipping.php']
|
||||
];
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
?>
|
||||
|
||||
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Shipping Information</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1.1rem;">Fresh-roasted coffee delivered right to your door.</p>
|
||||
</div>
|
||||
|
||||
<!-- Free Shipping Banner -->
|
||||
<div style="background: rgba(var(--primary-rgb, 255, 94, 26), 0.1); border: 2px solid var(--primary); border-radius: 12px; padding: 1.5rem; text-align: center; margin-bottom: 2.5rem;">
|
||||
<div style="font-size: 2rem; margin-bottom: 0.25rem;">🚚</div>
|
||||
<h2 style="margin-bottom: 0.25rem; color: var(--primary);">Free Shipping on Orders Over $50</h2>
|
||||
<p style="color: var(--text-muted); margin: 0;">Applies to all domestic orders shipped within the contiguous United States.</p>
|
||||
</div>
|
||||
|
||||
<!-- Shipping Rates -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.3rem; margin-bottom: 1.25rem;">Shipping Rates</h2>
|
||||
<table style="width: 100%; border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr style="background: var(--bg-secondary);">
|
||||
<th style="padding: 0.85rem 1rem; text-align: left; border-bottom: 2px solid var(--border);">Method</th>
|
||||
<th style="padding: 0.85rem 1rem; text-align: left; border-bottom: 2px solid var(--border);">Delivery Time</th>
|
||||
<th style="padding: 0.85rem 1rem; text-align: left; border-bottom: 2px solid var(--border);">Rate</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr style="border-bottom: 1px solid var(--border);">
|
||||
<td style="padding: 0.85rem 1rem; font-weight: 600;">Standard Shipping</td>
|
||||
<td style="padding: 0.85rem 1rem; color: var(--text-muted);">3–5 business days after processing</td>
|
||||
<td style="padding: 0.85rem 1rem;">$5.99 (Free over $50)</td>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid var(--border);">
|
||||
<td style="padding: 0.85rem 1rem; font-weight: 600;">Expedited Shipping</td>
|
||||
<td style="padding: 0.85rem 1rem; color: var(--text-muted);">2–3 business days after processing</td>
|
||||
<td style="padding: 0.85rem 1rem;">$12.99</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 0.85rem 1rem; font-weight: 600;">Overnight Shipping</td>
|
||||
<td style="padding: 0.85rem 1rem; color: var(--text-muted);">Next business day after processing</td>
|
||||
<td style="padding: 0.85rem 1rem;">$24.99</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Processing Time -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.3rem; margin-bottom: 1rem;">Processing Time</h2>
|
||||
<p style="color: var(--text-muted); margin-bottom: 1rem;">Every order at Tom's Java Jive is made fresh to ship. Because we roast to order, please allow <strong>1–2 business days</strong> for your coffee to be roasted, packaged, and handed off to the carrier. Delivery time is in addition to this processing time.</p>
|
||||
<p style="color: var(--text-muted); margin: 0;">Orders placed before <strong>12:00 PM CST</strong> Monday–Friday typically begin processing the same day.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- What to Expect -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.3rem; margin-bottom: 1.25rem;">What to Expect</h2>
|
||||
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
||||
<?php
|
||||
$steps = [
|
||||
['icon' => '☕', 'title' => 'Order Placed', 'desc' => 'You\'ll receive an order confirmation email immediately.'],
|
||||
['icon' => '🔥', 'title' => 'Roasted Fresh', 'desc' => 'Your beans are roasted to order within 1–2 business days.'],
|
||||
['icon' => '📦', 'title' => 'Packed & Shipped', 'desc' => 'Your order is carefully packaged and picked up by the carrier. You\'ll receive a tracking number by email.'],
|
||||
['icon' => '🚪', 'title' => 'Delivered', 'desc' => 'Fresh coffee arrives at your door, ready to brew.'],
|
||||
];
|
||||
foreach ($steps as $i => $step): ?>
|
||||
<div style="display: flex; gap: 1rem; align-items: flex-start;">
|
||||
<div style="width: 44px; height: 44px; background: rgba(var(--primary-rgb, 255, 94, 26), 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;"><?= $step['icon'] ?></div>
|
||||
<div>
|
||||
<div style="font-weight: 600; margin-bottom: 0.2rem;"><?= $step['title'] ?></div>
|
||||
<div style="color: var(--text-muted); font-size: 0.95rem;"><?= $step['desc'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.3rem; margin-bottom: 1rem;">Additional Notes</h2>
|
||||
<ul style="color: var(--text-muted); line-height: 2; padding-left: 1.25rem; margin: 0;">
|
||||
<li>We currently ship within the <strong>contiguous United States</strong> only. Hawaii, Alaska, and international shipping are not available at this time.</li>
|
||||
<li>Shipping times may be delayed during holidays or peak seasons.</li>
|
||||
<li>We are not responsible for delays caused by the carrier once the package has been handed off.</li>
|
||||
<li>If your package is lost or damaged in transit, please <a href="/contact.php">contact us</a> and we will make it right.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p style="text-align: center; color: var(--text-muted);">Questions about your shipment? <a href="/track-order.php">Track your order</a> or <a href="/contact.php">contact us</a>.</p>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
$pageTitle = "Track Order - Tom's Java Jive";
|
||||
$metaDescription = "Track your Tom's Java Jive order status and shipment in real time.";
|
||||
$breadcrumbs = [
|
||||
['name' => 'Home', 'url' => 'https://tomsjavajive.com'],
|
||||
['name' => 'Track Order', 'url' => 'https://tomsjavajive.com/track-order.php']
|
||||
];
|
||||
require_once __DIR__ . '/includes/header.php';
|
||||
require_once __DIR__ . '/includes/auth.php';
|
||||
|
||||
$order = null;
|
||||
$error = null;
|
||||
$searched = false;
|
||||
|
||||
// Pre-fill from query string (e.g. from order confirmation email link)
|
||||
$prefillOrder = $_GET['order'] ?? '';
|
||||
$prefillEmail = $_GET['email'] ?? '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' || ($prefillOrder && $prefillEmail)) {
|
||||
$searched = true;
|
||||
$orderNum = trim($_POST['order_number'] ?? $prefillOrder);
|
||||
$email = strtolower(trim($_POST['email'] ?? $prefillEmail));
|
||||
|
||||
if (empty($orderNum) || empty($email)) {
|
||||
$error = 'Please enter both your order number and email address.';
|
||||
} else {
|
||||
$order = db()->fetch(
|
||||
"SELECT * FROM orders WHERE (order_number = :num OR order_id = :id) AND LOWER(customer_email) = :email",
|
||||
['num' => $orderNum, 'id' => $orderNum, 'email' => $email]
|
||||
);
|
||||
if (!$order) {
|
||||
$error = 'No order found with that order number and email. Please double-check and try again.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If logged in, also show their recent orders
|
||||
$recentOrders = [];
|
||||
if (CustomerAuth::isLoggedIn()) {
|
||||
$user = CustomerAuth::getUser();
|
||||
$recentOrders = db()->fetchAll(
|
||||
"SELECT * FROM orders WHERE customer_id = :cid ORDER BY created_at DESC LIMIT 5",
|
||||
['cid' => $user['customer_id']]
|
||||
);
|
||||
}
|
||||
|
||||
$statusSteps = ['pending','confirmed','processing','shipped','delivered'];
|
||||
$statusLabels = [
|
||||
'pending' => 'Order Received',
|
||||
'confirmed' => 'Confirmed',
|
||||
'processing' => 'Roasting & Packing',
|
||||
'shipped' => 'Shipped',
|
||||
'delivered' => 'Delivered',
|
||||
];
|
||||
$statusIcons = [
|
||||
'pending' => '📋',
|
||||
'confirmed' => '✅',
|
||||
'processing' => '☕',
|
||||
'shipped' => '🚚',
|
||||
'delivered' => '🏠',
|
||||
];
|
||||
?>
|
||||
|
||||
<section class="section" style="padding-top: 2rem; padding-bottom: 4rem;">
|
||||
<div class="container" style="max-width: 700px;">
|
||||
|
||||
<div style="text-align: center; margin-bottom: 2.5rem;">
|
||||
<h1 style="font-size: 2.5rem; margin-bottom: 0.75rem;">Track Your Order</h1>
|
||||
<p style="color: var(--text-muted); font-size: 1.1rem;">Enter your order number and email to see your order status.</p>
|
||||
</div>
|
||||
|
||||
<!-- Lookup Form -->
|
||||
<div class="card" style="margin-bottom: 2rem;">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="/track-order.php">
|
||||
<div style="display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem;">
|
||||
<div>
|
||||
<label style="display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem;">Order Number</label>
|
||||
<input type="text" name="order_number" placeholder="e.g. TJJ-12345"
|
||||
value="<?= htmlspecialchars($_POST['order_number'] ?? $prefillOrder) ?>"
|
||||
style="width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; background: var(--bg); color: var(--text); box-sizing: border-box;"
|
||||
required>
|
||||
</div>
|
||||
<div>
|
||||
<label style="display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem;">Email Address</label>
|
||||
<input type="email" name="email" placeholder="you@example.com"
|
||||
value="<?= htmlspecialchars($_POST['email'] ?? $prefillEmail) ?>"
|
||||
style="width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; background: var(--bg); color: var(--text); box-sizing: border-box;"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary" style="width: 100%;">Track Order</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div style="background: rgba(239,68,68,0.1); border: 1px solid #ef4444; border-radius: 8px; padding: 1rem 1.25rem; color: #ef4444; margin-bottom: 1.5rem;">
|
||||
<?= htmlspecialchars($error) ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($order): ?>
|
||||
<?php
|
||||
$shippingAddress = json_decode($order['shipping_address'], true) ?? [];
|
||||
$items = json_decode($order['items'], true) ?? [];
|
||||
$currentStep = array_search($order['order_status'], $statusSteps);
|
||||
if ($currentStep === false) $currentStep = 0;
|
||||
$isCancelled = $order['order_status'] === 'cancelled';
|
||||
?>
|
||||
<div class="card" style="margin-bottom: 1.5rem;">
|
||||
<div class="card-body">
|
||||
<!-- Order Header -->
|
||||
<div style="display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);">
|
||||
<div>
|
||||
<div style="font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem;">Order Number</div>
|
||||
<div style="font-size: 1.2rem; font-weight: 700;"><?= htmlspecialchars($order['order_number']) ?></div>
|
||||
</div>
|
||||
<div style="text-align: right;">
|
||||
<div style="font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem;">Placed</div>
|
||||
<div style="font-weight: 600;"><?= date('M j, Y', strtotime($order['created_at'])) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($isCancelled): ?>
|
||||
<div style="text-align: center; padding: 1.5rem; background: rgba(239,68,68,0.08); border-radius: 8px; color: #ef4444; margin-bottom: 1.5rem;">
|
||||
<div style="font-size: 2rem; margin-bottom: 0.5rem;">❌</div>
|
||||
<div style="font-weight: 700; font-size: 1.1rem;">Order Cancelled</div>
|
||||
<div style="font-size: 0.9rem; margin-top: 0.25rem; opacity: 0.8;">If you have questions, please <a href="/contact.php" style="color: #ef4444;">contact us</a>.</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<!-- Progress Steps -->
|
||||
<div style="margin-bottom: 1.75rem;">
|
||||
<div style="display: flex; justify-content: space-between; position: relative; margin-bottom: 0.5rem;">
|
||||
<!-- Progress bar background -->
|
||||
<div style="position: absolute; top: 20px; left: 10%; right: 10%; height: 3px; background: var(--border); z-index: 0;"></div>
|
||||
<!-- Progress bar fill -->
|
||||
<div style="position: absolute; top: 20px; left: 10%; height: 3px; background: var(--primary); z-index: 1; width: <?= min(100, ($currentStep / (count($statusSteps) - 1)) * 100) ?>%; transition: width 0.5s;"></div>
|
||||
|
||||
<?php foreach ($statusSteps as $i => $step): ?>
|
||||
<?php $done = $i <= $currentStep; $active = $i === $currentStep; ?>
|
||||
<div style="display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; z-index: 2;">
|
||||
<div style="width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
|
||||
background: <?= $done ? 'var(--primary)' : 'var(--bg-secondary)' ?>;
|
||||
border: 2px solid <?= $done ? 'var(--primary)' : 'var(--border)' ?>;
|
||||
box-shadow: <?= $active ? '0 0 0 4px rgba(255,94,26,0.2)' : 'none' ?>;">
|
||||
<?= $done ? '✓' : $statusIcons[$step] ?>
|
||||
</div>
|
||||
<div style="font-size: 0.72rem; font-weight: <?= $active ? '700' : '500' ?>; color: <?= $done ? 'var(--primary)' : 'var(--text-muted)' ?>; text-align: center; margin-top: 0.4rem; line-height: 1.3;">
|
||||
<?= $statusLabels[$step] ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Tracking Number -->
|
||||
<?php if ($order['tracking_number']): ?>
|
||||
<div style="background: var(--bg-secondary); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;">
|
||||
<div>
|
||||
<div style="font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.2rem;">Tracking Number</div>
|
||||
<div style="font-weight: 700; font-size: 1rem;"><?= htmlspecialchars($order['tracking_number']) ?></div>
|
||||
</div>
|
||||
<?php if ($order['tracking_url']): ?>
|
||||
<a href="<?= htmlspecialchars($order['tracking_url']) ?>" target="_blank" rel="noopener" class="btn btn-primary" style="padding: 0.5rem 1.25rem; font-size: 0.9rem;">
|
||||
Track Shipment →
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php elseif ($order['order_status'] !== 'shipped' && $order['order_status'] !== 'delivered'): ?>
|
||||
<div style="background: var(--bg-secondary); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; color: var(--text-muted); font-size: 0.9rem;">
|
||||
🔔 A tracking number will be emailed to you once your order ships.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Order Items -->
|
||||
<div style="margin-bottom: 1.25rem;">
|
||||
<div style="font-weight: 600; margin-bottom: 0.75rem;">Items Ordered</div>
|
||||
<div style="display: flex; flex-direction: column; gap: 0.6rem;">
|
||||
<?php foreach ($items as $item): ?>
|
||||
<div style="display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem;">
|
||||
<span><?= htmlspecialchars($item['name'] ?? 'Item') ?> <?php if (!empty($item['quantity'])): ?><span style="color: var(--text-muted);">× <?= (int)$item['quantity'] ?></span><?php endif; ?></span>
|
||||
<span style="font-weight: 600;">$<?= number_format(($item['price'] ?? 0) * ($item['quantity'] ?? 1), 2) ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div style="display: flex; justify-content: space-between; padding-top: 0.5rem; font-weight: 700; font-size: 1.05rem;">
|
||||
<span>Total</span>
|
||||
<span style="color: var(--primary);">$<?= number_format($order['total'], 2) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Shipping Address -->
|
||||
<?php if (!empty($shippingAddress)): ?>
|
||||
<div style="font-size: 0.9rem; color: var(--text-muted); padding-top: 1rem; border-top: 1px solid var(--border);">
|
||||
<strong style="color: var(--text);">Shipping to:</strong>
|
||||
<?= htmlspecialchars($shippingAddress['name'] ?? '') ?>,
|
||||
<?= htmlspecialchars($shippingAddress['address'] ?? $shippingAddress['line1'] ?? '') ?>,
|
||||
<?= htmlspecialchars($shippingAddress['city'] ?? '') ?>,
|
||||
<?= htmlspecialchars($shippingAddress['state'] ?? '') ?>
|
||||
<?= htmlspecialchars($shippingAddress['zip'] ?? $shippingAddress['postal_code'] ?? '') ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Recent Orders (logged-in users) -->
|
||||
<?php if (!empty($recentOrders) && !$order): ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 style="font-size: 1.15rem; margin-bottom: 1rem;">Your Recent Orders</h2>
|
||||
<div style="display: flex; flex-direction: column; gap: 0.6rem;">
|
||||
<?php foreach ($recentOrders as $ro): ?>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; background: var(--bg-secondary); border-radius: 8px; flex-wrap: wrap; gap: 0.5rem;">
|
||||
<div>
|
||||
<div style="font-weight: 600; font-size: 0.95rem;"><?= htmlspecialchars($ro['order_number']) ?></div>
|
||||
<div style="font-size: 0.82rem; color: var(--text-muted);"><?= date('M j, Y', strtotime($ro['created_at'])) ?> · $<?= number_format($ro['total'], 2) ?></div>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 0.75rem;">
|
||||
<span style="padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
|
||||
background: <?= $ro['order_status'] === 'delivered' ? 'rgba(16,185,129,0.15)' : 'rgba(255,94,26,0.15)' ?>;
|
||||
color: <?= $ro['order_status'] === 'delivered' ? '#10b981' : 'var(--primary)' ?>;">
|
||||
<?= ucfirst($ro['order_status']) ?>
|
||||
</span>
|
||||
<form method="POST" action="/track-order.php" style="margin: 0;">
|
||||
<input type="hidden" name="order_number" value="<?= htmlspecialchars($ro['order_number']) ?>">
|
||||
<input type="hidden" name="email" value="<?= htmlspecialchars($ro['customer_email']) ?>">
|
||||
<button type="submit" style="background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; font-size: 0.88rem; padding: 0;">View →</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$order && !$searched): ?>
|
||||
<p style="text-align: center; color: var(--text-muted); margin-top: 1.5rem; font-size: 0.9rem;">
|
||||
Can't find your order? <a href="/contact.php">Contact us</a> and we'll look it up for you.
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php require_once __DIR__ . '/includes/footer.php'; ?>
|
||||
Reference in New Issue
Block a user