Template
## Summary - Closes #9. Port shop-gated buyer accounts (register/login/profile, password reset, order history), purchase-gated reviews, and Stripe customer ids. Cards stay on Stripe. - Slim public contact form to email + interest + message. Shipping tracking status, scan events, paste-in numbers, and EasyPost webhook when FEATURE_SHIPPING is on. - Add template-neutral `seed_demo` (generic SKUs, demo shoppers, guest orders, tracking stubs). Prod refused. `--reset` deletes tagged demo rows after invoices. ## Test plan - [ ] `cd site && uv run python manage.py test` (173 tests passed locally) - [ ] Shop on: `/account/register`, login, profile, password reset, claim guest orders by email - [ ] Shop off: `/account/` URLs absent; Sign in / Account links hidden - [ ] Checkout as logged-in buyer stores `Order.user` and Stripe customer id; product review only after paid purchase - [ ] Shipping on: portal paste-in tracking + EasyPost webhook updates status; shipping off: orders still work without tracking UI - [ ] `seed_demo` refused in prod; `--reset` rebuilds tagged catalog/shoppers without deleting staff invoices Reviewed-on: #10
132 lines
6.0 KiB
HTML
132 lines
6.0 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
{% block title %}Contact {{ SITE_NAME }} · Get in Touch{% endblock %}
|
|
{% block og_title %}Contact {{ SITE_NAME }} · Get in Touch{% endblock %}
|
|
{% block twitter_title %}Contact {{ SITE_NAME }} · Get in Touch{% endblock %}
|
|
{% block meta_description %}Contact {{ SITE_NAME }}. {{ CONTACT_SERVICE_AREA }}. Call{% if CONTACT_PHONE %} {{ CONTACT_PHONE }}{% endif %}{% if CONTACT_EMAIL %} or email {{ CONTACT_EMAIL }}{% endif %}.{% endblock %}
|
|
{% block og_description %}Contact {{ SITE_NAME }}. {{ CONTACT_SERVICE_AREA }}. Call{% if CONTACT_PHONE %} {{ CONTACT_PHONE }}{% endif %}{% if CONTACT_EMAIL %} or email {{ CONTACT_EMAIL }}{% endif %}.{% endblock %}
|
|
{% block twitter_description %}Contact {{ SITE_NAME }}. {{ CONTACT_SERVICE_AREA }}. Call{% if CONTACT_PHONE %} {{ CONTACT_PHONE }}{% endif %}{% if CONTACT_EMAIL %} or email {{ CONTACT_EMAIL }}{% endif %}.{% endblock %}
|
|
{% block structured_data %}
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context": "https://schema.org",
|
|
"@type": "ContactPage",
|
|
"name": "Contact {{ SITE_NAME|escapejs }}",
|
|
"url": "{{ PUBLIC_SITE_URL }}{% url 'public:contact' %}",
|
|
"description": "Contact {{ SITE_NAME|escapejs }}. {{ CONTACT_SERVICE_AREA|escapejs }}.",
|
|
"mainEntity": {
|
|
"@type": "Organization",
|
|
"name": "{{ SITE_NAME|escapejs }}",
|
|
"url": "{{ PUBLIC_SITE_URL }}/",
|
|
"telephone": "{{ CONTACT_PHONE|escapejs }}",
|
|
"email": "{{ CONTACT_EMAIL|escapejs }}",
|
|
{% if CONTACT_ADDRESS %}"address": "{{ CONTACT_ADDRESS|escapejs }}",{% endif %}
|
|
"areaServed": "{{ CONTACT_SERVICE_AREA|escapejs }}",
|
|
"contactPoint": {
|
|
"@type": "ContactPoint",
|
|
"contactType": "customer service",
|
|
"telephone": "{{ CONTACT_PHONE|escapejs }}",
|
|
"email": "{{ CONTACT_EMAIL|escapejs }}",
|
|
"areaServed": "{{ CONTACT_SERVICE_AREA|escapejs }}",
|
|
"availableLanguage": "English"
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
{% endblock %}
|
|
{% block content %}
|
|
<section class="breadcrumbs-custom bg-image context-dark" style="background-image: url({% static 'images/breadcrumbs-image-1.jpg' %});">
|
|
<div class="breadcrumbs-custom-inner">
|
|
<div class="container breadcrumbs-custom-container">
|
|
<div class="breadcrumbs-custom-main">
|
|
<p class="breadcrumbs-custom-subtitle title-decorated">Contact</p>
|
|
<h1 class="text-uppercase breadcrumbs-custom-title">Get in touch</h1>
|
|
</div>
|
|
<ul class="breadcrumbs-custom-path">
|
|
<li><a href="{% url 'public:home' %}">Home</a></li>
|
|
<li class="active">Contact</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="section section-sm">
|
|
<div class="container">
|
|
<div class="layout-bordered">
|
|
{% if CONTACT_PHONE %}
|
|
<div class="layout-bordered-item wow-outer">
|
|
<div class="layout-bordered-item-inner wow slideInUp">
|
|
<div class="icon icon-lg mdi mdi-phone text-primary"></div>
|
|
<ul class="list-0"><li><a class="link-default" href="tel:{{ CONTACT_PHONE_TEL }}">{{ CONTACT_PHONE }}</a></li></ul>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if CONTACT_EMAIL %}
|
|
<div class="layout-bordered-item wow-outer">
|
|
<div class="layout-bordered-item-inner wow slideInUp">
|
|
<div class="icon icon-lg mdi mdi-email text-primary"></div>
|
|
<a class="link-default" href="mailto:{{ CONTACT_EMAIL }}">{{ CONTACT_EMAIL }}</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if CONTACT_ADDRESS or CONTACT_SERVICE_AREA %}
|
|
<div class="layout-bordered-item wow-outer">
|
|
<div class="layout-bordered-item-inner wow slideInUp">
|
|
<div class="icon icon-lg mdi mdi-map-marker text-primary"></div>
|
|
<span class="link-default">{% if CONTACT_ADDRESS %}{{ CONTACT_ADDRESS }}{% else %}{{ CONTACT_SERVICE_AREA }}{% endif %}</span>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section class="section bg-gray-100 contact-form-section">
|
|
<div class="container section-lg">
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<h3 class="text-uppercase">Send a message</h3>
|
|
<form class="rd-form contact-message-form" method="post" action="{% url 'public:contact' %}">
|
|
{% csrf_token %}
|
|
<div class="row row-10">
|
|
<div class="col-12">
|
|
<div class="form-wrap">
|
|
<label class="form-label-outside" for="{{ form.email.id_for_label }}">Email</label>
|
|
{{ form.email }}
|
|
{{ form.email.errors }}
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
<div class="form-wrap">
|
|
<label class="form-label-outside" for="{{ form.interest.id_for_label }}">I am interested in</label>
|
|
{{ form.interest }}
|
|
{{ form.interest.errors }}
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
<div class="form-wrap">
|
|
<label class="form-label-outside" for="{{ form.message.id_for_label }}">Message</label>
|
|
{{ form.message }}
|
|
{{ form.message.errors }}
|
|
</div>
|
|
</div>
|
|
{% if form.captcha %}
|
|
<div class="col-12">{{ form.captcha }}{{ form.captcha.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
<p style="font-size:13px;color:#6b7280;margin:12px 0 20px;">By submitting, you agree we may contact you about your inquiry by email. You can change preferences or unsubscribe anytime from links in messages.{% if form.captcha %} Protected by reCAPTCHA.{% endif %}</p>
|
|
<button class="button button-primary button-winona" type="submit" data-tianji-event="contact_form_submit">Send message</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|
|
{% block tracking_events %}
|
|
{% if "sent" in request.GET %}
|
|
<script>
|
|
if (window.aimlTrackWhenReady) {
|
|
window.aimlTrackWhenReady('contact_form_success');
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %}
|