Server IP : 162.213.251.212 / Your IP : 3.15.7.189 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/www/easybuyer/storage/framework/views/ |
Upload File : |
<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?> <?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.main.header','data' => []]); ?> <?php $component->withName('main.header'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?> <?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?> <?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?> <?php endif; ?> <main class="shop-main"> <section class="vehicles-select" element-id="356"> <div class="container" element-id="355"> <div class="extra-listing" element-id="354"> <form id="checkout_form"> <?php echo csrf_field(); ?> <div class="upgrade-card-group" element-id="353"> </div> <div class="row justify-content-between" element-id="343"> <div class="col-lg-8 col-12" element-id="342"> <div class="info-form" element-id="341"> <h4 class="theme-h4" element-id="340">Fill Out The Details</h4> <h6 class="info" element-id="339">Billing Information:</h6> </div> <div class="proceed-form" element-id="338"> <div class="row g-4" element-id="337"> <div class="col-lg-6 col-12" element-id="336"> <div class="input-field" element-id="335"> <label element-id="334">What’s your first name?*</label> <input type="text" element-id="333" name="fname" id="fname" fdprocessedid="3t6ckc"> </div> </div> <div class="col-lg-6 col-12" element-id="332"> <div class="input-field" element-id="331"> <label element-id="330">What’s your last name?*</label> <input type="text" element-id="329" name="lname" id="lname" fdprocessedid="k7ojfa"> </div> </div> <div class="col-lg-6 col-12" element-id="328"> <div class="input-field" element-id="327"> <label element-id="326">What’s your email address?*</label> <input type="text" element-id="325" name="email" id="email" fdprocessedid="kr5h18"> </div> </div> <div class="col-lg-6 col-12" element-id="320"> <div class="input-field" element-id="319"> <label element-id="318">What’s your mobile number?</label> <input class="int-tel" type="number" name="phone" id="phone" element-id="317" fdprocessedid="i3o1ri"> </div> </div> </div> <hr element-id="304"> <h4 class="theme-h4" element-id="303">We need your billing address</h4> <div class="row g-4" element-id="302"> <div class="col-lg-8 col-12" element-id="301"> <div class="input-field" element-id="300"> <label element-id="299">Address (line 1)</label> <input type="text" element-id="298" fdprocessedid="i2bqrf" name="address1" id="address1"> </div> </div> <div class="col-lg-4 col-12" element-id="297"> <div class="input-field" element-id="296"> <label element-id="295">Address (line 2)</label> <input type="text" element-id="294" fdprocessedid="su313t" name="address2" id="address2"> </div> </div> <div class="col-lg-8 col-12" element-id="293"> <div class="input-field" element-id="292"> <label element-id="291">State</label> <!-- <input type="text" element-id="290" fdprocessedid="fvw7v8" name="state" id="state"> --> <input type="hidden" name="tax" id="tax-rate"> <select name="state" id="state" required> <option selected disabled>Select State</option> <option value="Alberta">Alberta</option> <option value="British Columbia">British Columbia</option> <option value="Manitoba">Manitoba</option> <option value="Northwest Territories">Northwest Territories</option> <option value="Nunavut">Nunavut</option> <option value="Quebec">Quebec</option> <option value="Saskatchewan">Saskatchewan</option> <option value="Yukon">Yukon</option> <option value="Ontario">Ontario</option> <option value="New Brunswick">New Brunswick</option> <option value="Newfoundland">Newfoundland</option> <option value="Labrador">Labrador</option> <option value="Nova Scotia">Nova Scotia</option> <option value="Prince Edward Island">Prince Edward Island</option> </select> </div> </div> <div class="col-lg-4 col-12" element-id="289"> <div class="input-field" element-id="288"> <label element-id="287">What’s your postal code?*</label> <input type="text" element-id="286" fdprocessedid="r2ntu5" name="zipcode" id="zipcode"> </div> </div> <div class="col-lg-4 col-12" element-id="285"> <div class="input-field" element-id="284"> <label element-id="283">In what city?*</label> <input type="text" element-id="282" fdprocessedid="cm12f" name="city" id="city"> </div> </div> <div class="col-lg-4 col-12" element-id="281"> <div class="input-field" element-id="280"> <label element-id="279">In what country?*</label> <input type="text" element-id="278" fdprocessedid="mw1rlp" name="country" id="country"> </div> </div> </div> <hr element-id="265"> <hr element-id="260"> <hr element-id="246"> <h4 class="theme-h4" element-id="245">Anything to add?</h4> <div class="comment-box" element-id="244"> <textarea placeholder="Write your comments here...." maxlength="250" element-id="243" name="message" id="message"></textarea> <p class="comment-info" element-id="242"><span element-id="241">250</span> characters </p> </div> <hr element-id="240"> <!-- <div class="form-end" element-id="190"> <div class="checkbox-field" element-id="189"> <input type="checkbox" id="agreement" element-id="188"> <label for="agreement" element-id="187">I have read and accept the <a href="javascript:;" element-id="186">Terms & Conditions & rental Qualifications and Requirements</a></label> </div> <button class="proceed-btn" element-id="185" fdprocessedid="m8firb">Complete Reservation</button> </div> --> </div> </div> <div class="col-lg-4 col-12" element-id="184"> <div class="introduction-policy"> <h2>Order Summary</h2> <?php $total = 0; ?> <?php $__currentLoopData = $cartItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="custom-cards"> <div class="row align-items-center"> <div class="col-12 col-md-4"> <img src="<?php echo e(asset('storage/images/'.$item->product->product_image)); ?>" class="img-fluid" alt="img"> </div> <div class="col-12 col-md-6"> <ul> <li> <h5><?php echo e($item->product->product_front_title); ?> x <?php echo e($item->product_quantity); ?><br> <?php if($item->color): ?> <?php echo e($item->color->color_name); ?> <?php endif; ?> - <?php if($item->size): ?> <?php echo e($item->size->size); ?> <?php endif; ?> </h5> </li> <li> <span class="small-size"> <?php $itemPrice = $item->product->product_origional_price; if ($item->color) $itemPrice += $item->color->color_price; if ($item->size) $itemPrice += $item->size->price; $total += $itemPrice * $item->product_quantity; ?> $<?php echo e(number_format($itemPrice * $item->product_quantity, 2)); ?> </span> </li> </ul> </div> <div class="col-12 col-md-2"> <div class="pricing"> <p>USD $<?php echo e(number_format($itemPrice * $item->product_quantity, 2)); ?></p> </div> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <div class="blue-cap"> <ul> <li>Sub Total: <span>$<?php echo e(number_format($total, 2)); ?></span></li> <li>Discount: <span>- $<?php echo e(number_format($discount, 2)); ?></span></li> <li id="tax-rate-li" style="display: none;">Tax Rate: <span></span></li> <li id="total-amount">Total Amount: <span>$<?php echo e(number_format($totalAfterDiscount, 2)); ?></span></li> </ul> <ul class="radio-ul"> <li> <input type="radio" name="shippingMethod" id="pickup" value="Pickup"> <label for="pickup"><h6>Pickup</h6></label> </li> <li> <input type="radio" name="shippingMethod" id="local-shipping" value="LocalShipping"> <label for="local-shipping"><h6>Local Shipping (Edmonton) - $<?php echo e($localShippingCharge); ?></h6></label> </li> <li> <input type="radio" name="shippingMethod" id="canada-shipping" value="CanadaShipping"> <label for="canada-shipping"><h6>Shipping throughout Canada - $<?php echo e($canadaShippingCharge); ?></h6></label> </li> </ul> <ul class="radio-ul"> <li> <input type="radio" name="paymentMethod" id="stripe-p" value="Stripe"> <label for="stripe-p"><h6>Stripe (Credit/Debit Card)</h6></label> </li> <li> <input type="radio" name="paymentMethod" id="stripe-paylater" value="StripePayLater"> <label for="stripe-paylater"><h6 style="text-align: end;">Stripe PayLater</h6></label> </li> </ul> </div> <div id="pickup-location" style="display: none;"> <label for="pickupLocation">Pickup Location:</label> <p type="text" id="pickupLocation" name="pickupLocation" class="form-control">315 Montgomery Street Financial District, 9th and 10th Floor, San Francisco, CA, 94104</p> </div> </div> </div> <div class="checkbox-field field-2"> <input type="checkbox" name="terms_cnd" id="terms-cnd"> <label for="terms-cnd">I've read and accept the terms & conditions *.</label> </div> <button type="submit" class="mart-858 order-btn">CONFIRM ORDER</button> </form> </section> </main> <script> $(document).ready(function() { $("#checkout_form").on('submit', function(e) { e.preventDefault(); var data = new FormData(this); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ url: "<?php echo e(url('/placeorder')); ?>", method: "POST", data: data, cache: false, processData: false, contentType: false, success: function(data) { if (data.status == 1) { window.location = "<?php echo e(url('/payment')); ?>" + '/' + data.order_id; } else if (data.status == 2) { window.location = "<?php echo e(url('/stripe_payment')); ?>" + '/' + data.order_id; } else if (data.status == 3) { var stripe = Stripe('<?php echo e(env('STRIPE_KEY')); ?>'); stripe.redirectToCheckout({ sessionId: data.sessionId }).then(function (result) { // Handle result.error or result.success accordingly }); } else if ($.isEmptyObject(data.error)) { toastr.success(data.success, "Success", { timeOut: 1500 }); window.location = "<?php echo e(url('/')); ?>"; } else { displayErrors(data.error); } }, error: function(xhr, status, error) { console.error("Error Status: " + status); console.error("Error: " + error); console.error("Response: " + xhr.responseText); toastr.error("Something Went Wrong", "Error", { timeOut: 1500 }); } }); }); function displayErrors(errors) { if (errors.fname) { toastr.error(errors.fname, "Error", { timeOut: 1500 }); } else if (errors.lname) { toastr.error(errors.lname, "Error", { timeOut: 1500 }); } else if (errors.email) { toastr.error(errors.email, "Error", { timeOut: 1500 }); } else if (errors.phone) { toastr.error(errors.phone, "Error", { timeOut: 1500 }); } else if (errors.address1) { toastr.error(errors.address1, "Error", { timeOut: 1500 }); } else if (errors.city) { toastr.error(errors.city, "Error", { timeOut: 1500 }); } else if (errors.state) { toastr.error(errors.state, "Error", { timeOut: 1500 }); } else if (errors.country) { toastr.error(errors.country, "Error", { timeOut: 1500 }); } else if (errors.zipcode) { toastr.error(errors.zipcode, "Error", { timeOut: 1500 }); } else if (errors.paymentMethod) { toastr.error(errors.paymentMethod, "Error", { timeOut: 1500 }); } else if (errors.terms_cnd) { toastr.error(errors.terms_cnd, "Error", { timeOut: 1500 }); } } }); </script> <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?> <?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.main.footer','data' => []]); ?> <?php $component->withName('main.footer'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?> <?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?> <?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?> <?php endif; ?> <script> $(document).ready(function() { const basePrice = Number(<?php echo e($total); ?>); let shippingCharge = 0; let taxRate = 0; let discount = Number(<?php echo e($discount); ?>) || 0; $("input[name='shippingMethod']").change(function() { const shippingMethod = $(this).val(); shippingCharge = shippingMethod === 'LocalShipping' ? <?php echo e($localShippingCharge); ?> : shippingMethod === 'CanadaShipping' ? <?php echo e($canadaShippingCharge); ?> : 0; $("#pickup-location").toggle(shippingMethod === 'Pickup'); updateTotalAmount(); }); $("#state").change(function() { const state = $(this).val(); const gst5 = ["Alberta", "British Columbia", "Manitoba", "Northwest Territories", "Nunavut", "Quebec", "Saskatchewan", "Yukon"]; const gst13 = ['Ontario']; const gst15 = ["New Brunswick", "Newfoundland", "Labrador", "Nova Scotia", "Prince Edward Island"]; taxRate = 0; if (gst5.includes(state)) { taxRate = 0.05; } else if (gst13.includes(state)) { taxRate = 0.13; } else if (gst15.includes(state)) { taxRate = 0.15; } updateTotalAmount(); }); function updateTotalAmount() { const totalAfterDiscount = basePrice - discount; // Apply discount to base price const taxAmount = totalAfterDiscount * taxRate; const totalAmount = totalAfterDiscount + taxAmount + shippingCharge; $("#tax-rate-li").show(); $("#tax-rate-li span").html(`$${taxAmount.toFixed(2)}`); $("#total-amount span").html(`$${totalAmount.toFixed(2)}`); } // Initialize the display updateTotalAmount(); }); </script> <?php /**PATH /home/allssztx/public_html/easybuyer/resources/views/checkout.blade.php ENDPATH**/ ?>