whoami7 - Manager
:
/
home
/
n170823s
/
.trash
/
storage
/
framework
/
views
/
Upload File:
files >> /home/n170823s/.trash/storage/framework/views/b990bcaaaaf3fe05faa2e2d7b52441f5.php
<?php $__env->startSection('content'); ?> <div class="tf-product-list-page-title"> <div class="container-full"> <div class="row"> <div class="col-12"> <div class="heading text-center"> <p>Product Detail</p> <p class="text-center text-1 text_black-2 mt_5">Water Collection</p> </div> </div> </div> </div> </div> <section class="flat-spacing-4 pt_50"> <div class="tf-main-product section-image-zoom"> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="tf-product-media-wrap sticky-top"> <div class="thumbs-slider"> <div dir="ltr" class="swiper tf-product-media-thumbs other-image-zoom" data-direction="vertical"> <div class="swiper-wrapper stagger-wrap"> <?php // Get all variant images and product images $allImages = []; // Add product main images if ($product->images) { $productImages = json_decode($product->images, true); if (is_array($productImages)) { $allImages = array_merge($allImages, $productImages); } } // Add variant images foreach ($product->variants as $variant) { if ($variant->images) { $variantImages = json_decode($variant->images, true); if (is_array($variantImages)) { $allImages = array_merge($allImages, $variantImages); } } } // Remove duplicates and ensure we have images $allImages = array_unique($allImages); if (empty($allImages)) { $allImages = ['images/no-image.png']; } ?> <?php $__currentLoopData = $allImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="swiper-slide stagger-item" data-color="beige"> <div class="item"> <img class="lazyload" data-src="<?php echo e(asset($image)); ?>" src="<?php echo e(asset($image)); ?>" alt="<?php echo e($product->name); ?>"> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <div dir="ltr" class="swiper tf-product-media-main" id="gallery-swiper-started"> <div class="swiper-wrapper"> <?php $__currentLoopData = $allImages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="swiper-slide" data-color="beige"> <a href="<?php echo e(asset($image)); ?>" target="_blank" class="item" data-pswp-width="770px" data-pswp-height="1075px"> <img class="tf-image-zoom lazyload" data-zoom="<?php echo e(asset($image)); ?>" data-src="<?php echo e(asset($image)); ?>" src="<?php echo e(asset($image)); ?>" alt="<?php echo e($product->name); ?>"> </a> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <div class="swiper-button-next button-style-arrow thumbs-next"></div> <div class="swiper-button-prev button-style-arrow thumbs-prev"></div> </div> </div> </div> </div> <div class="col-md-6"> <div class="tf-product-info-wrap position-relative"> <div class="tf-zoom-main"></div> <div class="tf-product-info-list other-image-zoom"> <div class="tf-product-info-title"> <h5><?php echo e($product->name); ?></h5> </div> <?php if($product->variants->where('is_default', 1)->first() || $product->variants->first()): ?> <?php $defaultVariant = $product->variants->where('is_default', 1)->first() ?? $product->variants->first(); $originalPrice = $defaultVariant->price * 1.3; $discountPercent = round( (($originalPrice - $defaultVariant->price) / $originalPrice) * 100, ); ?> <div class="tf-product-info-badges"> <div class="badges">Best seller</div> </div> <div class="tf-product-info-price"> <div class="price-on-sale">$<?php echo e(number_format($defaultVariant->price, 2)); ?></div> <div class="compare-at-price">$<?php echo e(number_format($originalPrice, 2)); ?></div> <div class="badges-on-sale"><span><?php echo e($discountPercent); ?></span>% OFF</div> </div> <?php endif; ?> <?php if($product->has_variants && $product->variants->count() > 0): ?> <div class="variant-picker-item"> <div class="variant-picker-values"> <?php $__currentLoopData = $product->variants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $variant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <input type="radio" name="size1" id="size-<?php echo e($variant->id); ?>" <?php echo e($index === 0 ? 'checked' : ''); ?> data-price="<?php echo e($variant->price); ?>"> <label class="variant-box" for="size-<?php echo e($variant->id); ?>"> <div class="variant-title"><?php echo e($variant->value); ?></div> <div class="variant-price">£<?php echo e(number_format($variant->price, 2)); ?> </div> </label> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> <?php endif; ?> <div class="tf-product-info-quantity"> <div class="quantity-title fw-6">Quantity</div> <div class="wg-quantity"> <span class="btn-quantity btn-decrease">-</span> <input type="text" class="quantity-product" name="number" value="1"> <span class="btn-quantity btn-increase">+</span> </div> </div> <div class="tf-product-info-buy-button"> <form class=""> <a href="javascript:void(0);" class="tf-btn btn-fill justify-content-center fw-6 fs-16 flex-grow-1 animate-hover-btn btn-add-to-cart"><span>Add to cart - </span><span class="tf-qty-price total-price">$<?php echo e(number_format($defaultVariant->price ?? 0, 2)); ?></span></a> <a href="javascript:void(0);" class="tf-product-btn-wishlist hover-tooltip box-icon bg_white wishlist btn-icon-action"> <span class="icon icon-heart"></span> <span class="tooltip">Add to Wishlist</span> <span class="icon icon-delete"></span> </a> <div class="w-100"> <a href="#" class="btns-full">Buy with <img src="<?php echo e(asset('images/payments/paypal.png')); ?>" alt=""></a> <a href="#" class="payment-more-option">More payment options</a> </div> </form> </div> <div class="tf-product-info-extra-link"> <a href="#ask_question" data-bs-toggle="modal" class="tf-product-extra-icon"> <div class="icon"> <i class="icon-question"></i> </div> <div class="text fw-6">Ask a question</div> </a> <a href="#delivery_return" data-bs-toggle="modal" class="tf-product-extra-icon"> <div class="icon"> <svg class="d-inline-block" xmlns="http://www.w3.org/2000/svg" width="22" height="18" viewBox="0 0 22 18" fill="currentColor"> <path d="M21.7872 10.4724C21.7872 9.73685 21.5432 9.00864 21.1002 8.4217L18.7221 5.27043C18.2421 4.63481 17.4804 4.25532 16.684 4.25532H14.9787V2.54885C14.9787 1.14111 13.8334 0 12.4255 0H9.95745V1.69779H12.4255C12.8948 1.69779 13.2766 2.07962 13.2766 2.54885V14.5957H8.15145C7.80021 13.6052 6.85421 12.8936 5.74468 12.8936C4.63515 12.8936 3.68915 13.6052 3.33792 14.5957H2.55319C2.08396 14.5957 1.70213 14.2139 1.70213 13.7447V2.54885C1.70213 2.07962 2.08396 1.69779 2.55319 1.69779H9.95745V0H2.55319C1.14528 0 0 1.14111 0 2.54885V13.7447C0 15.1526 1.14528 16.2979 2.55319 16.2979H3.33792C3.68915 17.2884 4.63515 18 5.74468 18C6.85421 18 7.80021 17.2884 8.15145 16.2979H13.423C13.7742 17.2884 14.7202 18 15.8297 18C16.9393 18 17.8853 17.2884 18.2365 16.2979H21.7872V10.4724ZM16.684 5.95745C16.9494 5.95745 17.2034 6.08396 17.3634 6.29574L19.5166 9.14894H14.9787V5.95745H16.684ZM5.74468 16.2979C5.27545 16.2979 4.89362 15.916 4.89362 15.4468C4.89362 14.9776 5.27545 14.5957 5.74468 14.5957C6.21392 14.5957 6.59575 14.9776 6.59575 15.4468C6.59575 15.916 6.21392 16.2979 5.74468 16.2979ZM15.8298 16.2979C15.3606 16.2979 14.9787 15.916 14.9787 15.4468C14.9787 14.9776 15.3606 14.5957 15.8298 14.5957C16.299 14.5957 16.6809 14.9776 16.6809 15.4468C16.6809 15.916 16.299 16.2979 15.8298 16.2979ZM18.2366 14.5957C17.8853 13.6052 16.9393 12.8936 15.8298 12.8936C15.5398 12.8935 15.252 12.943 14.9787 13.04V10.8511H20.0851V14.5957H18.2366Z"> </path> </svg> </div> <div class="text fw-6">Delivery & Return</div> </a> <a href="#share_social" data-bs-toggle="modal" class="tf-product-extra-icon"> <div class="icon"> <i class="icon-share"></i> </div> <div class="text fw-6">Share</div> </a> </div> <div class="tf-product-info-delivery-return"> <div class="row"> <div class="col-xl-6 col-12"> <div class="tf-product-delivery"> <div class="icon"> <i class="icon-delivery-time"></i> </div> <p>Estimate delivery times: <span class="fw-7">12-26 days</span> (International), <span class="fw-7">3-6 days</span> (United States). </p> </div> </div> <div class="col-xl-6 col-12"> <div class="tf-product-delivery mb-0"> <div class="icon"> <i class="icon-return-order"></i> </div> <p>Return within <span class="fw-7">30 days</span> of purchase. Duties & taxes are non-refundable.</p> </div> </div> </div> </div> <div class="tf-product-info-trust-seal"> <div class="tf-product-trust-mess"> <i class="icon-safe"></i> <p class="fw-6">Guarantee Safe <br> Checkout</p> </div> <div class="tf-payment"> <img src="<?php echo e(asset('images/payments/visa.png')); ?>" alt=""> <img src="<?php echo e(asset('images/payments/img-1.png')); ?>" alt=""> <img src="<?php echo e(asset('images/payments/img-2.png')); ?>" alt=""> <img src="<?php echo e(asset('images/payments/img-3.png')); ?>" alt=""> <img src="<?php echo e(asset('images/payments/img-4.png')); ?>" alt=""> </div> </div> </div> </div> </div> </div> </div> </div> </section> <section class="flat-spacing-17 pt_0"> <div class="container"> <div class="row"> <div class="col-12"> <div class="widget-tabs style-has-border"> <ul class="widget-menu-tab"> <li class="item-title active"> <span class="inner">Description</span> </li> <li class="item-title"> <span class="inner">Review</span> </li> <li class="item-title"> <span class="inner">Shipping</span> </li> <li class="item-title"> <span class="inner">Return Policies</span> </li> </ul> <div class="widget-content-tab"> <div class="widget-content-inner active"> <div class=""> <p class="mb_30"> <?php $description = $product->description; if (empty($description) && $product->variants->isNotEmpty()) { $description = $product->variants->first()->description ?? 'No description available.'; } ?> <?php echo $description; ?> </p> </div> </div> <div class="widget-content-inner"> <div class="tab-reviews write-cancel-review-wrap"> <div class="tab-reviews-heading"> <div class="top"> <div class="text-center"> <h1 class="number fw-6">4.0</h1> <div class="list-star"> <i class="icon icon-star"></i> <i class="icon icon-star"></i> <i class="icon icon-star"></i> <i class="icon icon-star"></i> <i class="icon icon-star"></i> </div> <p>(101 Ratings)</p> </div> <div class="rating-score"> <div class="item"> <div class="number-1 text-caption-1">5</div> <i class="icon icon-star"></i> <div class="line-bg"> <div style="width: 94.67%;"></div> </div> <div class="number-2 text-caption-1">59</div> </div> <div class="item"> <div class="number-1 text-caption-1">4</div> <i class="icon icon-star"></i> <div class="line-bg"> <div style="width: 60%;"></div> </div> <div class="number-2 text-caption-1">46</div> </div> <div class="item"> <div class="number-1 text-caption-1">3</div> <i class="icon icon-star"></i> <div class="line-bg"> <div style="width: 0%;"></div> </div> <div class="number-2 text-caption-1">0</div> </div> <div class="item"> <div class="number-1 text-caption-1">2</div> <i class="icon icon-star"></i> <div class="line-bg"> <div style="width: 0%;"></div> </div> <div class="number-2 text-caption-1">0</div> </div> <div class="item"> <div class="number-1 text-caption-1">1</div> <i class="icon icon-star"></i> <div class="line-bg"> <div style="width: 0%;"></div> </div> <div class="number-2 text-caption-1">0</div> </div> </div> </div> <div> <div class="tf-btn btn-outline-dark fw-6 btn-comment-review btn-cancel-review"> Cancel Review</div> <div class="tf-btn btn-outline-dark fw-6 btn-comment-review btn-write-review"> Write a review</div> </div> </div> <div class="reply-comment cancel-review-wrap"> <div class="d-flex mb_24 gap-20 align-items-center justify-content-between flex-wrap"> <h5 class="">01 Comments</h5> <div class="d-flex align-items-center gap-12"> <div class="text-caption-1">Sort by:</div> <div class="tf-dropdown-sort" data-bs-toggle="dropdown"> <div class="btn-select"> <span class="text-sort-value">Most Recent</span> <span class="icon icon-arrow-down"></span> </div> <div class="dropdown-menu"> <div class="select-item active"> <span class="text-value-item">Most Recent</span> </div> <div class="select-item"> <span class="text-value-item">Oldest</span> </div> <div class="select-item"> <span class="text-value-item">Most Popular</span> </div> </div> </div> </div> </div> <div class="reply-comment-wrap"> <div class="reply-comment-item"> <div class="user"> <div class="image"> <img src="images/water.jpg" alt=""> </div> <div> <h6> <a href="#" class="link">Superb quality apparel that exceeds expectations</a> </h6> <div class="day text_black-2">1 days ago</div> </div> </div> <p class="text_black-2">Great theme - we were looking for a theme with lots of built in features and flexibility and this was perfect. We expected to need to employ a developer to add a few finishing touches. But we actually managed to do everything ourselves. We did have one small query and the support given was swift and helpful.</p> </div> <div class="reply-comment-item type-reply"> <div class="user"> <div class="image"> <img src="images/water.jpg" alt=""> </div> <div> <h6> <a href="#" class="link">Reply from John</a> </h6> <div class="day text_black-2">1 days ago</div> </div> </div> <p class="text_black-2">We love to hear it! Part of what we love most about John is how much it empowers store owners like yourself to build a beautiful website without having to hire a developer : Thank you for this fantastic review!</p> </div> </div> </div> <form class="form-write-review write-review-wrap"> <div class="heading"> <h5>Write a review:</h5> <div class="list-rating-check"> <input type="radio" id="star5" name="rate" value="5" /> <label for="star5" title="text"></label> <input type="radio" id="star4" name="rate" value="4" /> <label for="star4" title="text"></label> <input type="radio" id="star3" name="rate" value="3" /> <label for="star3" title="text"></label> <input type="radio" id="star2" name="rate" value="2" /> <label for="star2" title="text"></label> <input type="radio" id="star1" name="rate" value="1" /> <label for="star1" title="text"></label> </div> </div> <div class="form-content"> <fieldset class="box-field"> <label class="label">Review Title</label> <input type="text" placeholder="Give your review a title" name="text" tabindex="2" value="" aria-required="true" required=""> </fieldset> <fieldset class="box-field"> <label class="label">Review</label> <textarea rows="4" placeholder="Write your comment here" tabindex="2" aria-required="true" required=""></textarea> </fieldset> <div class="box-field group-2"> <fieldset> <input type="text" placeholder="You Name (Public)" name="text" tabindex="2" value="" aria-required="true" required=""> </fieldset> <fieldset> <input type="email" placeholder="Your email (private)" name="email" tabindex="2" value="" aria-required="true" required=""> </fieldset> </div> <div class="box-check"> <input type="checkbox" name="availability" class="tf-check" id="check1"> <label class="text_black-2" for="check1">Save my name, email, and website in this browser for the next time I comment.</label> </div> </div> <div class="button-submit"> <button class="tf-btn btn-fill animate-hover-btn" type="submit">Submit Reviews</button> </div> </form> </div> </div> <div class="widget-content-inner"> <div class="tf-page-privacy-policy"> <div class="title">The Company Private Limited Policy</div> <p>The Company Private Limited and each of their respective subsidiary, parent and affiliated companies is deemed to operate this Website recognizes that you care how information about you is used and shared. We have created this Privacy Policy to inform you what information we collect on the Website, how we use your information and the choices you have about the way your information is collected and used. Please read this Privacy Policy carefully. Your use of the Website indicates that you have read and accepted our privacy practices, as outlined in this Privacy Policy.</p> <p>Please be advised that the practices described in this Privacy Policy apply to information gathered by us or our subsidiaries, affiliates or agents: (i) through this Website, (ii) where applicable, through our Customer Service Department in connection with this Website, (iii) through information provided to us in our free standing retail stores, and (iv) through information provided to us in conjunction with marketing promotions and sweepstakes.</p> <p>We are not responsible for the content or privacy practices on any websites. </p> <p>We reserve the right, in our sole discretion, to modify, update, add to, discontinue, remove or otherwise change any portion of this Privacy Policy, in whole or in part, at any time. When we amend this Privacy Policy, we will revise the “last updated” date located at the top of this Privacy Policy.</p> <p>If you provide information to us or access or use the Website in any way after this Privacy Policy has been changed, you will be deemed to have unconditionally consented and agreed to such changes. The most current version of this Privacy Policy will be available on the Website and will supersede all previous versions of this Privacy Policy.</p> <p>If you have any questions regarding this Privacy Policy, you should contact our Customer Service Department by email at marketing@company.com</p> </div> </div> <div class="widget-content-inner"> <div class="tf-page-privacy-policy"> <p>Not Available</p> </div> </div> </div> </div> </div> </div> </div> </section> <section class="flat-spacing-1 pt_0"> <div class="container"> <div class="flat-title wow fadeInUp gap-1" data-wow-delay="0s"> <h4 class="title">People Also Like</h4> </div> <div class="hover-sw-nav hover-sw-3"> <div dir="ltr" class="swiper tf-sw-product-sell wrap-sw-over swiper-horizontal" data-preview="4" data-tablet="3" data-mobile="2" data-space-lg="30" data-space-md="15" data-pagination="2" data-pagination-md="3" data-pagination-lg="3"> <div class="swiper-wrapper" aria-live="polite"> <?php $__empty_1 = true; $__currentLoopData = $relatedProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $related): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <?php $relatedImages = !empty($related->images) ? json_decode($related->images, true) : []; $mainImage = $relatedImages[0] ?? 'placeholder.jpg'; $hoverImage = $relatedImages[1] ?? $mainImage; ?> <div class="swiper-slide" role="group"> <div class="card-product"> <div class="card-product-wrapper"> <a href="<?php echo e(route('product.detail', $related->slug)); ?>" class="product-img"> <img class="img-product" src="<?php echo e(asset($mainImage)); ?>" alt="<?php echo e($related->name); ?>"> <img class="img-hover" src="<?php echo e(asset($hoverImage)); ?>" alt="<?php echo e($related->name); ?>"> </a> <div class="list-product-btn absolute-2"> <a href="#" data-bs-toggle="modal" class="box-icon bg_white quick-add tf-btn-loading"> <span class="icon icon-bag"></span> <span class="tooltip">Add to cart</span> </a> <a href="javascript:void(0);" class="box-icon bg_white wishlist btn-icon-action"> <span class="icon icon-heart"></span> <span class="tooltip">Add to Wishlist</span> <span class="icon icon-delete"></span> </a> <a href="#" data-bs-toggle="modal" class="box-icon bg_white quickview tf-btn-loading"> <span class="icon icon-view"></span> <span class="tooltip">Quick View</span> </a> </div> </div> <div class="card-product-info"> <a href="<?php echo e(route('product.detail', $related->slug)); ?>" class="title link"><?php echo e($related->name); ?></a> <p><?php echo e(Str::limit($related->description, 60)); ?></p> <?php $variant = $related->variants->where('is_default', 1)->first() ?? $related->variants->first(); $price = $variant->price ?? 0; $oldPrice = $variant ? $variant->price * 1.3 : null; // Optional: 30% higher as old price ?> <div class="price"> <?php if($oldPrice): ?> <span class="old-price">£<?php echo e(number_format($oldPrice, 2)); ?></span> <?php endif; ?> <span class="new-price">£<?php echo e(number_format($price, 2)); ?></span> </div> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <p>No related products found.</p> <?php endif; ?> </div> <div class="nav-sw nav-next-slider nav-next-product box-icon w_46 round" tabindex="0" role="button"> <span class="icon icon-arrow-left"></span> </div> <div class="nav-sw nav-prev-slider nav-prev-product box-icon w_46 round" tabindex="0" role="button"> <span class="icon icon-arrow-right"></span> </div> </div> </div> </div> </section> <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> document.addEventListener('DOMContentLoaded', function() { // Variant selection functionality const variantRadios = document.querySelectorAll('input[name="size1"]'); const quantityInput = document.querySelector('.quantity-product'); const totalPriceElement = document.querySelector('.total-price'); const addToCartBtn = document.querySelector('.btn-add-to-cart'); let currentPrice = <?php echo e($defaultVariant->price ?? 0); ?>; let currentVariantId = <?php echo e($defaultVariant->id ?? 0); ?>; let currentProductId = <?php echo e($product->id); ?>; function formatMoney(number) { return number.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 }); } function updateTotalPrice() { const quantity = parseInt(quantityInput.value) || 1; const total = currentPrice * quantity; totalPriceElement.textContent = '$' + formatMoney(total); } // Variant selection variantRadios.forEach(radio => { radio.addEventListener('change', function() { if (this.checked) { currentPrice = parseFloat(this.dataset.price) || 0; currentVariantId = this.id.replace('size-', ''); updateTotalPrice(); } }); }); // Quantity buttons document.querySelector('.btn-increase').addEventListener('click', () => { quantityInput.value = parseInt(quantityInput.value) + 1; updateTotalPrice(); }); document.querySelector('.btn-decrease').addEventListener('click', () => { if (parseInt(quantityInput.value) > 1) { quantityInput.value = parseInt(quantityInput.value) - 1; updateTotalPrice(); } }); quantityInput.addEventListener('input', () => { if (!quantityInput.value || quantityInput.value < 1) { quantityInput.value = 1; } updateTotalPrice(); }); // Add to cart functionality // addToCartBtn.addEventListener('click', function(e) { // e.preventDefault(); // let quantity = parseInt(quantityInput.value) || 1; // // Show loading state // const originalText = addToCartBtn.innerHTML; // addToCartBtn.innerHTML = '<span>Adding...</span>'; // addToCartBtn.disabled = true; // $.ajax({ // url: "<?php echo e(route('cart.add')); ?>", // method: "POST", // data: { // product_id: currentProductId, // variant_id: currentVariantId, // quantity: quantity, // _token: "<?php echo e(csrf_token()); ?>" // }, // success: function(response) { // // Reset button state // addToCartBtn.innerHTML = originalText; // addToCartBtn.disabled = false; // if (response.success) { // updateMiniCart(response); // if (typeof showToast === 'function') { // showToast(response.message, "success"); // } else { // alert(response.message); // } // } else { // if (typeof showToast === 'function') { // showToast(response.message, "error"); // } else { // alert('Error: ' + response.message); // } // } // }, // error: function(xhr, status, error) { // // Reset button state // addToCartBtn.innerHTML = originalText; // addToCartBtn.disabled = false; // console.error('Error adding to cart:', error); // if (typeof showToast === 'function') { // showToast("Error adding product to cart", "error"); // } else { // alert('Error adding product to cart'); // } // } // }); // }); addToCartBtn.addEventListener('click', function(e) { e.preventDefault(); let quantity = parseInt(quantityInput.value) || 1; // Loading state const originalText = addToCartBtn.innerHTML; addToCartBtn.innerHTML = '<span>Adding...</span>'; addToCartBtn.disabled = true; $.ajax({ url: "<?php echo e(route('cart.add')); ?>", method: "POST", data: { product_id: currentProductId, variant_id: currentVariantId, quantity: quantity, _token: "<?php echo e(csrf_token()); ?>" }, success: function(response) { addToCartBtn.innerHTML = originalText; addToCartBtn.disabled = false; if (response.success) { // Use same mini-cart update function as first working script updateMiniCart(response); // Toast if (typeof showToast === 'function') { showToast(response.message, "success"); } else { alert(response.message); } } else { if (typeof showToast === 'function') { showToast(response.message, "error"); } else { alert('Error: ' + response.message); } } }, error: function(xhr, status, error) { addToCartBtn.innerHTML = originalText; addToCartBtn.disabled = false; console.error('Error adding to cart:', error); if (typeof showToast === 'function') { showToast("Error adding product to cart", "error"); } else { alert('Error adding product to cart'); } } }); }); // Initialize updateTotalPrice(); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layout.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\amor\resources\views/product-detail.blade.php ENDPATH**/ ?>
Copyright ©2021 || Defacer Indonesia