PATH:
home
/
lab2454c
/
netxzero.com
/
carbon-credit
/
resources
/
views
/
frontend
/
pages
/
ecommerce
@extends('frontend.layouts.master') @section('title', 'Details') @section('content') <div class="product-details-page"> <div class="container"> <div class="search-results-link"> <a href="{{ route('home') }}"> <i class="las la-angle-left"></i> <span>Back to results</span> </a> </div> <div class="row"> <div class="col-xl-4 col-lg-4 col-md-12"> <div class="overview"> <div class="gallery"> <div class="image__box"> <a class="" href="#" title="{{ $project['type'] ?? '' }}"> <img src="{{ $project->images->first()->url ?? asset('frontAssets/images/image1.jpeg') }}" id="ProjectImageContainer"> </a> </div> <div class="picture-thumbs popup-gallery"> @foreach($project->images as $image) <a class="thumb-item image-popup-vertical-fit" href="{{ $image['url'] }}" data-fullsize="{{ $image['url'] }}"> <img src="{{ $image['url'] }}" > </a> @endforeach </div> </div> <h5>Industry</h5> <ul> <li>{{ $project['type'] ?? '' }}</li> </ul> <h5>Location</h5> <ul> <li>{{ $project['city'] ?? '' }}, {{ $project['state'] ?? '' }}</li> </ul> <h5>Country</h5> <ul> <li>{{ $project['country'] ?? '' }}</li> </ul> <h5>Project Details</h5> <h6 class="super-benefit">Registry Name</h6> <ul class="co-benefits"> <li>{{ $project['registry_name'] ?? '' }}</li> </ul> <h6 class="super-benefit">Registry Link</h6> <ul class="co-benefits"> <li> <a href="{{ $project['registry_link'] ?? '' }}" target="_blank"> Project Link </a> </li> </ul> <h6 class="super-benefit">Ratings</h6> <ul class="co-benefits"> <li>{{ $project['rating'] }} - {{ $project['rating_title'] }}</li> </ul> </div> {{-- <div class="recent-contributors"> <div class="table-responsive"> <table> <h3 class="caption-head">Recent project contributors</h3> <tbody> <tr> <td>5/8/2022</td> <td><img alt="DE" src="images/de.png"></td> <td>500 t</td> </tr> <tr> <td>5/4/2022</td> <td><img alt="GB" src="images/gb.png"></td> <td>950 t</td> </tr> <tr> <td>4/28/2022</td> <td><img alt="DE" src="images/de.png"></td> <td>89 t</td> </tr> <tr> <td>4/22/2022</td> <td><img alt="DK" src="images/dk.png"></td> <td>1,228 t</td> </tr> <tr> <td>3/28/2022</td> <td><img alt="GB" src="images/gb.png"></td> <td>20 t</td> </tr> </tbody> <tfoot> <tr> <td colspan="3"><a href="#"> View all 5 </a></td> </tr> </tfoot> </table> </div> </div> --}} </div> <div class="col-xl-8 col-lg-8 col-md-12"> <div class="title"> <h4 class="sku"> {{ $project['type'] ?? '' }} </h4> <h3 class="project-title"> {{ $project['name'] ?? '' }} </h3> {{-- <p class="contributors-counter">5 <i class="fa fa-users" aria-label="Contributors"></i></p> --}} </div> <div class="description"> <p>{{ $project['short_description'] ?? '' }}</p> <div class="full-description"> <p>{!! $project['long_description'] ?? '' !!}</p> </div> </div> <div class="variants"> {{-- <div class="alert alert-info"> Bank transfer payment for this project is possible from USD 0.01 </div> --}} <div class="variant"> <div class="commitment-period">CP2</div> <div class="core"> <div class="info"> <p>USD(Cents) {{ $project['cost_per_kg_carbon_in_usd_cents'] ?? '' }} per kg</p> <table> <colgroup> <col class="header-column"> <col> </colgroup> <tbody> <tr> <th>Serial number</th> <td> {{ $project['registry_serial_number_range'] ?? '--' }}</td> </tr> <tr> <th>Applicable tax rate</th> <td>0 %</td> </tr> <tr> <th>Provider</th> <td>{{ $project['short_name'] ?? '' }}</td> </tr> <tr> <th>Availability</th> <td>{{ number_format($project['available_carbon_in_kg'], 2) ?? ''}} kg(s)</td> </tr> </tbody> </table> </div> <div class="add-to-cart"> <div class="add-to-cart-panel"> {{-- <div class="min-qty-notification">This product has a minimum quantity of 20</div> --}} <form method="POST" action="{{ route('addToCart') }}" id="ProjectForm"> @csrf @method('PUT') <div class="form-group"> <label class="qty-label" for="Quantity">kg(s)</label> <input class="qty-input form-control" type="number" id="Quantity" name="carbon_quantity" value="1" min="1" required> <input type="hidden" name="project_id" value="{{ $project->project_id }}"> </div> <button id="addToCart" class="btn add-to-cart-button" type="submit"> <i class="las la-shopping-cart" style="font-size: xx-large;"></i> </button> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> {{-- <script> $("#addToCart").click(function(event) { /* stop form from submitting normally */ event.preventDefault(); // $(".alert.alert-danger.mt-2").each(function (key, value) { // console.log(value); // value.remove(); // }); let form = $('#ProjectForm')[0]; let data = new FormData(form); console.log(data); $.ajax({ url: "{{ route('addToCart') }}", type:"POST", data:data, cache : false, processData: false, contentType: false, success:function(response){ let decode = JSON.parse(response); if(decode.status =="success"){ console.log('hi') }else{ } }, error: function(data){ // if (data.status == 422) { // //console.log(data); // let errorResponse = JSON.parse(data.responseText); // swal({ // title: "Error", // text:errorResponse.message, // icon:"error", // }); // $.each(errorResponse.errors, function (key, item){ // let keyname = key.split("."); // let elementName = keyname[0]+"["+keyname[1]+"]" // $('select[name="'+elementName+'"]').parent().append("<div class='alert alert-danger mt-2'>"+item+"</div>"); // $('input[name="'+elementName+'"]').parent().append("<div class='alert alert-danger mt-2'>"+item+"</div>"); // }); // } } }); }); </script> --}} <link href="{{ asset('frontAssets/css/magnific-popup.css') }}" rel="stylesheet"> <script src="{{ asset('frontAssets/js/jquery.magnific-popup.js') }}"></script> <script> $(document).ready(function() { $('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0, 1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', titleSrc: function(item) { return item.el.attr('title') + '<small>by Marsel Van Oosten</small>'; } } }); $('.thumb-item').click(function() { var img = $(this).data('fullsize'); $('#ProjectImageContainer').attr('src', img); }); }); </script> @endsection
[+]
..
[-] projectDetail.blade.php
[edit]