REDIS_PORT=6379
MAIL_DRIVER=smtp
-MAIL_HOST=localhost
-MAIL_PORT=25
-MAIL_USERNAME=null
-MAIL_PASSWORD=null
-MAIL_ENCRYPTION=null
-MAIL_FROM_ADDRESS=pmi@cubedesigners.com
+MAIL_HOST=in-v3.mailjet.com
+MAIL_PORT=587
+MAIL_USERNAME=a0efe78a914ae9b7b972618c6c3e1803
+MAIL_PASSWORD=b4d51c4c1d0193f9b0963c2c374dd882
+MAIL_ENCRYPTION=tls
+MAIL_FROM_ADDRESS=web@pm-instrumentation.com
MAIL_FROM_NAME="PM-Instrumentation"
PUSHER_APP_ID=
REDIS_PORT=6379
MAIL_DRIVER=smtp
-MAIL_HOST=localhost
-MAIL_PORT=25
-MAIL_USERNAME=null
-MAIL_PASSWORD=null
-MAIL_ENCRYPTION=null
-MAIL_FROM_ADDRESS=pmi@cubedesigners.com
+MAIL_HOST=in-v3.mailjet.com
+MAIL_PORT=587
+MAIL_USERNAME=a0efe78a914ae9b7b972618c6c3e1803
+MAIL_PASSWORD=b4d51c4c1d0193f9b0963c2c374dd882
+MAIL_ENCRYPTION=tls
+MAIL_FROM_ADDRESS=web@pm-instrumentation.com
MAIL_FROM_NAME="PM-Instrumentation"
PUSHER_APP_ID=
}
if (is_array($decoded)) {
foreach ($decoded as $option) {
- $options[] = $option->fr;
+ if (isset($option->fr)) {
+ $options[] = $option->fr;
+ }
}
}
$typedocs = ['odt', 'doc', 'docx', 'pdf'];
$res = [];
foreach ($this->_documents as $fieldName => $label) {
- foreach ($this->getMedia($this->$fieldName) as $media) {
+ foreach ($this->getMediaInField($this->$fieldName) as $media) {
/** @var $media Media */
$res[] = ['media' => $media, 'label' => $label, 'type' => in_array($media->getExtensionAttribute(), $typedocs) ? 'document' : 'tech'];
return $res;
}
+ public function hasProductImage()
+ {
+ return count($this->getMediaInField($this->images)) > 0;
+ }
+
public function hasDocuments()
{
return count($this->getDocuments()) > 0;
*/
'from' => [
- 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
- 'name' => env('MAIL_FROM_NAME', 'Example'),
+ 'address' => env('MAIL_FROM_ADDRESS', 'pmi@cubedesigners.com'),
+ 'name' => env('MAIL_FROM_NAME', 'PM-Instrumentation'),
],
/*
{{-- Product details --}}
<div class="flex mb-2v sm:block">
+ @if($product->hasProductImage())
{{-- Product images --}}
<div class="product-detail-images-wrapper flex-grow" style="max-width: 348px">
<div
class="product-detail-images-main border-gray-100 border-4 pb-100p w-full bg-center bg-contain bg-no-repeat mb-3"
- style="background-image: url({{ $product->getMedia($product->images)->first()->getUrl() }});">
+ style="background-image: url({{ $product->getMediaInField($product->images)->first()->getUrl() }});">
</div>
<grid cols="3" gap="sm">
- @foreach ($product->getMedia($product->images) as $image)
+ @foreach ($product->getMediaInField($product->images) as $image)
<div
class="product-detail-images-main border-gray-100 border-4 pb-100p w-full bg-center bg-contain bg-no-repeat"
style="background-image: url({{ $image->getUrl() }});">
@endforeach
</grid>
</div>
+ @endif
{{-- Product text --}}
<text-block class="product-detail-text sm:mt-6">
{!! Markdown::parse($product->highlights) !!}
- @if(count($product->getMedia($product->technical_sheet)))
- <p class="mt-4"><a href="{{$product->getMedia($product->technical_sheet)->first()->getUrl()}}">Télécharger
+ @if(count($product->getMediaInField($product->technical_sheet)))
+ <p class="mt-4"><a href="{{$product->getMediaInField($product->technical_sheet)->first()->getUrl()}}">Télécharger
la fiche produit</a></p>
@endif