@php if (! isset($product)) { return; } $price ??= $product->price()->getPrice(); $isDisplayPriceOriginal ??= true; $priceWrapperClassName ??= null; $priceClassName ??= null; $priceOriginalClassName ??= null; $priceOriginalWrapperClassName ??= null; $shouldShowPrice = (! EcommerceHelper::hideProductPrice() || EcommerceHelper::isCartEnabled()) && (! EcommerceHelper::hideProductPriceWhenZero() || $price > 0); @endphp @if ($shouldShowPrice)
{{ $priceFormatted ?? $product->price()->displayAsText() }} @if ($isDisplayPriceOriginal && $product->isOnSale()) @include(EcommerceHelper::viewPath('includes.product-prices.original'), [ 'priceWrapperClassName' => $priceOriginalWrapperClassName, 'priceClassName' => $priceOriginalClassName, ]) @endif
@endif