@php // type: bw-0 (manual), bw-2 (flash sales) $promotions = \App\Module\Db\Promotion::getInstance()->getPromotionsByWeb([ 'type' => 5 ]); @endphp @if(isset($promotions) && is_array($promotions) && count($promotions) > 0) @foreach($promotions as $elem) @php $imageURL = null; if(!empty($elem->image ?? '')) { $imageURL = ImageOS::photo($elem->image, 120, 80); } $invitationType = $elem->invitation_type ?? 0; $onlyOnce = $elem->only_once ?? 0; $guid = $elem->guid ?? $elem->id; @endphp
  • @if(!empty($imageURL ?? ''))
    {{$elem->name}}
    @endif

    {{$elem->name}}

    @if(!empty($elem->summary ?? ''))
    {{$elem->summary}}
    @endif
    @if($invitationType > 0 || $onlyOnce == 1)
    @if($onlyOnce == 1) @endif @if ($invitationType > 0) {{--
    --}} @endif
    @if($onlyOnce == 1)
    {{--
    --}}
    @endif @include('home.elements.promotion-error',[ 'guid'=>$guid ])
    @endif
  • @endforeach @endif