![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/storage/framework/views/ |
<?php $__env->startSection('content'); ?> <?php echo $__env->make('layouts.front.product-menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <section class="container content"> <div class="row"> <div class="col-md-12"> <h1 class="text-center bold">Oil Quotation</h1> </div> <div class="col-md-6"> <div class="logincontainer"> <div class="col-md-12"><?php echo $__env->make('layouts.errors-and-messages', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?></div> <div class="header-lined"> <?php if( is_null( $order_id ) ): ?> <h1>Your Quote: <span class="font-black"><?php echo e(config('cart.currency_symbol')); ?></span><span class="price"><?php if ("fill the tank" != Request::get('quantity_name_quote') && !empty(Request::get('quantity_name_quote'))) { echo number_format(($initial_quote_price + $vat), 2) . '<small> incl vat</small>'; } else if ("fill the tank" != Session::get('quantity_name_quote') && !empty(Session::get('quantity_name_quote'))) { echo number_format(($initial_quote_price + $vat), 2) . '<small> incl vat</small>'; } else if (Session::get('quantity_name_quote') == "fill the tank" || Request::get('quantity_name_quote') == "fill the tank") { echo number_format(( $fill_the_tank_price_admin + $vat ), 2) . '<small> incl vat</small>' . " <small>*</small><br><small class='fill_tank_msg'>* this price will change once the driver confirms the amount of quantity used</small>"; } ?> </span></h1> <?php else: ?> <h1>Your Quote: <span class="font-black"><?php echo e(config('cart.currency_symbol')); ?></span><span class="price"><?php echo e(number_format(($initial_quote_price + $vat), 2)); ?></span></h1> <?php endif; ?> <input type="hidden" name="product_tax" id="product_tax" value="<?php echo e(floatval($product_tax)); ?>"> </div> <form name="quote_order" id="quote_order" method="post" action="<?php echo e(route('quote.checkout')); ?>"> <input type="hidden" name="price" id="price" value="<?php echo e($initial_quote_price); ?>" /> <input type="hidden" name="fill_the_tank_price_admin" id="fill_the_tank_price_admin" value="<?php echo e($fill_the_tank_price_admin); ?>"> <input type="hidden" name="applied_discount_code" id="applied_discount_code" value=""> <input type="hidden" name="applied_discount_amount" id="applied_discount_amount" value=""> <input type="hidden" name="applied_discount_code_type" id="applied_discount_code_type" value=""> <input type="hidden" name="applied_discount_value" id="applied_discount_value" value=""> <input type="hidden" name="order_id" id="order_id" value="<?php echo e($orderDetails->id ?? ''); ?>"> <?php echo e(csrf_field()); ?> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="county">County <span class="text-danger">*</span></label> <?php if( is_null( $order_id ) ): ?> <select name="county_name_quote_order" id="county_name_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $county_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $county): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($county->id); ?>" <?php if ($county->id == Request::get('county_name_quote')) { echo "selected"; } else if ($county->id == Session::get('county_name_quote')) { echo "selected"; } ?>><?php echo e($county->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php else: ?> <select name="county_name_quote_order" id="county_name_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $county_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $county): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($county->id); ?>" <?php echo e(($orderDetails->order_county_id == $county->id) ? 'selected': ''); ?>><?php echo e($county->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php endif; ?> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="town">Town <span class="text-danger">*</span></label> <?php if( is_null( $order_id ) ): ?> <select name="town_name_quote_order" id="town_name_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $town_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $town): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($town->id); ?>" <?php if ($town->id == Request::get('town_name_quote')) { echo "selected"; } else if ($town->id == Session::get('town_name_quote')){ echo "selected"; } ?>><?php echo e($town->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php else: ?> <select name="town_name_quote_order" id="town_name_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $town_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $town): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($town->id); ?>" <?php echo e(($orderDetails->order_town_id == $town->id) ? 'selected': ''); ?>><?php echo e($town->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php endif; ?> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="product">Product <span class="text-danger">*</span></label> <?php if(is_null( $order_id)): ?> <select name="product_quote_order" id="product_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $product_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($product->id); ?>" <?php if ($product->id == Request::get('product_name_quote')) { echo "selected"; } else if($product->id == Session::get('product_name_quote')) { echo "selected"; } ?>><?php echo e($product->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php else: ?> <select name="product_quote_order" id="product_quote_order" class="form-control input-lg" required=""> <?php $__currentLoopData = $product_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($product->id); ?>" <?php echo e(($orderProduct->product_id == $product->id) ? 'selected': ''); ?>><?php echo e($product->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php endif; ?> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="quantity">Quantity <span class="text-danger">*</span></label> <?php if(is_null( $order_id)): ?> <select name="quantity" id="quantity" class="form-control input-lg" required=""> <?php if($fill_the_tank_price_admin && $fill_the_tank_price_admin != '0.00'): ?> <option value='fill the tank' <?php if (Request::get('quantity_name_quote') == 'fill the tank') { echo "selected"; } else if (Session::get('quantity_name_quote') == 'fill the tank') { echo "selected"; } ?>>Fill the Tank</option> <?php endif; ?> <?php $__currentLoopData = $quantity_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $quantity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($quantity->id); ?>" <?php if($quantity->id == Request::get('quantity_name_quote')){ echo "selected"; }else if($quantity->id == Session::get('quantity_name_quote')){ echo "selected"; } ?>><?php echo e($quantity->name); ?> : <?php echo e($quantity->value); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php else: ?> <select name="quantity" id="quantity" class="form-control input-lg" required=""> <?php if($fill_the_tank_price_admin && $fill_the_tank_price_admin != '0.00'): ?> <option value="fill the tank">Fill the Tank</option> <?php endif; ?> <?php $__currentLoopData = $quantity_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $quantity): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($quantity->id); ?>" <?php echo e(( $orderProduct->quantity == $quantity->value ) ? 'selected': ''); ?>><?php echo e($quantity->name); ?> : <?php echo e($quantity->value); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> <?php endif; ?> </div> </div> </div> <div class="row"> <div class="col-md-6 btn-margin-top"> </div> <div class="col-md-6 btn-margin-top"> <input type="hidden" name="recaptcha" id="recaptcha"> <button class="btn btn-lg btn-block btn-send" type="submit">Order Now</button> </div> <div class="col-md-12"> <img class="img-fluid m-1" src="<?php echo e(URL::asset('/images/opayo.png')); ?>" alt="Opayo Secure Payment" /> </div> </div> </form> </div> </div> <div class="col-md-6"> <div class="logincontainer"> <div class="header-lined"> <h1>Have a discount code?</h1> </div> <div class="row"> <div class="col-sm-12"> <form action="" method="post" class="form-horizontal"> <div class="col-md-12"> <div class="form-group"> <?php if(isset($orderDetails) && !is_null($orderDetails->discount_coupon_code)): ?> <input type="text" id="discount_code" name="discount_code" value="<?php echo e($orderDetails->discount_coupon_code); ?>" class="form-control input-lg" placeholder="Enter Discount Code" /> <?php else: ?> <input type="text" id="discount_code" name="discount_code" value="" class="form-control input-lg" placeholder="Enter Discount Code" /> <?php endif; ?> </div> </div> <div class="col-md-12"> <div class="row" id="applied_discount_coupon_details"> <?php if(isset($orderDetails) && !is_null($orderDetails->discount_coupon_code)): ?> <div class="alert alert-success alert-dismissible"> <a href="#" id="applied_discount_coupon_clear" class="close" data-dismiss="alert" aria-label="close">×</a><strong>Success! </strong>Discount of €<?php echo e($orderDetails->discount_amount); ?> will be applied </div> <?php endif; ?> </div> </div> <div class="col-md-6"></div> <div class="col-md-6"> <?php if(Auth::check()): ?> <button class="btn btn-outline-dark btn-lg btn-block font-black" id="btn_apply_discount_coupon" type="button">Apply Code</button> <?php else: ?> <button class="btn btn-outline-dark btn-lg btn-block font-black" id="btn_show_login_warning" type="button">Apply Code</button> <?php endif; ?> </div> </form> </div> </div> </div> </div> </div> <div id="modal_login_warning" class="modal fade" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> </div> <div class="modal-body"> <div class="logincontainer"> <h3 class="text-center">Login Required</h3> <p>You must be logged in to use this discount code, please login with the button below.</p> <div class="row"> <div class="col-md-6 btn-margin-top"> <a href="<?php echo e(route('cart.login')); ?>" class="btn btn-dark btn-lg btn-block font-black">Login</a> </div> <div class="col-md-6 btn-margin-top"> <button type="button" class="btn btn-lg btn-block btn-send" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> </div> </div> </section> <?php echo $__env->make('layouts.front.call-to-action-footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="https://www.google.com/recaptcha/api.js?render=<?php echo e(config('services.recaptcha.sitekey')); ?>"></script> <script type="text/javascript"> $(function(){ grecaptcha.ready(function() { grecaptcha.execute('<?php echo e(config('services.recaptcha.sitekey')); ?>', {action: 'contact'}).then(function(token) { if (token) { document.getElementById('recaptcha').value = token; } }); }); $('#btn_show_login_warning').click(function() { $('#modal_login_warning').modal({ backdrop: 'static', keyboard: false }); }); $('#btn_apply_discount_coupon').click(function() { var coupon_code = $('#discount_code').val().trim(); var quote_price = '<?php echo e($initial_quote_price + $vat); ?>'; if (coupon_code != ''){ $.ajax({ url:"<?php echo e(route('validate.discount.coupon')); ?>", method: "POST", data: { '_token': '<?php echo e(csrf_token()); ?>', 'quote_price': quote_price, 'coupon_code': coupon_code }, success:function(data) { if( data.response == 0 ) { var response = '<div class="alert alert-success alert-dismissible"><a href="#" id="applied_discount_coupon_clear" class="close" data-dismiss="alert" aria-label="close">×</a><strong>Success! </strong>'+ data.message +'</div>'; $('#applied_discount_coupon_details').html(response); $('#applied_discount_code').val(coupon_code); $('#applied_discount_amount').val(data.discountAmount); $('#applied_discount_code_type').val(data.couponType); $('#applied_discount_value').val(data.discountValue); } else { var response = '<div class="alert alert-warning alert-dismissible"><a href="#" id="applied_discount_coupon_clear" class="close" data-dismiss="alert" aria-label="close">×</a><strong>Warning! </strong>'+ data.message +'</div>'; $('#applied_discount_coupon_details').html(response); $('#applied_discount_code').val(''); $('#applied_discount_amount').val(''); $('#applied_discount_code_type').val(''); $('#applied_discount_value').val(''); } } }); } else { $('#discount_code').focus(); } }); $(document).on('click', '#applied_discount_coupon_clear', function() { $('#discount_code').val(''); $('#applied_discount_code').val(''); $('#applied_discount_amount').val(''); $('#applied_discount_code_type').val(''); $('#applied_discount_value').val(''); }); $(document).on('change','#county_name_quote_order',function() { var county_id = $(this).val(); if (county_id != '') { $.ajax({ url:"<?php echo e(route('quote.fetch.towns.order')); ?>", method: "POST", data: {'county_id':county_id , "_token": "<?php echo e(csrf_token()); ?>"}, success:function(data) { data = JSON.parse(data); $("#town_name_quote_order").html(data); } }); } }); $(document).on('change','#town_name_quote_order',function() { var town_id = $(this).val(); if (town_id != '') { $.ajax({ url:"<?php echo e(route('quote.session.towns.order')); ?>", method: "POST", data: {'town_id':town_id , "_token": "<?php echo e(csrf_token()); ?>"}, success:function(data) { } }); } }); $(document).on('change','#product_quote_order',function() { var product_id = $(this).val(); if (product_id != '') { $.ajax({ url:"<?php echo e(route('quote.fetch.quantity.order')); ?>", method: "POST", data: {'product_id':product_id , "_token": "<?php echo e(csrf_token()); ?>"}, success:function(data) { data = JSON.parse(data); $("#quantity").html(data); } }); } }); $(document).on('change','#quantity',function() { var product_attribute_id = $(this).val(); var product_tax = parseFloat($('#product_tax').val()); if (product_attribute_id == 'fill the tank') { var price = parseFloat($('#fill_the_tank_price_admin').val()); var recalculated_tax = ((price * product_tax ) / 100); var final_price = (price + recalculated_tax).toFixed(2); $('.price').html(final_price + '<small> incl vat</small>' + " <small>*</small><br><small class='fill_tank_msg'>* this price will change once the driver confirms the amount of quantity used</small>"); $.ajax({ url:"<?php echo e(route('quote.fetch.price_fill_tank.order')); ?>", method: "POST", data: {'product_attribute_id':product_attribute_id , "_token": "<?php echo e(csrf_token()); ?>"}, success:function(data) { } }); } else { if (product_attribute_id != '') { $.ajax({ url:"<?php echo e(route('quote.fetch.price.order')); ?>", method: "POST", data: {'product_attribute_id':product_attribute_id , "_token": "<?php echo e(csrf_token()); ?>"}, success:function(data) { price = JSON.parse(data); price = parseFloat(price); var recalculated_tax = (( price * product_tax ) / 100); var final_price = (price + recalculated_tax).toFixed(2); $('#price').val(price); $('.price').html(final_price + '<small> incl vat</small>'); } }); } } }); }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.front.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/corals/mcoil.corals.io/resources/views/front/quote/order.blade.php ENDPATH**/ ?>