/
var
/
www
/
html
/
gnet_live
/
storage
/
framework
/
views
/
Upload File
HOME
<!doctype html> <html lang="id-ID"> <head> <?php echo app('Illuminate\Foundation\Vite')(['resources/css/cgm.min.css']); ?> <!-- Google Tag Manager --> <script nonce="<?php echo e($nonce); ?>" id="gtm-script" data-gtm-id="<?php echo e(config('app.gtm.id')); ?>" src="<?php echo e(asset('/assets/js/gtm.js')); ?>"></script> <!-- End Google Tag Manager --> <meta name="facebook-domain-verification" content="2h9qi0cwx3smddu6aiwh9gg9xzo0x6" /> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" type="image/x-icon" href="<?php echo e(asset('assets/img/gnet.webp')); ?>"> <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>"> <?php echo Meta::toHtml(); ?> <!-- Google Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="<?php echo e(asset('assets/css/font.css')); ?>" rel="stylesheet"> <!-- All CSS Plugins here --> <link rel="stylesheet" href="<?php echo e(asset('assets/css/plugins/swiper-bundle.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('assets/css/plugins/glightbox.min.css')); ?>"> <link rel="stylesheet" href="<?php echo e(asset('assets/css/vendor/bootstrap.min.css')); ?>"> <link nonce="<?php echo e($nonce); ?>" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"> <link nonce="<?php echo e($nonce); ?>" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css"> <!-- Custom Style CSS --> <link rel="stylesheet" href="<?php echo e(asset('assets/css/style.min.css')); ?>"> <!-- Inline Style CSS --> <link rel="stylesheet" href="<?php echo e(asset('assets/css/inline-style.css')); ?>"> </head> <body> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=<?php echo e(config('app.gtm.id')); ?>" height="0" width="0" class="inline-iframe"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <!-- IF LOGIN ADMIN --> <script src="<?php echo e(asset('assets/js/editorjs.umd.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/header.latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/quote.umd.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/nested-list-latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/checklist_latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/embed_latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/table_latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/delimiter_latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/raw_latest.js')); ?>"></script> <script src="<?php echo e(asset('assets/js/image-uploads.min.js')); ?>"></script> <!-- END LOGIN ADMIN --> <!-- Start header area --> <?php echo $__env->make('components.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <!-- End header area --> <main class="main__content_wrapper"> <!-- Start breadcrumb section --> <section class="breadcrumb__section breadcrumb__bg"> <div class="container"> <div class="row row-cols-1"> <div class="col"> <div class="breadcrumb__content"> <h2 class="breadcrumb__content--title text-white mb-10">Detail Produk</h2> <ul class="breadcrumb__content--menu d-flex"> <li class="breadcrumb__content--menu__items"><a class="text-white" href="/">Home</a></li> <li class="breadcrumb__content--menu__items"><a class="text-white" href="/product">Product</a></li> <li class="breadcrumb__content--menu__items"> <a class="text-white" href="/product"><?php echo e($category->name); ?></a> </li> <li class="breadcrumb__content--menu__items"><span class="text-white"><?php echo e($product->name); ?></span> </li> </ul> </div> </div> </div> </div> </section> <!-- End breadcrumb section --> <!-- Start product details section --> <section class="product__details--section section--padding"> <div class="container"> <div class="row row-cols-lg-2 row-cols-md-2"> <div class="col"> <div class="product__details--media position-relative"> <div class="product__media--preview swiper"> <div class="swiper-wrapper"> <?php $__currentLoopData = $productImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="swiper-slide"> <div class="product__media--preview__items"> <a class="product__media--preview__items--link glightbox" data-gallery="product-media-preview" href="<?php echo e(asset('assets/img/products/' . $image->image_hd)); ?>"><img class="product__media--preview__items--img" src="<?php echo e(asset('assets/img/products/' . $image->image_hd)); ?>" alt="product-media-img"></a> <div class="product__media--view__icon"> <a class="product__media--view__icon--link glightbox" href="<?php echo e(asset('assets/img/products/' . $image->image_hd)); ?>" data-gallery="product-media-preview"> <svg class="product__media--view__icon--svg" xmlns="http://www.w3.org/2000/svg" width="22.51" height="22.443" viewBox="0 0 512 512"> <path d="M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"></path> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M338.29 338.29L448 448"></path> </svg> <span class="visually-hidden">Media Gallery</span> </a> </div> <p><?php echo e($image->alt_text); ?></p> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <div class="product__media--nav swiper"> <div class="swiper-wrapper"> <?php $__currentLoopData = $productImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $imageNav): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="swiper-slide"> <div class="product__media--nav__items"> <img class="product__media--nav__items--img" src="<?php echo e(asset('assets/img/products/' . $imageNav->image_hd)); ?>" alt="product-nav-img"> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="swiper__nav--btn swiper-button-next"></div> <div class="swiper__nav--btn swiper-button-prev"></div> </div> <div id="openDialogUploadImg" data-bs-toggle="tooltip" data-bs-placement="top" title="Upload new product image"> <img id="new_product_image" src="<?php echo e(asset('assets/img/plus_icon.webp')); ?>" alt="product-nav-img"> </div> </div> </div> <!-- Detail Product --> <div class="col"> <!-- Type product --> <?php if(!$productTypes->isEmpty()): ?> <ul class="product__details--tab product__type d-flex mb-30"> <?php $__currentLoopData = $productTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <li class="product__details--tab__list <?php echo e(!is_null($selectedType) && $selectedType->name === $type->name ? 'active' : ''); ?>"> <a href="/product/<?php echo e($category->url); ?>/<?php echo e($product->url); ?>/<?php echo e($type->url); ?>"><?php echo e($type->name); ?></a> </li> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> <?php endif; ?> <!-- End type product --> <div class="product__details--info"> <h1 class="product__details--info__title mb-20 h2"><?php echo e($product->name); ?></h1> <p class="product__details--info__desc mb-20 cms-editable" data-storage="short_text"></p> <div class="product__variant"> <div class="product__variant--list mb-30"> <div class="product__details--info__meta"> <p class="product__details--info__meta--list"><strong>Brand:</strong> <span><?php echo e($product->brand->name); ?></span> </p> <p class="product__details--info__meta--list"><strong>Kategori:</strong> <span><?php echo e($product->category->name); ?></span> </p> <p class="product__details--info__meta--list"><strong>Tags:</strong> <span><?php echo e(implode(', ', $tags)); ?></span> </p> </div> </div> <div class="product__variant--list mb-30"> <?php $text_wa = 'Halo saya tertarik dengan produk ' .$product->name; $wa_text = $product['wa_text'] !== null ? $product['wa_text'] : $text_wa; ?> <a href="https://api.whatsapp.com/send?phone=6281313777570&text=<?php echo e(urlencode($wa_text)); ?>" target="_blank" class="button__konsultasi"><i class="fa fa-whatsapp" rel="noreferrer"></i> Konsultasi Gratis Via WhatsApp</a> </div> <div class="share-button-container"> <div class="quickview__social d-flex align-items-center justify-content-end mb-15"> <label class="quickview__social--title">Unduh Katalog</label> <ul class="quickview__social--wrapper mt-0 d-flex"> <li class="quickview__social--list"> <a target="_blank" rel="noreferrer" href="<?php echo e(!is_null($product->catalogue) ? '/uploads/' . $product->catalogue->pdf_catalogue : '/catalogue/' . $product->category->url); ?>"> <img class="logo-download" src="<?php echo e(asset('assets/img/download.png')); ?>" alt="logo download" width="30" height="30"> <span class="visually-hidden">Copy Link</span> </a> </li> </ul> </div> <div class="quickview__social d-flex align-items-center justify-content-end mb-15"> <label class="quickview__social--title">Bagikan via WhatsApp</label> <ul class="quickview__social--wrapper mt-0 d-flex"> <li class="quickview__social--list"> <a target="_blank" rel="noreferrer" href="https://api.whatsapp.com/send?text=<?php echo e(urlencode(url()->current())); ?>"> <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 48 48"> <defs> <mask id="ipSCopyLink0"> <g fill="none" stroke-width="4"> <path stroke="#fff" d="M12 9.927V7a3 3 0 0 1 3-3h26a3 3 0 0 1 3 3v26a3 3 0 0 1-3 3h-2.983" /> <rect width="34" height="34" x="4" y="10" fill="#fff" stroke="#fff" stroke-linejoin="round" rx="3" /> <path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="m18.44 23.11l5.292-5.51c1.451-1.451 3.837-1.42 5.328.072c1.491 1.491 1.523 3.877.072 5.328l-1.91 2.023m-13.756 3.724c-.51.51-1.565 1.53-1.565 1.53c-1.452 1.451-1.492 4.038 0 5.53c1.49 1.49 3.876 1.523 5.328.071l5.164-4.688" /> <path stroke="#000" stroke-linecap="round" stroke-linejoin="round" d="M18.663 28.328a3.863 3.863 0 0 1-1.131-2.473A3.665 3.665 0 0 1 18.592 23m3.729 2.861c1.491 1.491 1.523 3.877.072 5.329" /> </g> </mask> </defs> <path fill="#000060" d="M0 0h48v48H0z" mask="url(#ipSCopyLink0)" /> </svg> <span class="visually-hidden">Copy Link</span> </a> </li> </ul> </div> </div> </div> </div> </div> </div> </div> </section> <!-- End product details section --> <!-- Start product details tab section --> <section class="product__details--tab__section section--padding"> <div class="container"> <div class="row row-cols-1"> <div class="col"> <ul class="product__details--tab d-flex mb-30"> <li class="product__details--tab__list active" data-toggle="tab" data-target="#details-product-info"> Spesifikasi Produk </li> <li class="product__details--tab__list" data-toggle="tab" data-target="#details-additional-info"> Tata Cara Pemasangan </li> </ul> <div class="product__details--tab__inner border-radius-10"> <div class="tab_content"> <!-- Tab Content: Product Info --> <div id="details-product-info" class="tab_pane active show"> <div class="product__tab--conten"> <div class="product__tab--content"> <div class="product__tab--content__step mb-30"> <h4 class="product__tab--content__title mb-10"><?php echo e($product->name); ?></h4> <p class="product__tab--content__desc cms-editable" data-storage="product_info"></p> </div> </div> </div> </div> <!-- Tab Content: Additional Info --> <div id="details-additional-info" class="tab_pane"> <div class="product__tab--conten"> <div class="product__tab--content"> <div class="product__tab--content__step"> <h4 class="product__tab--content__title mb-10">More Details</h4> <ul> <p class="product__tab--content__desc cms-editable" data-storage="additional_info"></p> </ul> </div> </div> </div> </div> <!-- Tab Content: Download Catalogue --> <div id="details-catalogue" class="tab_pane"> <h4 class="text-center">Download katalog produk melalui tautan berikut : </h4> <div class="text-center mt-4"> <a href="<?php echo e(!is_null($product->catalogue) ? '/uploads/' . $product->catalogue->pdf_catalogue : '/catalogue/' . $product->category->url); ?>" target="_blank" class="btn-catalogue fs-2">Download Catalogue</a> </div> </div> </div> </div> </div> </div> </div> </section> <!-- End product details tab section --> <!-- Start product section --> <section class="product__section section--padding"> <div class="container"> <div class="section__heading text-center mb-40"> <h2 class="section__heading--maintitle">Produk Terkait</h2> </div> <div class="product__section--inner product__swiper--column4 swiper"> <div class="swiper-wrapper"> <?php $__currentLoopData = $relatedProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $recomm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="swiper-slide"> <div class="product__items "> <div class="product__items--thumbnail"> <a class="product__items--link" href="/product/<?php echo e($recomm->category->url); ?>/<?php echo e($recomm->url); ?>"> <img class="product__items--img product__primary--img" src="<?php echo e(asset('assets/img/products/' . $recomm->coverImage)); ?>" alt="product-img"> <img class="product__items--img product__secondary--img" src="<?php echo e(asset('assets/img/products/' . $recomm->coverImage)); ?>" alt="product-img"> </a> </div> <div class="product__items--content text-center"> <h3 class="product__items--content__title h4"> <a href="/product/<?php echo e($recomm->category->url); ?>/<?php echo e($recomm->url); ?>"><?php echo e($recomm->name); ?></a> </h3> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="swiper__nav--btn swiper-button-next"></div> <div class="swiper__nav--btn swiper-button-prev"></div> </div> </div> </section> <!-- End product section --> </main> <div class="modal" id="dialogUploadImg"> <div class="popup__main--wrapper"> <div class="popup__header__input"> <h4 class="inline-margin-right-auto">Upload Image</h4> <button class="close-modal popup__close--btn" aria-label="close modal" data-close>✕ </button> </div> <div class="popup__info__input"> <form id="form-tambah-image" method="POST"> <input class="form-input visually-hidden" type="text" id="product_id" name="product_id" value="<?php echo e($product->id); ?>" required> <div class="form-group"> <label for="image_hd">Image HD:<span class="contact__form--label__star">*</span></label> <input class="form-input mb-0" type="file" id="image_hd" name="image_hd" accept="image/*" required> <small class="text-primary">Max. Size 2 MB</small> </div> <div class="form-group"> <label for="image_low">Image Low:</label> <input class="form-input" type="file" id="image_low" name="image_low" accept="image/*"> </div> <div class="form-group"> <label for="image_hd_mobile">Image HD Mobile:<span class="contact__form--label__star">*</span></label> <input class="form-input mb-0" type="file" id="image_hd_mobile" name="image_hd_mobile" accept="image/*"> <small class="text-primary">Max. Size 2 MB</small> </div> <div class="form-group"> <label for="image_low_mobile">Image Low Mobile:</label> <input class="form-input" type="file" id="image_low_mobile" name="image_low_mobile" accept="image/*"> </div> <div class="form-group"> <label for="alt">Alt Text:<span class="contact__form--label__star">*</span></label> <input class="form-input" type="text" id="alt_text" name="alt_text" required> </div> <button type="submit" class="primary__btn">Submit</button> </form> </div> </div> </div> <!-- Start footer section --> <?php echo $__env->make('components.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <!-- End footer section --> <!-- Scroll top bar --> <button id="scroll__top"> <svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"> <path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 244l144-144 144 144M256 120v292" /> </svg> </button> <!-- Floating WhatsApp --> <?php echo $__env->make('components.floating-whatsapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <!-- All Script JS Plugins here --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script nonce="<?php echo e($nonce); ?>" src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.js"></script> <script src="<?php echo e(asset('assets/js/vendor/popper.js')); ?>" defer="defer"></script> <script src="<?php echo e(asset('assets/js/vendor/bootstrap.min.js')); ?>" defer="defer"></script> <script src="<?php echo e(asset('assets/js/plugins/swiper-bundle.min.js')); ?>" defer="defer"></script> <script src="<?php echo e(asset('assets/js/plugins/glightbox.min.js')); ?>" defer="defer"></script> <!-- Customscript js --> <script src="<?php echo e(asset('assets/js/script.min.js')); ?>" defer="defer"></script> <script nonce="<?php echo e($nonce); ?>"> $(document).ready(function() { $('.product__details--tab__list').on('click', function() { var targetTab = $(this).data('target'); $('.tab_pane').removeClass('active'); $(targetTab).addClass('active'); }); }); </script> <!-- Modal Upload Image --> <script nonce="<?php echo e($nonce); ?>"> $(document).ready(function() { $('#openDialogUploadImg').on('click', function() { $('#dialogUploadImg').addClass('is-visible'); }); }); $(document).ready(function() { $('#form-tambah-image').submit(function(e) { e.preventDefault(); var formData = new FormData(this); $.ajax({ url: '/tambah-master-image', type: 'POST', data: formData, processData: false, contentType: false, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(response) { console.log(response.message); if (response.success) { handleSuccess(); } else { handleError(response.message); } }, error: function(xhr) { console.error('AJAX Error:', xhr); } }); }); function handleSuccess() { $('#dialogUploadImg').removeClass('is-visible'); Swal.fire({ text: 'Gambar berhasil ditambahkan.', icon: 'success', showConfirmButton: false, }); location.reload(); } function handleError(errorMessage) { Swal.fire({ text: errorMessage, icon: 'error' }); } }); </script> <script nonce="<?php echo e($nonce); ?>" type="module"> function convertDataToHtml(blocks) { var convertedHtml = ""; blocks.map(block => { switch (block.type) { case "header": convertedHtml += `<h${block.data.level}>${block.data.text}</h${block.data.level}>`; break; case "embded": convertedHtml += `<div><iframe width="560" height="315" src="${block.data.embed}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></div>`; break; case "paragraph": convertedHtml += `<p>${block.data.text}</p>`; break; case "delimiter": convertedHtml += "<hr />"; break; case "image": convertedHtml += `<img class="img-fluid" src="${block.data.file.url}" title="${block.data.caption}" /><br /><em>${block.data.caption}</em>`; break; case "imageupload": convertedHtml += `<img class="inline-width-100" src="${block.data.url}" />`; break; case "list": if (block.data.style = 'unordered') { convertedHtml += "<ul>"; block.data.items.forEach(function(li) { convertedHtml += `<li>- ${li.content}</li>`; }); convertedHtml += "</ul>"; } else { convertedHtml += "<ol>"; block.data.items.forEach(function(li) { convertedHtml += `<li>${li.content}</li>`; }); convertedHtml += "</ol>"; } break; case "table": convertedHtml += '<div class="table-responsive"><table class="table table-bordered">'; block.data.content.forEach(function(tr) { convertedHtml += `<tr>`; tr.forEach(function(td) { convertedHtml += `<td>${td}</td>`; }); convertedHtml += `</tr>`; }); convertedHtml += "</table></div>"; break; default: console.log("Unknown block type", block.type); break; } }); return convertedHtml; } //data-storage const ImageTool = window.ImageTool; let editor = []; let editorname = []; var counteditor = 1; function set_editor(id_of_element) { jQuery.ajax({ url: '/cms/get_data', type: 'POST', dataType: 'json', data: { id: <?php echo $product->id; ?>, column: id_of_element, table: 'product', }, success: function(data, textStatus, xhr) { console.log('Function Exec:', id_of_element); editorname[counteditor] = id_of_element; editor[counteditor] = new EditorJS({ holder: id_of_element, tools: { // simpleimage: SimpleImage, header: Header, // quote: Quote, // simage: SimpleImage, list: { class: NestedList, inlineToolbar: true, config: { defaultStyle: 'unordered' }, }, // checklist: { // class: Checklist, // inlineToolbar: true, // }, embed: { class: Embed, config: { services: { youtube: true, coub: true } } }, table: Table, delimiter: Delimiter, // raw: RawTool, imageupload: ImageUpload, }, data: data, }); counteditor += 1; return true; }, error: function(xhr, textStatus, errorThrown) { //called when there is an error } }); } $.each($('.cms-editable'), function(index) { console.log('Package: ', $(this).attr('data-storage')); $(this).attr('id', $(this).attr('data-storage')); if (set_editor($(this).attr('data-storage')) == true) { console.log('true'); } }); function doWork(holder, outputData, publish) { // var htmlData = '#' + editorname[i]; let hold = holder; console.log('Article data: ', JSON.stringify(outputData)); // console.log('Html data: ', htmlData); console.log('Html data: ', convertDataToHtml(outputData.blocks)); // AJAX jQuery.ajax({ url: '/cms/set_data', type: 'POST', dataType: 'json', data: { id: <?php echo $product->id; ?>, column: hold, table: 'product', value: JSON.stringify(outputData), html: convertDataToHtml(outputData.blocks), publish: publish, }, success: function(data, textStatus, xhr) { console.log('Function Exec:', holder); // editorname[counteditor] = id_of_element; }, error: function(xhr, textStatus, errorThrown) { //called when there is an error } }); }; $('#cms_save').click(function(e) { console.log(editor); for (var i = 1; i < counteditor; i++) { console.log('holder : ', editor[i]['configuration']['holder']); let holder = editor[i]['configuration']['holder']; editor[i].save().then((outputData) => doWork(holder, outputData, false)).catch((error) => { console.log('Saving failed: ', error); handleError(error); }); console.log("saved"); handleSuccess(); } }); $('#cms_publish').click(function(e) { console.log(editor); for (var i = 1; i < counteditor; i++) { console.log('holder : ', editor[i]['configuration']['holder']); let holder = editor[i]['configuration']['holder']; editor[i].save().then((outputData) => doWork(holder, outputData, true)).catch((error) => { console.log('Saving failed: ', error); handleError(error); }); console.log("saved"); handleSuccess(); } }); function handleSuccess() { Swal.fire({ text: 'Perubahan berhasil disimpan.', icon: 'success', showConfirmButton: false, }); location.reload(); } function handleError(errorMessage) { Swal.fire({ text: errorMessage, icon: 'error' }); } </script> </body> </html> <?php /**PATH /var/www/html/gnet_live/resources/views/product-details-cms.blade.php ENDPATH**/ ?>