@if($product->category)
@if($product->category->parent)
{{ $product->category->parent->name }}
›
@endif
{{ $product->category->name }}
@endif
{{ $product->name }}
@if(
$settings->show_sku
&& $product->sku
)
SKU:
{{ $product->sku }}
@endif
{{
$priceOnRequest
? 'Price on Request'
: $priceText
}}
@if(
$hasSale
&& ! $priceOnRequest
)
@if($currency === 'INR')
₹{{ number_format(
(float) $product->regular_price,
2
) }}
@else
{{ $currency }}
{{ number_format(
(float) $product->regular_price,
2
) }}
@endif
@endif
@if($settings->show_stock)
@if(
$product->availability
=== 'in_stock'
)
● In Stock
@if($product->stock > 0)
·
{{ $product->stock }}
available
@endif
@elseif(
$product->availability
=== 'preorder'
)
● Preorder
@else
● Out of Stock
@endif
@endif
@if($product->description)
{{ $product->description }}
@endif
@if(count($attrs))
Product Specifications
@foreach(
$specLabels
as $key => $label
)
@if(
isset($attrs[$key])
&& $attrs[$key] !== ''
&& $attrs[$key] !== false
)
{{ $label }}
{{ $attrs[$key] }}
@if(
in_array(
$key,
[
'gross_weight_g',
'net_weight_g',
]
)
)
g
@elseif(
in_array(
$key,
[
'diamond_carat',
'gemstone_carat',
]
)
)
ct
@elseif(
$key === 'length_cm'
)
cm
@endif
@endif
@endforeach
@foreach(
$attrs['custom_attributes']
?? []
as $attribute
)
@if(
!empty(
$attribute['name']
)
&&
!empty(
$attribute['value']
)
)
{{ $attribute['name'] }}
{{ $attribute['value'] }}
@endif
@endforeach
@endif
@php
$productWhatsappNumber =
preg_replace(
'/[^0-9]/',
'',
(string) (
$attrs['whatsapp_number']
?? $settings->whatsapp_number
?? ''
)
);
$waText =
"Hi, I am interested in this product:\n\n"
.$product->name;
if ($product->sku) {
$waText .=
"\nSKU: "
.$product->sku;
}
if ($priceOnRequest) {
$waText .=
"\nPrice: Please share the current price.";
} else {
$waText .=
"\nPrice: "
.$priceText;
}
$waText .=
"\n\nProduct Link: "
.route(
'public.catalog.product',
[
'slug' =>
$settings->slug,
'productSlug' =>
$product->slug,
]
);
$waUrl =
$productWhatsappNumber !== ''
? 'https://wa.me/'
.$productWhatsappNumber
.'?text='
.rawurlencode(
$waText
)
: null;
@endphp
@if($waUrl)
{{
$priceOnRequest
? 'Ask Price on WhatsApp'
: 'Send WhatsApp'
}}
@endif