🔒
This Quote Is No Longer Available
Loading details…
Loading quote details...
.closed-quote-wrap {
max-width: 750px;
margin: 40px auto;
font-family: inherit;
text-align: center;
color: #333;
padding: 0 16px;
box-sizing: border-box;
}
.closed-quote-icon {
font-size: 52px;
margin-bottom: 12px;
}
.closed-quote-wrap h2 {
font-size: clamp(20px, 5vw, 28px);
margin-bottom: 8px;
color: #4DC8E0;
}
.closed-quote-subtitle {
font-size: clamp(13px, 3vw, 15px);
color: #666;
margin-bottom: 28px;
}
.closed-quote-box {
background: #f9f9f9;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: clamp(16px, 4vw, 24px);
text-align: left;
margin-bottom: 28px;
box-sizing: border-box;
width: 100%;
}
.closed-quote-box h3 {
margin: 0 0 16px;
font-size: clamp(15px, 4vw, 18px);
color: #333;
}
.closed-quote-box .meta {
font-size: 13px;
color: #888;
margin-bottom: 4px;
}
.closed-quote-box .status-line {
font-size: 13px;
color: #e9157b;
margin-bottom: 20px;
font-weight: 600;
}
.closed-quote-table {
width: 100%;
border-collapse: collapse;
font-size: clamp(12px, 3vw, 14px);
table-layout: fixed;
}
.closed-quote-table th {
background: #efefef;
padding: 10px 12px;
text-align: left;
font-weight: 600;
border-bottom: 2px solid #4DC8E0;
}
.closed-quote-table td {
padding: 10px 12px;
border-bottom: 1px solid #eee;
vertical-align: top;
word-break: break-word;
}
.closed-quote-table thead th:first-child,
.closed-quote-table tbody td:first-child,
.closed-quote-table tfoot td:first-child {
width: 75%;
}
.closed-quote-table thead th:last-child,
.closed-quote-table tbody td:last-child,
.closed-quote-table tfoot td:last-child {
width: 25%;
}
.closed-quote-table tfoot td {
font-weight: 700;
background: #f3f3f3;
border-top: 2px solid #4DC8E0;
}
.closed-quote-actions {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
display: inline-block;
padding: 12px 28px;
border-radius: 5px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
transition: opacity 0.2s;
box-sizing: border-box;
}
.btn-primary {
background: #4DC8E0;
color: #fff;
}
.btn-secondary {
background: #fff;
color: #333;
border: 2px solid #ddd;
}
.btn-primary:hover, .btn-secondary:hover {
opacity: 0.85;
}
.error-msg {
color: #4DC8E0;
font-size: 14px;
}
.loading-msg {
color: #999;
font-size: 14px;
text-align: center;
}
.item-meta {
margin: 6px 0 0;
padding: 0;
list-style: none;
font-size: 12px;
color: #666;
}
.item-meta li {
margin-bottom: 2px;
}
@media (max-width: 480px) {
.closed-quote-wrap {
margin: 20px auto;
}
.closed-quote-icon {
font-size: 40px;
}
.closed-quote-table,
.closed-quote-table thead,
.closed-quote-table tbody,
.closed-quote-table tfoot,
.closed-quote-table th,
.closed-quote-table td,
.closed-quote-table tr {
display: block;
width: 100%;
}
.closed-quote-table thead {
display: none;
}
.closed-quote-table tbody tr {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 6px;
margin-bottom: 10px;
padding: 10px;
}
.closed-quote-table tbody td {
border: none;
padding: 4px 0;
}
.closed-quote-table tbody td:last-child {
font-weight: 700;
color: #333;
padding-top: 8px;
border-top: 1px solid #eee;
margin-top: 4px;
}
.closed-quote-table tfoot tr {
background: #f3f3f3;
border-radius: 6px;
padding: 10px;
}
.closed-quote-table tfoot td {
border: none;
padding: 4px 0;
display: inline;
}
.closed-quote-table tfoot td:first-child::after {
content: ': ';
}
.closed-quote-actions {
flex-direction: column;
align-items: stretch;
}
.btn-primary, .btn-secondary {
text-align: center;
width: 100%;
}
}
(function () {
// Per-status copy. Keys are the WooCommerce/YITH custom status slugs (without the wc-/ywraq- prefix
// stripped already on the server side — see notes below on what the REST endpoint should return).
var STATUS_COPY = {
'quote-lost-other': {
icon: '🔒',
heading: 'This Quote Has Been Closed',
subtitle: 'This quote was closed and is no longer active. If you\u2019d still like pricing, request a new quote below.',
statusLabel: 'Closed'
},
'quote-closed-cust': {
icon: '🔒',
heading: 'This Quote Is No Longer Available',
subtitle: 'This quote was closed as you chose not to proceed at the time. Happy to put together a fresh one if you\u2019re still interested.',
statusLabel: 'Closed \u2013 Not Proceeding'
},
'quote-closed-no-r': {
icon: '🔒',
heading: 'This Quote Has Expired From Inactivity',
subtitle: 'We didn\u2019t hear back on this one, so it\u2019s been closed. No problem at all \u2014 just request a new quote if you\u2019d like to pick it back up.',
statusLabel: 'Closed \u2013 No Response'
},
'default': {
icon: '🔒',
heading: 'This Quote Is No Longer Available',
subtitle: 'Unfortunately, this quote can no longer be accepted. Please request a new quote or contact us directly.',
statusLabel: 'Closed'
}
};
function getParam(name) {
var url = new URL(window.location.href);
return url.searchParams.get(name);
}
var quoteId = getParam('quote_id');
var box = document.getElementById('closed-quote-box');
var actions = document.getElementById('closed-quote-actions');
var iconEl = document.getElementById('closed-quote-icon');
var headingEl = document.getElementById('closed-quote-heading');
var subtitleEl = document.getElementById('closed-quote-subtitle');
if (!quoteId) {
box.innerHTML = '
🔒
This Quote Is No Longer Available
Loading details…
Loading quote details...
No quote reference found. Please contact us if you believe this is an error.
'; subtitleEl.textContent = ''; return; } // NOTE: expects a REST route analogous to the expired-quote one, e.g. // /wp-json/twp/v1/closed-quote/{id} returning the same shape as expired-quote // (order.number, order.date_created, order.items[], order.total, order.status_slug, // order.status_label) plus the order's *current* custom status slug so we can pick copy. fetch('/wp-json/twp/v1/closed-quote/' + quoteId) .then(function (res) { if (!res.ok) throw new Error('Not found'); return res.json(); }) .then(function (order) { var copy = STATUS_COPY[order.status_slug] || STATUS_COPY['default']; iconEl.textContent = copy.icon; headingEl.textContent = copy.heading; subtitleEl.textContent = copy.subtitle; var created = new Date(order.date_created).toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric' }); var rows = order.items.map(function (item) { var price = parseFloat(item.total).toFixed(2); var metaHtml = ''; if (item.meta && item.meta.length > 0) { metaHtml = '- ' +
item.meta.map(function (m) {
return '
- ' + m.label + ': ' + m.value + ' '; }).join('') + '
Quote #' + order.number + '
' + 'Created: ' + created + '
' + 'Status: ' + statusLabel + '
' + '| Product | Price |
|---|---|
| Total | £' + total + ' |
Could not load quote details. Please contact us directly.
'; subtitleEl.textContent = ''; }); })();