File: D:/HostingSpaces/SBogers95/rentman.io/resources/views/site/components/pricing.blade.php
<div class="c-pricing">
{{-- {{dd($links)}}--}}
@if(\App::getLocale() == 'en' ? true : false)
<div class="c-pricing__currency-switch">
@include('site.components.form.switch', ['class' => 'js-pricing-switch'])
</div>
@endif
<div class="c-pricing__grid">
{{-- Get labels from enterprise tier --}}
@php
$enterpriseLabels = $packages->filter(function ($package) {return $package->enterprise_product === 1;});
if($enterpriseLabels->first()) {
$enterpriseLabels = $enterpriseLabels->first()->pricingLabels->toArray();
}
@endphp
@foreach($packages as $package)
@php
$isEnterprise = $package->enterprise_product === 1;
@endphp
<div class="c-pricing__item @if($package->highlight || $package->popular_product) is-highlighted @endif">
<div class="c-pricing__section c-pricing__section--header c-package-price">
@if($package->highlight || $package->popular_product)
<span class="c-pricing__label">{{ $pricingLabels->most_popular ?? 'Missing: most_popular' }}</span>
@endif
<h3 class="c-package-price__title c-pricing__title"
data-subline="{!! $package->translation->description ?? '' !!}">{{ $package->translation->name }}</h3>
@if(!empty($package->price_eu) && !$isEnterprise)
<div class="c-package-price__amount c-package-price__symbol c-pricing__amount js-pricing-symbol"
data-currency-symbol="€">
<div class="c-package-price__number js-pricing-price"
data-price-eur="{{ \App\Helpers\KommaHelpers::formatPrice($package->price_eu) }}"
data-price-usd="{{ \App\Helpers\KommaHelpers::formatPrice($package->price_usd) }}">{{ \App\Helpers\KommaHelpers::formatPrice($package->price_eu) }}</div>
</div>
@elseif($isEnterprise)
<div class="c-package-price__amount c-package-price__symbol c-pricing__amount" data-currency-symbol="">
<div class="c-package-price__text">{{ $package->translation->price_text }}</div>
</div>
@endif
@if(!$isEnterprise)
<div class="c-package-price__info">
<p>
<span class="c-tooltip c-tooltip--text c-tooltip--dark c-tooltip--dark-pop-up"
data-tooltip="{{ $pricingLabels->power_user_tooltip ?? 'Missing: power_user_tooltip' }}">{{ $pricingLabels->power_user ?? 'Missing: power_user' }}</span>
<span>/</span>
<span>{{__('validation.attributes.month')}}</span>
</p>
<p>
@if(isset($coreProduct) && !empty($coreProduct[0]))
<span>+</span>
<span class="c-package-price__base js-pricing-price js-pricing-symbol"
data-currency-symbol="€"
data-price-eur="{{substr($coreProduct[0]->euro_price, 0, strpos($coreProduct[0]->euro_price, "."))}}"
data-price-usd="{{substr($coreProduct[0]->dollar_price, 0, strpos($coreProduct[0]->dollar_price, "."))}}">{{substr($coreProduct[0]->euro_price, 0, strpos($coreProduct[0]->euro_price, "."))}}</span>
<span>{{ $pricingLabels->base_price ?? 'Missing: base_price' }}</span>
@else
<span>+</span>
<span class="c-package-price__base js-pricing-price js-pricing-symbol"
data-currency-symbol="€" data-price-eur="39" data-price-usd="39">39</span>
<span>{{ $pricingLabels->base_price ?? 'Missing: base_price' }}</span>
@endif
</p>
</div>
@else
<p class="c-package-price__info">
{{ $package->translation->price_text_additional }}
</p>
@endif
@if(!$isEnterprise)
<div class="c-pricing__header-button">
@include('site.components.buttonLink', [
'modifiers' => $package->highlight || $package->popular_product ? 'filled' : '',
'preventBlank' => true,
'buttonText' => isset($pricingLabels->try_for_free) ? $pricingLabels->try_for_free : 'Missing: try_for_free',
'buttonLink' => isset($pricingLabels->try_for_free_link) ? $pricingLabels->try_for_free_link : '#missing-try_for_free_link'
])
</div>
@else
<div class="c-pricing__header-button">
@include('site.components.buttonLink', [
'modifiers' => $package->highlight || $package->popular_product ? 'filled' : '',
'preventBlank' => true,
'buttonText' => $package->translation->button_text,
'buttonLink' => isset($links->{'contact-sales'}) ? '/' . $links->{'contact-sales'}->route : '/' . $links->contact->route
])
</div>
@endif
</div>
<div class="c-pricing-section__dropdown-toggle js-pricing-section-dropdown">
{{ __('site/global.see_features') }}
<img src="/img/arrowhead-down.svg" alt="">
</div>
@if(isset($showPlatformSection) && $showPlatformSection)
@if(isset($coreProduct) && !empty($coreProduct[0]))
{{-- <div class="c-pricing__section c-pricing__section--platform">--}}
<div class="c-pricing__section">
<p class="c-pricing__platform-sub-title">@lang('site/vue.included_in_plan')</p>
<h4 class="c-pricing__platform-title">{{ $coreProduct[0]->translation->name }}</h4>
<p class="c-pricing__platform-desc">{{ $coreProduct[0]->translation->description }}</p>
{{-- <ul class="c-pricing__features c-pricing__features--compact u-margin-top-16">--}}
{{-- @foreach(json_decode($coreProduct[0]->translation->specs) as $spec)--}}
{{-- <li class="c-pricing__feature">{{$spec[0]}}</li>--}}
{{-- @endforeach--}}
{{-- </ul>--}}
<div class="u-margin-top-16">
@include('site.components.textButtonLink', [
'modifiers' => ['icon','x-small', 'grey'],
'class' => 'js-modal-trigger',
'textButtonLink' => '#core',
'textButtonText' => __('site/global.learnMore'),
'textButtonTitle' => __('site/global.learnMore'),
])
</div>
</div>
@endif
@endif
@unless(isset($showFeatureSection) && $showFeatureSection)
<div class="c-pricing__section c-pricing__section--products">
<p class="c-pricing__subheading">{{ $pricingLabels->included ?? 'Missing: included' }}</p>
<ul class="c-pricing__products">
@foreach($package->pricingProducts as $product)
<li class="c-pricing__product-item">
<span class="c-pricing__product-icon {{$product->pricing_product_icon}}">
@switch($product->pricing_product_icon)
@case('box')
@include('site.components.icons.tokens.box')
@break
@case('circle')
@include('site.components.icons.tokens.circle')
@break
@case('backup')
@include('site.components.icons.tokens.backup')
@break
@case('house')
@include('site.components.icons.tokens.house')
@break
@case('layers')
@include('site.components.icons.tokens.layers')
@break
@case('location')
@include('site.components.icons.tokens.location')
@break
@case('stacks')
@include('site.components.icons.tokens.stacks')
@break
@case('support')
@include('site.components.icons.tokens.support')
@break
@default {{-- 'balloon' --}}
@include('site.components.icons.tokens.balloon')
@endswitch
</span>
<div class="c-pricing__product-content">
<h3 class="c-pricing__product-title">{{$product->translation->name}}</h3>
<p class="c-pricing__product-desc">{{$product->translation->description}}</p>
</div>
</li>
@endforeach
</ul>
</div>
@endunless
@if(isset($showFeatureSection) && $showFeatureSection)
<div class="c-pricing__section c-pricing__section--labels">
<ul class="c-pricing__features">
@if(isset($package->pricingLabels))
@if($isEnterprise)
<p class="c-pricing__section--above-labels">{{ $package->translation->features_text }}</p>
@endif
{{-- included --}}
@foreach($package->pricingLabels as $label)
@if(isset($label->translation))
<li class="c-pricing__feature">{{$label->translation->name}}</li>
@endif
@endforeach
{{-- excluded --}}
@foreach($masterArray as $label)
@if(
isset($label)
&& !in_array($label, array_flatten($package->pricingLabels->toArray())) // not included
&& !$isEnterprise // no excluded features in enterprise tier
&& !in_array($label, array_flatten($enterpriseLabels)) // exclude enterprise tier labels
)
<li class="c-pricing__feature is-excluded">{{$label}}</li>
@endif
@endforeach
@endif
</ul>
</div>
@endif
@if(!$isEnterprise)
<div class="c-pricing__section c-pricing__section--footer">
@include('site.components.textButtonLink', [
'modifiers' => ['icon','x-small'],
'class' => 'js-modal-trigger',
'textButtonLink' => '#table',
'textButtonText' => __('site/global.menu.productsCta'),
'textButtonTitle' => __('site/global.menu.productsCta'),
])
</div>
@else
<div class="c-pricing__section c-pricing__section--footer">
@include('site.components.textButtonLink', [
'modifiers' => ['icon','x-small'],
'class' => 'js-modal-trigger',
'textButtonLink' => isset($links->{'contact-sales'}) ? '/' . $links->{'contact-sales'}->route : '/' . $links->contact->route,
'textButtonText' => $package->translation->cta_button_text,
])
</div>
@endif
</div>
@endforeach
</div>
</div>
@include('site.components.pricingFeaturesModal', ['packages' => $packages, 'modelHash' => 'table'])
@if(isset($coreProduct) && !empty($coreProduct[0]))
@include('site.components.pricingProductModal', ['product' => $coreProduct[0], 'modelHash' => 'core'])
@endif