Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/storage/framework/views/adc7617b50c0e56e2c0468e4f53323bf.php
Назад
<?php $__env->startSection('title', 'Cart Summary'); ?> <?php $__env->startPush('front-styles'); ?> <style> .cart-school-directories p { margin-bottom: 0; font-size: 13px; font-weight: 400; color: #535353; font-family: "Roboto-Regular", serif; } </style> <?php $__env->stopPush(); ?> <?php $__env->startSection('content'); ?> <?php $finalTotal = 0; ?> <section class="cart-section"> <div class="container"> <h2>Cart</h2> <div class="row"> <div class="col-md-12 col-lg-12 col-xl-12 col-sm-12"> <div class="cart-left"> <?php $__currentLoopData = $siblings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sibling): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $totalPrice = $childTotal = 0; ?> <div class="cart-div child-card" data-user="<?php echo e($sibling['url_name']); ?>" data-name="<?php echo e($sibling['full_name']); ?>"> <div class='divi-hed-delete'> <div class="card-div-heading del-divi"> <h3 class= 'm-0'><?php echo e(ucfirst($sibling['full_name'])); ?></h3> <button type="button" class='del-btn' onclick="deleteSibling()"> <img src="<?php echo e(asset('assets/front/images/del-carte.png')); ?>" alt="N/A" class="img-fluid"> </button> </div> </div> <?php if(count($sibling['items']) > 0): ?> <div class="cart-div-items-main"> <?php $__currentLoopData = $sibling['items']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="cart-div-items"> <div class="cart-div-items-img"> <img src="<?php echo e($item['img']); ?>" alt="image"> <div class="items-img-text"> <h5><?php echo e($item['id']); ?></h5> <p><?php echo e($item['itemName']); ?></p> </div> </div> <span>+$<?php echo e($item['price']); ?></span> </div> <?php $totalPrice += $item['price']; $childTotal += $item['price']; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> <?php endif; ?> <input type="hidden" class="child_items_total" value="<?php echo e($childTotal); ?>"> <?php if(session('user_cart.hot_lunch_half') == 'first_half'): ?> <input type="hidden" class="child_class_fund" value="<?php echo e($siteSettings['class_fund']); ?>"> <div class="cart-div-size"> <div class="row align-items-md-center"> <div class="col-md-7 col-xl-6 col-xxl-7"> <div class="size-text-div"> <h5>Community Service/Field Trip Shirt & Class Fund</h5> <p>Please select the size of your child’s red t-shirt for the year. Class Fund is $<?php echo e($siteSettings['class_fund']); ?> and goes to support luncheons, birthdays and thank you gifts for your teacher. </p> </div> </div> <div class="col-md-5 col-xl-6 col-xxl-5"> <div class="radio-boxes"> <?php $__currentLoopData = $shirtSizes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $shirt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <input type="radio" class="t_type cart_size_<?php echo e($sibling['url_name']); ?>" name="cart_size_<?php echo e($sibling['url_name']); ?>" id="<?php echo e($shirt->size . '-' . $sibling['url_name']); ?>" value="<?php echo e($shirt->size); ?>" <?php if(isset($sibling['shirt_size']) && $sibling['shirt_size'] == $shirt->size): echo 'checked'; endif; ?>> <label for="<?php echo e($shirt->size . '-' . $sibling['url_name']); ?>"><?php echo e($shirt->size); ?></label> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </div> </div> </div> <?php if($sibling['grade_title'] === '8th'): ?> <?php $totalPrice += $siteSettings['party_contribution']; ?> <div class="cart-contribute-parties"> <h5>8<sup>th</sup> Grade Contribution For Graduation Parties</h5> <div class="contribution-field"> <span>$</span> <input type="number" class="party_contribution" data-user="<?php echo e($sibling['url_name']); ?>" value="<?php echo e($sibling['annual_graduation_contribution'] ?? ''); ?>" placeholder="<?php echo e($siteSettings['party_contribution']); ?>"> </div> </div> <?php endif; ?> <?php $totalPrice += $siteSettings['class_fund']; ?> <?php endif; ?> <div class="cart-div-total"> <h5>Total</h5> <h6 class="each-child-total" data-total="<?php echo e(number_format($totalPrice, 2)); ?>"> $<?php echo e(number_format($totalPrice, 2)); ?></h6> </div> </div> <?php $finalTotal += $totalPrice; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php if(session('user_cart.hot_lunch_half') == 'first_half'): ?> <input type="hidden" class="annual_dues" value="<?php echo e(session('user_cart.annual_check') ? 0 : $siteSettings['annual_dues']); ?>"> <div class="cart-school-directories"> <h5>School Directories<br> <p>(printed school directory including class lists, teachers and staff along with other important school info)</p> </h5> <div class="cart-counter"> <a href="javascript:void(0)" onclick="decrement()"><i class="fa fa-minus" aria-hidden="true"></i></a> <input type="number" id="counterVal" value="<?php echo e(session()->get('user_cart.school_directory_quantity', 0)); ?>" readonly> <a href="javascript:void(0)" onclick="increment()" class='active'><i class="fa fa-plus" aria-hidden="true"></i></a> </div> <span>$<?php echo e($siteSettings->school_directory); ?>/Each</span> </div> <?php if(!session('user_cart.annual_check')): ?> <div class="cart-annual-dues"> <h5>Annual Dues</h5> <p>Annual dues are $<?php echo e($siteSettings['annual_dues']); ?> and charged once per family</p> </div> <?php $finalTotal += $siteSettings['annual_dues']; ?> <?php endif; ?> <?php endif; ?> <div class="cart-buttons nw-change"> <a href="<?php echo e(route('display.selected.items', $siblingName)); ?>">Back</a> <a href="javascript:void(0)" class="is-green" onclick="checkOut()">Continue</a> </div> </div> </div> </div> </div> </section> <?php $__env->stopSection(); ?> <?php $__env->startPush('front-scripts'); ?> <script src="<?php echo e(asset('assets/front/js/global.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/axios.min.js')); ?>"></script> <script src="<?php echo e(asset('assets/admin/js/sweetalert.min.js')); ?>"></script> <script> const counterVal = document.getElementById("counterVal"); let counter = counterVal?.value; function formatCounter(value) { return value.toString().padStart(2, "0"); } function increment() { counterVal.value = ++counter; } function decrement() { counterVal.value = counter > 0 ? --counter : counter; } $('.party_contribution').change(function() { const minAmount = `<?php echo e($siteSettings['party_contribution']); ?>`; let amount = parseFloat($(this).val()) if (amount !== 0 && amount < minAmount) { swal({ title: `Min amount for contribution is ${minAmount}`, icon: "error", dangerMode: true, closeOnClickOutside: false }); } else { updateChildTotal($(this).closest('.child-card')) } }) function updateChildTotal($card) { const $total = $card.find('.each-child-total') let itemsTotal = parseFloat($card.find('.child_items_total').val()) let classFunds, graduationContribution = 0 if ($card.find('.t_type').length) { classFunds = parseFloat(`<?php echo e($siteSettings['class_fund']); ?>`); } if ($card.find('.party_contribution').length) { graduationContribution = parseFloat($card.find('.party_contribution').val()); graduationContribution = isNaN(graduationContribution) ? 0.00 : graduationContribution } let totalAmount = itemsTotal + classFunds + graduationContribution; const formattedNumber = totalAmount.toLocaleString('en-US', { style: 'currency', currency: 'USD' }); $total.text(formattedNumber) } function checkOut() { let validation = validateData() if (validation.error) { return false } showLoader(); axios.post(`<?php echo e(route('lunch.cart.summary.data', $siblingName)); ?>`, { school_directory_quantity: counterVal?.value, other_data: validation.data }).then(function(response) { hideLoader(); window.location.href = response.data.route; }).catch(function(error) { hideLoader(); swal({ title: error.response.data.msg, icon: "error", dangerMode: true, closeOnClickOutside: false }); }); } function validateData() { let data = {}; let error = false const lunchHalf = `<?php echo e(session('user_cart.hot_lunch_half')); ?>`; if (lunchHalf === 'first_half') { $('.child-card').each(function() { const id = $(this).attr('data-user') const name = $(this).attr('data-name') //Validate shirt size let shirtSize = $(this).find('.t_type:checked').val() if (shirtSize === undefined) { swal({ title: `Please select shirt size for ${name}`, icon: "error", dangerMode: true, closeOnClickOutside: false }); error = true } else { if (!data[id]) { data[id] = {}; } data[id]['t_type'] = shirtSize } //Validate contribution amount let contributionAmount = parseFloat($(this).find('.party_contribution').val()) const minAmount = `<?php echo e($siteSettings['party_contribution']); ?>`; if (contributionAmount !== 0 && contributionAmount < minAmount) { swal({ title: `Please enter 0 or minimum ${minAmount} for graduation contribution for ${name}`, icon: "error", dangerMode: true, closeOnClickOutside: false }); error = true } else { if (!data[id]) { data[id] = {}; } data[id]['contribution_amount'] = isNaN(contributionAmount) ? 0 : contributionAmount } }) data['annual_dues'] = `<?php echo e(session('user_cart.annual_check') ? 0 : $siteSettings['annual_dues']); ?>` } return { data, error } } $(document).ready(function() { $('.party_contribution').trigger('change') $(".cart-counter a").on("click", function() { $('.cart-counter a.active').removeClass("active"); $(this).addClass("active"); }); }) function deleteSibling() { swal({ text: "Are you sure you want to remove?", icon: "error", buttons: ['NO', 'YES'], dangerMode: true }) .then(function(confirmed) { if (confirmed) { showLoader(); window.location.href = `<?php echo e(route('delete.sibling', [$siblingName, 'summary' => 1])); ?>` } }); } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('front.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/clickysoft/public_html/calvary-p2.clickysoft.net/resources/views/front/lunch-program/cart-summary.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка