generated from boboko/starter
reviews photos clickable and contact form functionality
This commit is contained in:
@@ -70,8 +70,15 @@
|
||||
</div>
|
||||
|
||||
<div class="flex min-w-0 flex-1 flex-col gap-1">
|
||||
{{-- Linked only while the product still exists and is published;
|
||||
otherwise the name stays plain text (the order keeps it). --}}
|
||||
@php($lineProduct = $line->purchasable?->product)
|
||||
<p class="font-bold">
|
||||
{{ $line->description }}
|
||||
@if ($lineProduct?->status === 'published')
|
||||
<a href="{{ route('product.show', ['id' => $lineProduct->id]) }}" class="underline hover:no-underline">{{ $line->description }}</a>
|
||||
@else
|
||||
{{ $line->description }}
|
||||
@endif
|
||||
<span class="font-normal">× {{ $line->quantity }}</span>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -15,11 +15,13 @@
|
||||
|
||||
@if (!empty($review['image']))
|
||||
<div class="mt-1">
|
||||
<img
|
||||
src="{{ $review['image'] }}"
|
||||
alt="Φωτογραφία από τον αγοραστή"
|
||||
class="w-24 h-24 object-cover border border-black"
|
||||
>
|
||||
<a href="{{ $review['image'] }}" target="_blank" rel="noopener noreferrer">
|
||||
<img
|
||||
src="{{ $review['image'] }}"
|
||||
alt="Φωτογραφία από τον αγοραστή"
|
||||
class="w-24 h-24 object-cover border border-black"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -24,23 +24,35 @@
|
||||
Έχεις απορία, ιδέα ή θες να μας πεις κάτι; Γράψε μας το μήνυμά σου και θα σου απαντήσουμε το συντομότερο δυνατό.
|
||||
</p>
|
||||
|
||||
<form method="POST" action="#" class="flex flex-col gap-8 max-w-xl">
|
||||
<x-ui.status class="max-w-xl" />
|
||||
|
||||
<form method="POST" action="{{ route('contact.send') }}" class="flex flex-col gap-8 max-w-xl">
|
||||
@csrf
|
||||
|
||||
<div class="grid grid-cols-1 gap-8 sm:grid-cols-2">
|
||||
<x-ui.field label="Το όνομά σου" for="contact-name">
|
||||
<x-ui.input id="contact-name" name="name" autocomplete="name" :required="true" />
|
||||
<x-ui.field label="Το όνομά σου" for="contact-name" :error="$errors->first('name')">
|
||||
<x-ui.input id="contact-name" name="name" autocomplete="name" maxlength="100" :value="old('name')" :required="true"
|
||||
:aria-invalid="$errors->has('name') ? 'true' : null"
|
||||
:aria-describedby="$errors->has('name') ? 'contact-name-error' : null" />
|
||||
</x-ui.field>
|
||||
|
||||
<x-ui.field label="Το email σου" for="contact-email">
|
||||
<x-ui.input id="contact-email" name="email" type="email" autocomplete="email" :required="true" />
|
||||
<x-ui.field label="Το email σου" for="contact-email" :error="$errors->first('email')">
|
||||
<x-ui.input id="contact-email" name="email" type="email" autocomplete="email" maxlength="255" :value="old('email')" :required="true"
|
||||
:aria-invalid="$errors->has('email') ? 'true' : null"
|
||||
:aria-describedby="$errors->has('email') ? 'contact-email-error' : null" />
|
||||
</x-ui.field>
|
||||
</div>
|
||||
|
||||
<x-ui.field label="Το μήνυμά σου" for="contact-message">
|
||||
<x-ui.textarea id="contact-message" name="message" rows="5" :required="true" />
|
||||
<x-ui.field label="Το μήνυμά σου" for="contact-message" :error="$errors->first('message')">
|
||||
<x-ui.textarea id="contact-message" name="message" rows="5" maxlength="5000" :required="true"
|
||||
:aria-invalid="$errors->has('message') ? 'true' : null"
|
||||
:aria-describedby="$errors->has('message') ? 'contact-message-error' : null">{{ old('message') }}</x-ui.textarea>
|
||||
</x-ui.field>
|
||||
|
||||
@if (session('contact_error'))
|
||||
<p role="alert" class="text-sm text-red-600">{{ session('contact_error') }}</p>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<x-ui.button type="submit" size="md">Υποβολή</x-ui.button>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
@extends('emails.layout')
|
||||
|
||||
@section('title', __('storefront.contact.confirmation_subject'))
|
||||
|
||||
@section('preheader', __('storefront.contact.confirmation_preheader'))
|
||||
|
||||
@section('content')
|
||||
<h1 style="margin:0 0 20px;font-family:'Manrope',Arial,Helvetica,sans-serif;font-size:22px;line-height:1.3;font-weight:700;color:#000000;">
|
||||
{{ __('storefront.contact.confirmation_heading') }}
|
||||
</h1>
|
||||
|
||||
<p style="margin:0;">{{ __('storefront.contact.confirmation_body') }}</p>
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
<p style="margin:0;">{{ __('storefront.contact.confirmation_footer') }}</p>
|
||||
@endsection
|
||||
@@ -0,0 +1,21 @@
|
||||
@extends('emails.layout')
|
||||
|
||||
@section('title', 'Νέο μήνυμα επικοινωνίας')
|
||||
|
||||
@section('preheader', "Από {$senderName} ({$senderEmail})")
|
||||
|
||||
@section('content')
|
||||
<h1 style="margin:0 0 20px;font-family:'Manrope',Arial,Helvetica,sans-serif;font-size:22px;line-height:1.3;font-weight:700;color:#000000;">
|
||||
Νέο μήνυμα επικοινωνίας
|
||||
</h1>
|
||||
|
||||
<p style="margin:0 0 4px;"><strong>Όνομα:</strong> {{ $senderName }}</p>
|
||||
<p style="margin:0 0 4px;"><strong>Email:</strong> <a href="mailto:{{ $senderEmail }}" style="color:#000000;">{{ $senderEmail }}</a></p>
|
||||
<p style="margin:0 0 24px;"><strong>Γλώσσα:</strong> {{ strtoupper($senderLocale) }}</p>
|
||||
|
||||
<p style="margin:0;white-space:pre-line;">{{ $body }}</p>
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
<p style="margin:0;">Στάλθηκε από τη φόρμα επικοινωνίας του 3dealer. Απάντησε σε αυτό το email για να απαντήσεις στον αποστολέα.</p>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user