@foreach($group->products as $product)
@php
$pricingRecord = $product->pricing->first();
$startingPrice = null; $startingCycle = "";
if ($pricingRecord) {
foreach (["monthly","quarterly","semiannually","annually","biennially","triennially"] as $cycle) {
if (isset($pricingRecord->{$cycle}) && (float)$pricingRecord->{$cycle} > 0) {
$startingPrice = $pricingRecord->{$cycle}; $startingCycle = $cycle; break;
}
}
}
$currPrefix = $currency?->prefix ?? "$";
$currSuffix = $currency?->suffix ?? "";
@endphp
@if($product->is_featured)
{{ __('client.store.most_popular') }}
@endif
{{ $product->name }}
@if($startingPrice !== null)
{{ $currPrefix }}{{ number_format($startingPrice, 2) }}{{ $currSuffix }} /{{ $startingCycle }}
@else
{{ __('client.store.contact_us') }}
@endif
@if($product->description)
{{ Str::limit(strip_tags($product->description), 120) }}
@else
@endif
{{ __('client.store.order_now') }} →
@endforeach