Nuevos cambios hechos de diseño

This commit is contained in:
ellecio2
2023-08-23 17:33:44 -04:00
parent 7a806f84ff
commit d2e9ba53ab
3485 changed files with 691106 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
<div class="bg-white mb-4 border p-3 p-sm-4">
<!-- Tabs -->
<div class="nav aiz-nav-tabs">
<a href="#tab_default_1" data-toggle="tab"
class="mr-5 pb-2 fs-16 fw-700 text-reset active show">{{ translate('Description') }}</a>
@if ($detailedProduct->video_link != null)
<a href="#tab_default_2" data-toggle="tab"
class="mr-5 pb-2 fs-16 fw-700 text-reset">{{ translate('Video') }}</a>
@endif
@if ($detailedProduct->pdf != null)
<a href="#tab_default_3" data-toggle="tab"
class="mr-5 pb-2 fs-16 fw-700 text-reset">{{ translate('Downloads') }}</a>
@endif
</div>
<!-- Description -->
<div class="tab-content pt-0">
<!-- Description -->
<div class="tab-pane fade active show" id="tab_default_1">
<div class="py-5">
<div class="mw-100 overflow-hidden text-left aiz-editor-data">
<?php echo $detailedProduct->getTranslation('description'); ?>
</div>
</div>
</div>
<!-- Video -->
<div class="tab-pane fade" id="tab_default_2">
<div class="py-5">
<div class="embed-responsive embed-responsive-16by9">
@if ($detailedProduct->video_provider == 'youtube' && isset(explode('=', $detailedProduct->video_link)[1]))
<iframe class="embed-responsive-item"
src="https://www.youtube.com/embed/{{ get_url_params($detailedProduct->video_link, 'v') }}"></iframe>
@elseif ($detailedProduct->video_provider == 'dailymotion' && isset(explode('video/', $detailedProduct->video_link)[1]))
<iframe class="embed-responsive-item"
src="https://www.dailymotion.com/embed/video/{{ explode('video/', $detailedProduct->video_link)[1] }}"></iframe>
@elseif ($detailedProduct->video_provider == 'vimeo' && isset(explode('vimeo.com/', $detailedProduct->video_link)[1]))
<iframe
src="https://player.vimeo.com/video/{{ explode('vimeo.com/', $detailedProduct->video_link)[1] }}"
width="500" height="281" frameborder="0" webkitallowfullscreen
mozallowfullscreen allowfullscreen></iframe>
@endif
</div>
</div>
</div>
<!-- Download -->
<div class="tab-pane fade" id="tab_default_3">
<div class="py-5 text-center ">
<a href="{{ uploaded_asset($detailedProduct->pdf) }}"
class="btn btn-primary">{{ translate('Download') }}</a>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,526 @@
<div class="text-left">
<!-- Product Name -->
<h1 class="mb-4 fs-16 fw-700 text-dark">
{{ $detailedProduct->getTranslation('name') }}
</h1>
<div class="row align-items-center mb-3">
<!-- Review -->
@if ($detailedProduct->auction_product != 1)
<div class="col-12">
@php
$total = 0;
$total += $detailedProduct->reviews->count();
@endphp
<span class="rating rating-mr-1">
{{ renderStarRating($detailedProduct->rating) }}
</span>
<span class="ml-1 opacity-50 fs-14">({{ $total }}
{{ translate('reviews') }})</span>
</div>
@endif
<!-- Estimate Shipping Time -->
@if ($detailedProduct->est_shipping_days)
<div class="col-auto fs-14 mt-1">
<small class="mr-1 opacity-50 fs-14">{{ translate('Estimate Shipping Time') }}:</small>
<span class="fw-500">{{ $detailedProduct->est_shipping_days }} {{ translate('Days') }}</span>
</div>
@endif
<!-- In stock -->
@if ($detailedProduct->digital == 1)
<div class="col-12 mt-1">
<span class="badge badge-md badge-inline badge-pill badge-success">{{ translate('In stock')}}</span>
</div>
@endif
</div>
<div class="row align-items-center">
<!-- Ask about this product -->
<div class="col-xl-3 col-lg-4 col-md-3 col-sm-4 mb-3">
<a href="javascript:void();" onclick="goToView('product_query')" class="text-primary fs-14 fw-600 d-flex">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 32">
<g id="Group_25571" data-name="Group 25571" transform="translate(-975 -411)">
<g id="Path_32843" data-name="Path 32843" transform="translate(975 411)" fill="#fff">
<path d="M 16 31 C 11.9933500289917 31 8.226519584655762 29.43972969055176 5.393400192260742 26.60659980773926 C 2.560270071029663 23.77347946166992 1 20.00665092468262 1 16 C 1 11.9933500289917 2.560270071029663 8.226519584655762 5.393400192260742 5.393400192260742 C 8.226519584655762 2.560270071029663 11.9933500289917 1 16 1 C 20.00665092468262 1 23.77347946166992 2.560270071029663 26.60659980773926 5.393400192260742 C 29.43972969055176 8.226519584655762 31 11.9933500289917 31 16 C 31 20.00665092468262 29.43972969055176 23.77347946166992 26.60659980773926 26.60659980773926 C 23.77347946166992 29.43972969055176 20.00665092468262 31 16 31 Z" stroke="none"/>
<path d="M 16 2 C 12.26045989990234 2 8.744749069213867 3.456249237060547 6.100500106811523 6.100500106811523 C 3.456249237060547 8.744749069213867 2 12.26045989990234 2 16 C 2 19.73954010009766 3.456249237060547 23.2552490234375 6.100500106811523 25.89949989318848 C 8.744749069213867 28.54375076293945 12.26045989990234 30 16 30 C 19.73954010009766 30 23.2552490234375 28.54375076293945 25.89949989318848 25.89949989318848 C 28.54375076293945 23.2552490234375 30 19.73954010009766 30 16 C 30 12.26045989990234 28.54375076293945 8.744749069213867 25.89949989318848 6.100500106811523 C 23.2552490234375 3.456249237060547 19.73954010009766 2 16 2 M 16 0 C 24.8365592956543 0 32 7.163440704345703 32 16 C 32 24.8365592956543 24.8365592956543 32 16 32 C 7.163440704345703 32 0 24.8365592956543 0 16 C 0 7.163440704345703 7.163440704345703 0 16 0 Z" stroke="none" fill="#f3af3d"/>
</g>
<path id="Path_32842" data-name="Path 32842" d="M28.738,30.935a1.185,1.185,0,0,1-1.185-1.185,3.964,3.964,0,0,1,.942-2.613c.089-.095.213-.207.361-.344.735-.658,2.252-2.032,2.252-3.555a2.228,2.228,0,0,0-2.37-2.37,2.228,2.228,0,0,0-2.37,2.37,1.185,1.185,0,1,1-2.37,0,4.592,4.592,0,0,1,4.74-4.74,4.592,4.592,0,0,1,4.74,4.74c0,2.577-2.044,4.432-3.028,5.333l-.284.255a1.89,1.89,0,0,0-.243.948A1.185,1.185,0,0,1,28.738,30.935Zm0,3.561a1.185,1.185,0,0,1-.835-2.026,1.226,1.226,0,0,1,1.671,0,1.061,1.061,0,0,1,.148.184,1.345,1.345,0,0,1,.113.2,1.41,1.41,0,0,1,.065.225,1.138,1.138,0,0,1,0,.462,1.338,1.338,0,0,1-.065.219,1.185,1.185,0,0,1-.113.207,1.06,1.06,0,0,1-.148.184A1.185,1.185,0,0,1,28.738,34.5Z" transform="translate(962.004 400.504)" fill="#f3af3d"/>
</g>
</svg>
<span class="ml-2 text-primary animate-underline-blue">{{ translate('Product Inquiry') }}</span>
</a>
</div>
<div class="col mb-3">
@if ($detailedProduct->auction_product != 1)
<div class="d-flex">
<!-- Add to wishlist button -->
<a href="javascript:void(0)" onclick="addToWishList({{ $detailedProduct->id }})" class="mr-3 fs-14 text-dark opacity-60 has-transitiuon hov-opacity-100">
<i class="la la-heart-o mr-1"></i>
{{ translate('Add to Wishlist') }}
</a>
<!-- Add to compare button -->
<a href="javascript:void(0)" onclick="addToCompare({{ $detailedProduct->id }})" class="fs-14 text-dark opacity-60 has-transitiuon hov-opacity-100">
<i class="las la-sync mr-1"></i>
{{ translate('Add to Compare') }}
</a>
</div>
@endif
</div>
</div>
<!-- Brand Logo & Name -->
@if ($detailedProduct->brand != null)
<div class="d-flex flex-wrap align-items-center mb-3">
<span class="text-secondary fs-14 fw-400 mr-4 w-50px">{{ translate('Brand') }}</span><br>
<a href="{{ route('products.brand', $detailedProduct->brand->slug) }}"
class="text-reset hov-text-primary fs-14 fw-700">{{ $detailedProduct->brand->name }}</a>
</div>
@endif
<!-- Seller Info -->
<div class="d-flex flex-wrap align-items-center">
<div class="d-flex align-items-center mr-4">
<!-- Shop Name -->
@if ($detailedProduct->added_by == 'seller' && get_setting('vendor_system_activation') == 1)
<span class="text-secondary fs-14 fw-400 mr-4 w-50px">{{ translate('Sold by') }}</span>
<a href="{{ route('shop.visit', $detailedProduct->user->shop->slug) }}"
class="text-reset hov-text-primary fs-14 fw-700">{{ $detailedProduct->user->shop->name }}</a>
@else
<p class="mb-0 fs-14 fw-700">{{ translate('Inhouse product') }}</p>
@endif
</div>
<!-- Messase to seller -->
@if (get_setting('conversation_system') == 1)
<div class="">
<button class="btn btn-sm btn-soft-warning btn-outline-warning hov-svg-white hov-text-white rounded-4"
onclick="show_chat_modal()">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" class="mr-2 has-transition">
<g id="Group_23918" data-name="Group 23918" transform="translate(1053.151 256.688)">
<path id="Path_3012" data-name="Path 3012" d="M134.849,88.312h-8a2,2,0,0,0-2,2v5a2,2,0,0,0,2,2v3l2.4-3h5.6a2,2,0,0,0,2-2v-5a2,2,0,0,0-2-2m1,7a1,1,0,0,1-1,1h-8a1,1,0,0,1-1-1v-5a1,1,0,0,1,1-1h8a1,1,0,0,1,1,1Z" transform="translate(-1178 -341)" fill="#f4b650"/>
<path id="Path_3013" data-name="Path 3013" d="M134.849,81.312h8a1,1,0,0,1,1,1v5a1,1,0,0,1-1,1h-.5a.5.5,0,0,0,0,1h.5a2,2,0,0,0,2-2v-5a2,2,0,0,0-2-2h-8a2,2,0,0,0-2,2v.5a.5.5,0,0,0,1,0v-.5a1,1,0,0,1,1-1" transform="translate(-1182 -337)" fill="#f4b650"/>
<path id="Path_3014" data-name="Path 3014" d="M131.349,93.312h5a.5.5,0,0,1,0,1h-5a.5.5,0,0,1,0-1" transform="translate(-1181 -343.5)" fill="#f4b650"/>
<path id="Path_3015" data-name="Path 3015" d="M131.349,99.312h5a.5.5,0,1,1,0,1h-5a.5.5,0,1,1,0-1" transform="translate(-1181 -346.5)" fill="#f4b650"/>
</g>
</svg>
{{ translate('Message Seller') }}
</button>
</div>
@endif
</div>
<hr>
<!-- For auction product -->
@if ($detailedProduct->auction_product)
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-1">{{ translate('Auction Will End')}}</div>
</div>
<div class="col-sm-10">
@if($detailedProduct->auction_end_date > strtotime("now"))
<div class="aiz-count-down align-items-center" data-date="{{ date('Y/m/d H:i:s', $detailedProduct->auction_end_date) }}"></div>
@else
<p>{{ translate('Ended')}}</p>
@endif
</div>
</div>
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-1">{{ translate('Starting Bid')}}</div>
</div>
<div class="col-sm-10">
<span class="opacity-50 fs-20">
{{ single_price($detailedProduct->starting_bid) }}
</span>
@if($detailedProduct->unit != null)
<span class="opacity-70">/{{ $detailedProduct->getTranslation('unit') }}</span>
@endif
</div>
</div>
@if(Auth::check() && Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first() != null)
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-1">{{ translate('My Bidded Amount')}}</div>
</div>
<div class="col-sm-10">
<span class="opacity-50 fs-20">
{{ single_price(Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first()->amount) }}
</span>
</div>
</div>
<hr>
@endif
@php $highest_bid = $detailedProduct->bids->max('amount'); @endphp
<div class="row no-gutters my-2 mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-1">{{ translate('Highest Bid')}}</div>
</div>
<div class="col-sm-10">
<strong class="h3 fw-600 text-primary">
@if($highest_bid != null)
{{ single_price($highest_bid) }}
@endif
</strong>
</div>
</div>
@else
<!-- Without auction product -->
@if ($detailedProduct->wholesale_product == 1)
<!-- Wholesale -->
<table class="table mb-3">
<thead>
<tr>
<th class="border-top-0">{{ translate('Min Qty') }}</th>
<th class="border-top-0">{{ translate('Max Qty') }}</th>
<th class="border-top-0">{{ translate('Unit Price') }}</th>
</tr>
</thead>
<tbody>
@foreach ($detailedProduct->stocks->first()->wholesalePrices as $wholesalePrice)
<tr>
<td>{{ $wholesalePrice->min_qty }}</td>
<td>{{ $wholesalePrice->max_qty }}</td>
<td>{{ single_price($wholesalePrice->price) }}</td>
</tr>
@endforeach
</tbody>
</table>
@else
<!-- Without Wholesale -->
@if (home_price($detailedProduct) != home_discounted_price($detailedProduct))
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400">{{ translate('Price')}}</div>
</div>
<div class="col-sm-10">
<div class="d-flex align-items-center">
<!-- Discount Price -->
<strong class="fs-16 fw-700 text-primary">
{{ home_discounted_price($detailedProduct) }}
</strong>
<!-- Home Price -->
<del class="fs-14 opacity-60 ml-2">
{{ home_price($detailedProduct) }}
</del>
<!-- Unit -->
@if($detailedProduct->unit != null)
<span class="opacity-70 ml-1">/{{ $detailedProduct->getTranslation('unit') }}</span>
@endif
<!-- Discount percentage -->
@if(discount_in_percentage($detailedProduct) > 0)
<span class="bg-primary ml-2 fs-11 fw-700 text-white w-35px text-center p-1" style="padding-top:2px;padding-bottom:2px;">-{{discount_in_percentage($detailedProduct)}}%</span>
@endif
<!-- Club Point -->
@if (addon_is_activated('club_point') && $detailedProduct->earn_point > 0)
<div class="ml-2 bg-warning d-flex justify-content-center align-items-center px-3 py-1" style="width: fit-content;">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
<g id="Group_23922" data-name="Group 23922" transform="translate(-973 -633)">
<circle id="Ellipse_39" data-name="Ellipse 39" cx="6" cy="6" r="6" transform="translate(973 633)" fill="#fff"/>
<g id="Group_23920" data-name="Group 23920" transform="translate(973 633)">
<path id="Path_28698" data-name="Path 28698" d="M7.667,3H4.333L3,5,6,9,9,5Z" transform="translate(0 0)" fill="#f3af3d"/>
<path id="Path_28699" data-name="Path 28699" d="M5.33,3h-1L3,5,6,9,4.331,5Z" transform="translate(0 0)" fill="#f3af3d" opacity="0.5"/>
<path id="Path_28700" data-name="Path 28700" d="M12.666,3h1L15,5,12,9l1.664-4Z" transform="translate(-5.995 0)" fill="#f3af3d"/>
</g>
</g>
</svg>
<small class="fs-11 fw-500 text-white ml-2">{{ translate('Club Point') }}: {{ $detailedProduct->earn_point }}</small>
</div>
@endif
</div>
</div>
</div>
@else
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400">{{ translate('Price') }}</div>
</div>
<div class="col-sm-10">
<div class="d-flex align-items-center">
<!-- Discount Price -->
<strong class="fs-16 fw-700 text-primary">
{{ home_discounted_price($detailedProduct) }}
</strong>
<!-- Unit -->
@if ($detailedProduct->unit != null)
<span class="opacity-70">/{{ $detailedProduct->getTranslation('unit') }}</span>
@endif
<!-- Club Point -->
@if (addon_is_activated('club_point') && $detailedProduct->earn_point > 0)
<div class="ml-2 bg-warning d-flex justify-content-center align-items-center px-3 py-1" style="width: fit-content;">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
<g id="Group_23922" data-name="Group 23922" transform="translate(-973 -633)">
<circle id="Ellipse_39" data-name="Ellipse 39" cx="6" cy="6" r="6" transform="translate(973 633)" fill="#fff"/>
<g id="Group_23920" data-name="Group 23920" transform="translate(973 633)">
<path id="Path_28698" data-name="Path 28698" d="M7.667,3H4.333L3,5,6,9,9,5Z" transform="translate(0 0)" fill="#f3af3d"/>
<path id="Path_28699" data-name="Path 28699" d="M5.33,3h-1L3,5,6,9,4.331,5Z" transform="translate(0 0)" fill="#f3af3d" opacity="0.5"/>
<path id="Path_28700" data-name="Path 28700" d="M12.666,3h1L15,5,12,9l1.664-4Z" transform="translate(-5.995 0)" fill="#f3af3d"/>
</g>
</g>
</svg>
<small class="fs-11 fw-500 text-white ml-2">{{ translate('Club Point') }}: {{ $detailedProduct->earn_point }}</small>
</div>
@endif
</div>
</div>
</div>
@endif
@endif
@endif
@if ($detailedProduct->auction_product != 1)
<form id="option-choice-form">
@csrf
<input type="hidden" name="id" value="{{ $detailedProduct->id }}">
@if ($detailedProduct->digital == 0)
<!-- Choice Options -->
@if ($detailedProduct->choice_options != null)
@foreach (json_decode($detailedProduct->choice_options) as $key => $choice)
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-2 ">
{{ \App\Models\Attribute::find($choice->attribute_id)->getTranslation('name') }}
</div>
</div>
<div class="col-sm-10">
<div class="aiz-radio-inline">
@foreach ($choice->values as $key => $value)
<label class="aiz-megabox pl-0 mr-2 mb-0">
<input
type="radio"
name="attribute_id_{{ $choice->attribute_id }}"
value="{{ $value }}"
@if($key == 0) checked @endif
>
<span class="aiz-megabox-elem rounded-0 d-flex align-items-center justify-content-center py-1 px-3">
{{ $value }}
</span>
</label>
@endforeach
</div>
</div>
</div>
@endforeach
@endif
<!-- Color Options -->
@if (count(json_decode($detailedProduct->colors)) > 0)
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-2">{{ translate('Color')}}</div>
</div>
<div class="col-sm-10">
<div class="aiz-radio-inline">
@foreach (json_decode($detailedProduct->colors) as $key => $color)
<label class="aiz-megabox pl-0 mr-2 mb-0" data-toggle="tooltip" data-title="{{ \App\Models\Color::where('code', $color)->first()->name }}">
<input
type="radio"
name="color"
value="{{ \App\Models\Color::where('code', $color)->first()->name }}"
@if($key == 0) checked @endif
>
<span class="aiz-megabox-elem rounded-0 d-flex align-items-center justify-content-center p-1">
<span class="size-25px d-inline-block rounded" style="background: {{ $color }};"></span>
</span>
</label>
@endforeach
</div>
</div>
</div>
@endif
<!-- Quantity + Add to cart -->
<div class="row no-gutters mb-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-2">{{ translate('Quantity')}}</div>
</div>
<div class="col-sm-10">
<div class="product-quantity d-flex align-items-center">
<div class="row no-gutters align-items-center aiz-plus-minus mr-3" style="width: 130px;">
<button class="btn col-auto btn-icon btn-sm btn-light rounded-0"
type="button" data-type="minus" data-field="quantity" disabled="">
<i class="las la-minus"></i>
</button>
<input type="number" name="quantity"
class="col border-0 text-center flex-grow-1 fs-16 input-number" placeholder="1"
value="{{ $detailedProduct->min_qty }}" min="{{ $detailedProduct->min_qty }}" max="10" lang="en">
<button class="btn col-auto btn-icon btn-sm btn-light rounded-0" type="button" data-type="plus" data-field="quantity">
<i class="las la-plus"></i>
</button>
</div>
@php
$qty = 0;
foreach ($detailedProduct->stocks as $key => $stock) {
$qty += $stock->qty;
}
@endphp
<div class="avialable-amount opacity-60">
@if($detailedProduct->stock_visibility_state == 'quantity')
(<span id="available-quantity">{{ $qty }}</span> {{ translate('available')}})
@elseif($detailedProduct->stock_visibility_state == 'text' && $qty >= 1)
(<span id="available-quantity">{{ translate('In Stock') }}</span>)
@endif
</div>
</div>
</div>
</div>
@endif
<!-- Total Price -->
<div class="row no-gutters pb-3 d-none" id="chosen_price_div">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-1">{{ translate('Total Price') }}</div>
</div>
<div class="col-sm-10">
<div class="product-price">
<strong id="chosen_price" class="fs-20 fw-700 text-primary">
</strong>
</div>
</div>
</div>
</form>
@endif
@if ($detailedProduct->auction_product)
@php
$highest_bid = $detailedProduct->bids->max('amount');
$min_bid_amount = $highest_bid != null ? $highest_bid+1 : $detailedProduct->starting_bid;
@endphp
@if($detailedProduct->auction_end_date >= strtotime("now"))
<div class="mt-4">
@if(Auth::check() && $detailedProduct->user_id == Auth::user()->id)
<span class="badge badge-inline badge-danger">{{ translate('Seller Can Not Place Bid to His Own Product') }}</span>
@else
<button type="button" class="btn btn-primary buy-now fw-600 w-150px rounded-0" onclick="bid_modal()">
<i class="las la-gavel"></i>
@if(Auth::check() && Auth::user()->product_bids->where('product_id',$detailedProduct->id)->first() != null)
{{ translate('Change Bid')}}
@else
{{ translate('Place Bid')}}
@endif
</button>
@endif
</div>
@endif
@else
<!-- Add to cart & Buy now Buttons -->
<div class="mt-3">
@if ($detailedProduct->digital == 0)
@if ($detailedProduct->external_link != null)
<a type="button" class="btn btn-primary buy-now fw-600 add-to-cart px-4 rounded-0"
href="{{ $detailedProduct->external_link }}">
<i class="la la-share"></i> {{ translate($detailedProduct->external_link_btn) }}
</a>
@else
<button type="button" class="btn btn-warning mr-2 add-to-cart fw-600 w-150px rounded-0 text-white"
onclick="addToCart()">
<i class="las la-shopping-bag"></i>
<span class="d-none d-md-inline-block"> {{ translate('Add to cart') }}</span>
</button>
<button type="button" class="btn btn-primary buy-now fw-600 add-to-cart w-150px rounded-0" onclick="buyNow()">
<i class="la la-shopping-cart"></i> {{ translate('Buy Now') }}
</button>
@endif
<button type="button" class="btn btn-secondary out-of-stock fw-600 d-none" disabled>
<i class="la la-cart-arrow-down"></i> {{ translate('Out of Stock') }}
</button>
@elseif ($detailedProduct->digital == 1)
<button type="button" class="btn btn-warning mr-2 add-to-cart fw-600 w-150px rounded-0 text-white" onclick="addToCart()">
<i class="las la-shopping-bag"></i>
<span class="d-none d-md-inline-block"> {{ translate('Add to cart')}}</span>
</button>
<button type="button" class="btn btn-primary buy-now fw-600 add-to-cart w-150px rounded-0" onclick="buyNow()">
<i class="la la-shopping-cart"></i> {{ translate('Buy Now')}}
</button>
@endif
</div>
<!-- Promote Link -->
<div class="d-table width-100 mt-3">
<div class="d-table-cell">
@if (Auth::check() && addon_is_activated('affiliate_system') && (\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->status || \App\Models\AffiliateOption::where('type', 'category_wise_affiliate')->first()->status) && Auth::user()->affiliate_user != null && Auth::user()->affiliate_user->status)
@php
if (Auth::check()) {
if (Auth::user()->referral_code == null) {
Auth::user()->referral_code = substr(Auth::user()->id . Str::random(10), 0, 10);
Auth::user()->save();
}
$referral_code = Auth::user()->referral_code;
$referral_code_url = URL::to('/product') . '/' . $detailedProduct->slug . "?product_referral_code=$referral_code";
}
@endphp
<div>
<button type="button" id="ref-cpurl-btn" class="btn btn-secondary w-200px rounded-0"
data-attrcpy="{{ translate('Copied') }}"
onclick="CopyToClipboard(this)"
data-url="{{ $referral_code_url }}">{{ translate('Copy the Promote Link') }}</button>
</div>
@endif
</div>
</div>
<!-- Refund -->
@php
$refund_sticker = get_setting('refund_sticker');
@endphp
@if (addon_is_activated('refund_request'))
<div class="row no-gutters mt-3">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-2">{{ translate('Refund') }}</div>
</div>
<div class="col-sm-10">
@if ($detailedProduct->refundable == 1)
<a href="{{ route('returnpolicy') }}" target="_blank">
@if ($refund_sticker != null)
<img src="{{ uploaded_asset($refund_sticker) }}" height="36">
@else
<img src="{{ static_asset('assets/img/refund-sticker.jpg') }}"
height="36">
@endif
</a>
<a href="{{ route('returnpolicy') }}" class="text-blue hov-text-primary fs-14 ml-3"
target="_blank">{{ translate('View Policy') }}</a>
@else
<div class="text-dark fs-14 fw-400 mt-2">{{ translate('Not Applicable') }}</div>
@endif
</div>
</div>
@endif
<!-- Seller Guarantees -->
@if ($detailedProduct->digital == 1)
@if ($detailedProduct->added_by == 'seller')
<div class="row no-gutters mt-3">
<div class="col-2">
<div class="text-secondary fs-14 fw-400">{{ translate('Seller Guarantees')}}</div>
</div>
<div class="col-10">
@if ($detailedProduct->user->shop->verification_status == 1)
<span class="text-success fs-14 fw-700">{{ translate('Verified seller')}}</span>
@else
<span class="text-danger fs-14 fw-700">{{ translate('Non verified seller')}}</span>
@endif
</div>
</div>
@endif
@endif
@endif
<!-- Share -->
<div class="row no-gutters mt-4">
<div class="col-sm-2">
<div class="text-secondary fs-14 fw-400 mt-2">{{ translate('Share') }}</div>
</div>
<div class="col-sm-10">
<div class="aiz-share"></div>
</div>
</div>
</div>

View File

@@ -0,0 +1,64 @@
<div class="sticky-top z-3 row gutters-10">
@if($detailedProduct->photos != null)
@php
$photos = explode(',', $detailedProduct->photos);
@endphp
<!-- Gallery Images -->
<div class="col-12">
<div class="aiz-carousel product-gallery arrow-inactive-transparent arrow-lg-none" data-nav-for='.product-gallery-thumb' data-fade='true' data-auto-height='true' data-arrows='true'>
@foreach ($photos as $key => $photo)
<div class="carousel-box img-zoom rounded-0">
<img class="img-fluid h-auto lazyload mx-auto"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($photo) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</div>
@endforeach
@if ($detailedProduct->digital == 0)
@foreach ($detailedProduct->stocks as $key => $stock)
@if ($stock->image != null)
<div class="carousel-box img-zoom rounded-0">
<img class="img-fluid h-auto lazyload mx-auto"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($stock->image) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</div>
@endif
@endforeach
@endif
</div>
</div>
<!-- Thumbnail Images -->
<div class="col-12 mt-3 d-none d-lg-block">
<div class="aiz-carousel product-gallery-thumb" data-items='7' data-nav-for='.product-gallery' data-focus-select='true' data-arrows='true' data-vertical='false' data-auto-height='true'>
@foreach ($photos as $key => $photo)
<div class="carousel-box c-pointer rounded-0">
<img class="lazyload mw-100 size-60px mx-auto border p-1"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($photo) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</div>
@endforeach
@if ($detailedProduct->digital == 0)
@foreach ($detailedProduct->stocks as $key => $stock)
@if ($stock->image != null)
<div class="carousel-box c-pointer rounded-0"
data-variation="{{ $stock->variant }}">
<img class="lazyload mw-100 size-60px mx-auto border p-1"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($stock->image) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</div>
@endif
@endforeach
@endif
</div>
</div>
@endif
</div>

View File

@@ -0,0 +1,107 @@
@if(get_setting('product_query_activation') == 1)
<div class="bg-white border mt-4 mb-4" id="product_query">
<div class="p-3 p-sm-4">
<h3 class="fs-16 fw-700 mb-0">
<span>{{ translate(' Product Queries ') }} ({{ $total_query }})</span>
</h3>
</div>
<!-- Login & Register -->
@guest
<p class="fs-14 fw-400 mb-0 px-3 px-sm-4 mt-3"><a
href="{{ route('user.login') }}">{{ translate('Login') }}</a> or <a class="mr-1"
href="{{ route('register') }}">{{ translate('Register ') }}</a>{{ translate(' to submit your questions to seller') }}
</p>
@endguest
<!-- Query Submit -->
@auth
<div class="query form px-3 px-sm-4">
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<form action="{{ route('product-queries.store') }}" method="POST">
@csrf
<input type="hidden" name="product" value="{{ $detailedProduct->id }}">
<div class="form-group">
<textarea class="form-control rounded-0" rows="3" cols="40" name="question"
placeholder="{{ translate('Write your question here...') }}" style="resize: none;"></textarea>
</div>
<button type="submit" class="btn btn-sm w-150px btn-primary rounded-0">{{ translate('Submit') }}</button>
</form>
</div>
<!-- Own Queries -->
@php
$own_product_queries = Auth::user()->product_queries->where('product_id',$detailedProduct->id);
@endphp
@if ($own_product_queries->count() > 0)
<div class="question-area my-4 mb-0 px-3 px-sm-4">
<div class="py-3">
<h3 class="fs-16 fw-700 mb-0">
<span class="mr-4">{{ translate('My Questions') }}</span>
</h3>
</div>
@foreach ($own_product_queries as $product_query)
<div class="produc-queries mb-4">
<div class="query d-flex my-2">
<span class="mt-1"><svg xmlns="http://www.w3.org/2000/svg" width="24.994"
height="24.981" viewBox="0 0 24.994 24.981">
<g id="Group_23909" data-name="Group 23909"
transform="translate(18392.496 11044.037)">
<path id="Subtraction_90" data-name="Subtraction 90"
d="M1830.569-117.742a.4.4,0,0,1-.158-.035.423.423,0,0,1-.252-.446c0-.84,0-1.692,0-2.516v-2.2a5.481,5.481,0,0,1-2.391-.745,5.331,5.331,0,0,1-2.749-4.711c-.034-2.365-.018-4.769,0-7.094l0-.649a5.539,5.539,0,0,1,4.694-5.513,5.842,5.842,0,0,1,.921-.065q3.865,0,7.73,0l5.035,0a5.539,5.539,0,0,1,5.591,5.57c.01,2.577.01,5.166,0,7.693a5.54,5.54,0,0,1-4.842,5.506,6.5,6.5,0,0,1-.823.046l-3.225,0c-1.454,0-2.753,0-3.97,0a.555.555,0,0,0-.435.182c-1.205,1.214-2.435,2.445-3.623,3.636l-.062.062-1.005,1.007-.037.037-.069.069A.464.464,0,0,1,1830.569-117.742Zm7.37-11.235h0l1.914,1.521.817-.754-1.621-1.273a3.517,3.517,0,0,0,1.172-1.487,5.633,5.633,0,0,0,.418-2.267v-.58a5.629,5.629,0,0,0-.448-2.323,3.443,3.443,0,0,0-1.282-1.525,3.538,3.538,0,0,0-1.93-.53,3.473,3.473,0,0,0-1.905.534,3.482,3.482,0,0,0-1.288,1.537,5.582,5.582,0,0,0-.454,2.314v.654a5.405,5.405,0,0,0,.471,2.261,3.492,3.492,0,0,0,1.287,1.5,3.492,3.492,0,0,0,1.9.527,3.911,3.911,0,0,0,.947-.112Zm-.948-.9a2.122,2.122,0,0,1-1.812-.9,4.125,4.125,0,0,1-.652-2.457v-.667a4.008,4.008,0,0,1,.671-2.4,2.118,2.118,0,0,1,1.78-.863,2.138,2.138,0,0,1,1.824.869,4.145,4.145,0,0,1,.639,2.473v.673a4.07,4.07,0,0,1-.655,2.423A2.125,2.125,0,0,1,1836.991-129.881Z"
transform="translate(-20217 -10901.814)" fill="#e62e04"
stroke="rgba(0,0,0,0)" stroke-miterlimit="10"
stroke-width="1" />
</g>
</svg></span>
<div class="ml-3">
<div class="fs-14">{{ strip_tags($product_query->question) }}</div>
<span class="text-secondary">{{ $product_query->user->name }} </span>
</div>
</div>
<div class="answer d-flex my-2">
<span class="mt-1"> <svg xmlns="http://www.w3.org/2000/svg" width="24.99"
height="24.98" viewBox="0 0 24.99 24.98">
<g id="Group_23908" data-name="Group 23908"
transform="translate(17952.169 11072.5)">
<path id="Subtraction_89" data-name="Subtraction 89"
d="M2162.9-146.2a.4.4,0,0,1-.159-.035.423.423,0,0,1-.251-.446q0-.979,0-1.958V-151.4a5.478,5.478,0,0,1-2.39-.744,5.335,5.335,0,0,1-2.75-4.712c-.034-2.355-.018-4.75,0-7.065l0-.678a5.54,5.54,0,0,1,4.7-5.513,5.639,5.639,0,0,1,.92-.064c2.527,0,5.029,0,7.437,0l5.329,0a5.538,5.538,0,0,1,5.591,5.57c.01,2.708.01,5.224,0,7.692a5.539,5.539,0,0,1-4.843,5.506,6,6,0,0,1-.822.046l-3.234,0c-1.358,0-2.691,0-3.96,0a.556.556,0,0,0-.436.182c-1.173,1.182-2.357,2.367-3.5,3.514l-1.189,1.192-.047.048-.058.059A.462.462,0,0,1,2162.9-146.2Zm5.115-12.835h3.559l.812,2.223h1.149l-3.25-8.494h-.98l-3.244,8.494h1.155l.8-2.222Zm3.226-.915h-2.888l1.441-3.974,1.447,3.972Z"
transform="translate(-20109 -10901.815)" fill="#f7941d"
stroke="rgba(0,0,0,0)" stroke-miterlimit="10"
stroke-width="1" />
</g>
</svg></span>
<div class="ml-3">
<div class="fs-14">
{{ strip_tags($product_query->reply ? $product_query->reply : translate('Seller did not respond yet')) }}
</div>
<span class=" text-secondary">
{{ $product_query->product->user->name }} </span>
</div>
</div>
</div>
@endforeach
</div>
@endif
@endauth
<!-- Others Queries -->
<div class="queries-area my-4 mb-0 px-3 px-sm-4">
@include('frontend.partials.product_query_pagination')
</div>
</div>
@endif

View File

@@ -0,0 +1,43 @@
<div class="bg-white border">
<div class="p-3 p-sm-4">
<h3 class="fs-16 fw-700 mb-0">
<span class="mr-4">{{ translate('Related products') }}</span>
</h3>
</div>
<div class="px-4">
<div class="aiz-carousel gutters-5 half-outside-arrow" data-items="5" data-xl-items="3"
data-lg-items="4" data-md-items="3" data-sm-items="2" data-xs-items="2"
data-arrows='true' data-infinite='true'>
@foreach (filter_products(\App\Models\Product::where('category_id', $detailedProduct->category_id)
->where('id', '!=', $detailedProduct->id))->limit(10)->get() as $key => $related_product)
<div class="carousel-box">
<div class="aiz-card-box hov-shadow-md my-2 has-transition hov-scale-img">
<div class="">
<a href="{{ route('product', $related_product->slug) }}"
class="d-block">
<img class="img-fit lazyload mx-auto h-140px h-md-190px has-transition"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($related_product->thumbnail_img) }}"
alt="{{ $related_product->getTranslation('name') }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</a>
</div>
<div class="p-md-3 p-2 text-center">
<h3 class="fw-400 fs-14 text-dark text-truncate-2 lh-1-4 mb-0 h-35px">
<a href="{{ route('product', $related_product->slug) }}"
class="d-block text-reset hov-text-primary">{{ $related_product->getTranslation('name') }}</a>
</h3>
<div class="fs-14 mt-3">
<span class="fw-700 text-primary">{{ home_discounted_base_price($related_product) }}</span>
@if (home_base_price($related_product) != home_discounted_base_price($related_product))
<del
class="fw-700 opacity-60 ml-1">{{ home_base_price($related_product) }}</del>
@endif
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
</div>

View File

@@ -0,0 +1,41 @@
<div class="bg-white border mb-4">
<div class="p-3 p-sm-4">
<h3 class="fs-16 fw-700 mb-0">
<span class="mr-4">{{ translate('Reviews & Ratings') }}</span>
</h3>
</div>
<!-- Ratting -->
<div class="px-3 px-sm-4 mb-4">
<div class="border border-warning bg-soft-warning p-3 p-sm-4">
<div class="row align-items-center">
<div class="col-md-8 mb-3">
<div class="d-flex align-items-center justify-content-between justify-content-md-start">
<div class="w-100 w-sm-auto">
<span class="fs-36 mr-3">{{ $detailedProduct->rating }}</span>
<span class="fs-14 mr-3">{{ translate('out of 5.0') }}</span>
</div>
<div class="mt-sm-3 w-100 w-sm-auto d-flex flex-wrap justify-content-end justify-content-md-start">
@php
$total = 0;
$total += $detailedProduct->reviews->count();
@endphp
<span class="rating rating-mr-1">
{{ renderStarRating($detailedProduct->rating) }}
</span>
<span class="ml-1 fs-14">({{ $total }}
{{ translate('reviews') }})</span>
</div>
</div>
</div>
<div class="col-md-4 text-right">
<a href="javascript:void(0);" onclick="product_review('{{ $detailedProduct->id }}')"
class="btn btn-warning fw-400 rounded-0 text-white">
<span class="d-md-inline-block"> {{ translate('Rate this Product') }}</span>
</a>
</div>
</div>
</div>
</div>
<!-- Reviews -->
@include('frontend.product_details.reviews')
</div>

View File

@@ -0,0 +1,74 @@
<div class="py-3 reviews-area">
<ul class="list-group list-group-flush">
@foreach ($reviews as $key => $review)
@if ($review->user != null)
<li class="media list-group-item d-flex px-3 px-md-4 border-0">
<!-- Review User Image -->
<span class="avatar avatar-md mr-3">
<img class="lazyload"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';"
@if ($review->user->avatar_original != null) data-src="{{ uploaded_asset($review->user->avatar_original) }}"
@else
data-src="{{ static_asset('assets/img/placeholder.jpg') }}" @endif>
</span>
<div class="media-body text-left">
<!-- Review User Name -->
<h3 class="fs-15 fw-600 mb-0">{{ $review->user->name }}
</h3>
<!-- Review Date -->
<div class="opacity-60 mb-1">
{{ date('d-m-Y', strtotime($review->created_at)) }}
</div>
<!-- Review ratting -->
<span class="rating rating-mr-1">
@for ($i = 0; $i < $review->rating; $i++)
<i class="las la-star active"></i>
@endfor
@for ($i = 0; $i < 5 - $review->rating; $i++)
<i class="las la-star"></i>
@endfor
</span>
<!-- Review Comment -->
<p class="comment-text mt-2 fs-14">
{{ $review->comment }}
</p>
<!-- Review Images -->
<div class="spotlight-group d-flex flex-wrap">
@if($review->photos != null)
@foreach (explode(',', $review->photos) as $photo)
<a class="spotlight mr-2 mr-md-3 mb-2 mb-md-3 size-60px size-md-90px border overflow-hidden has-transition hov-scale-img hov-border-primary" href="{{ uploaded_asset($photo) }}">
<img class="img-fit h-100 lazyload has-transition"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($photo) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</a>
@endforeach
@endif
</div>
<!-- Variation -->
@php
$OrderDetail = \App\Models\OrderDetail::with(['order' => function ($q) use($review) {
$q->where('user_id', $review->user_id);
}])->where('product_id', $review->product_id)->where('delivery_status', 'delivered')->first();
@endphp
@if ($OrderDetail && $OrderDetail->variation)
<small class="text-secondary fs-12">{{ translate('Variation :') }} {{ $OrderDetail->variation }}</small>
@endif
</div>
</li>
@endif
@endforeach
</ul>
@if (count($reviews) <= 0)
<div class="text-center fs-18 opacity-70">
{{ translate('There have been no reviews for this product yet.') }}
</div>
@endif
<!-- Pagination -->
<div class="aiz-pagination product-reviews-pagination py-2 px-4 d-flex justify-content-end">
{{ $reviews->links() }}
</div>
</div>

View File

@@ -0,0 +1,111 @@
@if ($detailedProduct->added_by == 'seller' && $detailedProduct->user->shop != null)
<div class="border mb-4" style="background: #fcfcfd;">
<div class="position-relative p-3 p-sm-4 text-left">
<div class="opacity-60 fs-14 mb-3">{{ translate('Seller') }}</div>
<div class="mt-1">
<!-- Shop Logo -->
@if ($detailedProduct->added_by == 'seller' && get_setting('vendor_system_activation') == 1)
<a href="{{ route('shop.visit', $detailedProduct->user->shop->slug) }}" class="avatar avatar-md mr-2 overflow-hidden border float-left float-lg-none float-xl-left">
<img class="lazyload"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($detailedProduct->user->shop->logo) }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</a>
@endif
<!-- Shop Name & Verification status -->
<div>
<a href="{{ route('shop.visit', $detailedProduct->user->shop->slug) }}"
class="text-reset hov-text-primary d-block fs-14 fw-700">
{{ $detailedProduct->user->shop->name }}
@if ($detailedProduct->user->shop->verification_status == 1)
<span class="ml-2">
<svg xmlns="http://www.w3.org/2000/svg" width="17.5" height="17.5" viewBox="0 0 17.5 17.5">
<g id="Group_25616" data-name="Group 25616" transform="translate(-537.249 -1042.75)">
<path id="Union_5" data-name="Union 5" d="M0,8.75A8.75,8.75,0,1,1,8.75,17.5,8.75,8.75,0,0,1,0,8.75Zm.876,0A7.875,7.875,0,1,0,8.75.875,7.883,7.883,0,0,0,.876,8.75Zm.875,0a7,7,0,1,1,7,7A7.008,7.008,0,0,1,1.751,8.751Zm3.73-.907a.789.789,0,0,0,0,1.115l2.23,2.23a.788.788,0,0,0,1.115,0l3.717-3.717a.789.789,0,0,0,0-1.115.788.788,0,0,0-1.115,0l-3.16,3.16L6.6,7.844a.788.788,0,0,0-1.115,0Z" transform="translate(537.249 1042.75)" fill="#3490f3"/>
</g>
</svg>
</span>
@else
<span class="ml-2">
<svg xmlns="http://www.w3.org/2000/svg" width="17.5" height="17.5" viewBox="0 0 17.5 17.5">
<g id="Group_25616" data-name="Group 25616" transform="translate(-537.249 -1042.75)">
<path id="Union_5" data-name="Union 5" d="M0,8.75A8.75,8.75,0,1,1,8.75,17.5,8.75,8.75,0,0,1,0,8.75Zm.876,0A7.875,7.875,0,1,0,8.75.875,7.883,7.883,0,0,0,.876,8.75Zm.875,0a7,7,0,1,1,7,7A7.008,7.008,0,0,1,1.751,8.751Zm3.73-.907a.789.789,0,0,0,0,1.115l2.23,2.23a.788.788,0,0,0,1.115,0l3.717-3.717a.789.789,0,0,0,0-1.115.788.788,0,0,0-1.115,0l-3.16,3.16L6.6,7.844a.788.788,0,0,0-1.115,0Z" transform="translate(537.249 1042.75)" fill="red"/>
</g>
</svg>
</span>
@endif
</a>
<div class="location opacity-70">{{ $detailedProduct->user->shop->address }}</div>
</div>
</div>
<!-- Ratting -->
<div class="mt-3">
<div class="rating rating-mr-1">
@php
$total = 0;
$total += $detailedProduct->reviews->count();
@endphp
@if ($total > 0)
{{ renderStarRating($detailedProduct->user->shop->rating) }}
@else
{{ renderStarRating(0) }}
@endif
</div>
<div class="opacity-60 fs-12">({{ $total }}
{{ translate('customer reviews') }})</div>
</div>
<!-- Social Links -->
@if ($detailedProduct->user->shop->facebook || $detailedProduct->user->shop->google || $detailedProduct->user->shop->twitter || $detailedProduct->user->shop->youtube)
<div class="mt-3">
<ul class="social list-inline mb-0">
@if ($detailedProduct->user->shop->facebook)
<li class="list-inline-item mr-2 mb-2">
<a href="{{ $detailedProduct->user->shop->facebook }}" class="facebook"
target="_blank">
<i class="lab la-facebook-f opacity-60"></i>
</a>
</li>
@endif
@if ($detailedProduct->user->shop->instagram)
<li class="list-inline-item mr-2 mb-2">
<a href="{{ $detailedProduct->user->shop->instagram }}" class="instagram"
target="_blank">
<i class="lab la-instagram opacity-60"></i>
</a>
</li>
@endif
@if ($detailedProduct->user->shop->google)
<li class="list-inline-item mr-2 mb-2">
<a href="{{ $detailedProduct->user->shop->google }}" class="google"
target="_blank">
<i class="lab la-google opacity-60"></i>
</a>
</li>
@endif
@if ($detailedProduct->user->shop->twitter)
<li class="list-inline-item mr-2 mb-2">
<a href="{{ $detailedProduct->user->shop->twitter }}" class="twitter"
target="_blank">
<i class="lab la-twitter opacity-60"></i>
</a>
</li>
@endif
@if ($detailedProduct->user->shop->youtube)
<li class="list-inline-item">
<a href="{{ $detailedProduct->user->shop->youtube }}" class="youtube"
target="_blank">
<i class="lab la-youtube opacity-60"></i>
</a>
</li>
@endif
</ul>
</div>
@endif
<!-- shop link button -->
<div class="mt-3">
<a href="{{ route('shop.visit', $detailedProduct->user->shop->slug) }}"
class="btn btn-block btn-slide-warning fs-14 fw-700 rounded-0">{{ translate('Visit Store') }}</a>
</div>
</div>
</div>
@endif

View File

@@ -0,0 +1,46 @@
<div class="bg-white border mb-4">
<div class="p-3 p-sm-4 fs-16 fw-600">
{{ translate('Top Selling Products') }}
</div>
<div class="px-3 px-sm-4 pb-4">
<ul class="list-group list-group-flush">
@foreach (filter_products(\App\Models\Product::where('user_id', $detailedProduct->user_id)
->orderBy('num_of_sale', 'desc'))->limit(6)->get() as $key => $top_product)
<li class="py-3 px-0 list-group-item border-0">
<div class="row gutters-10 align-items-center hov-scale-img hov-shadow-md overflow-hidden has-transition">
<div class="col-xl-4 col-lg-6 col-4">
<!-- Image -->
<a href="{{ route('product', $top_product->slug) }}"
class="d-block text-reset">
<img class="img-fit lazyload h-80px h-md-150px h-lg-80px has-transition"
src="{{ static_asset('assets/img/placeholder.jpg') }}"
data-src="{{ uploaded_asset($top_product->thumbnail_img) }}"
alt="{{ $top_product->getTranslation('name') }}"
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
</a>
</div>
<div class="col text-left">
<!-- Product name -->
<div class="d-lg-none d-xl-block mb-3">
<h4 class="fs-14 fw-400 text-truncate-2">
<a href="{{ route('product', $top_product->slug) }}"
class="d-block text-reset hov-text-primary">{{ $top_product->getTranslation('name') }}</a>
</h4>
</div>
<div class="">
<!-- Price -->
<span class="fs-14 fw-700 text-primary">{{ home_discounted_base_price($top_product) }}</span>
<!-- Home Price -->
@if(home_price($top_product) != home_discounted_price($top_product))
<del class="fs-14 fw-700 opacity-60 ml-1 ml-lg-0 ml-xl-1">
{{ home_price($top_product) }}
</del>
@endif
</div>
</div>
</div>
</li>
@endforeach
</ul>
</div>
</div>