Server IP : 162.213.251.212 / Your IP : 3.145.6.179 [ 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.admin.header','data' => []]); ?> <?php $component->withName('admin.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; ?> <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?> <?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.sidebar','data' => []]); ?> <?php $component->withName('admin.sidebar'); ?> <?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; ?> <style> .input-field .img-upload-btn { margin: 10px; } td.col-img { display: flex; } td.col-img h6 { position: relative; margin: 10px 0px 0px 10px !important; } </style> <main> <div class="main-content"> <div class="row"> <div class="col-lg-12 col-12"> <form id="EditProductForm"> <?php echo csrf_field(); ?> <div class="login-form form-content"> <h4>Edit Product</h4> <input type="hidden" name="EditProductId" value="<?php echo e($edit->product_id); ?>"> <div class="input-field"> <label for="">Product Category</label> <div class="input-field"> <select name="EditProductCat" class="form-control custom-input" id="EditProductCat"> <option value="">Select</option> <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($cate->category_id); ?>" <?php echo e($edit->product_category_id == $cate->category_id ? 'selected': ''); ?> ><?php echo e($cate->category_heading); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="input-field"> <label for="">Product Title</label> <div class="input-field"> <input class="custom-input" type="text" name="EditProductTitle" value="<?php echo e($edit->product_front_title); ?>"> </div> </div> <div class="input-field"> <label for="">Product Heading</label> <div class="input-field"> <input class="custom-input" type="text" name="EditProductHeading" value="<?php echo e($edit->product_heading); ?>"> </div> </div> <div class="input-field"> <label for="">Product Sub Heading</label> <div class="input-field"> <input class="custom-input" type="text" name="EditProductSubHeading" value="<?php echo e($edit->product_sub_heading); ?>"> </div> </div> <!--<div class="input-field">--> <!-- <label for="">Product Description</label>--> <!-- <div class="input-field">--> <!-- <textarea class="custom-input ckeditor" type="text" name="EditProductDesc" id="EditProductDesc"><?php echo e($edit->product_short_description); ?></textarea>--> <!-- </div>--> <!--</div><br>--> <!--<div class="input-field">--> <!-- <label for="">Product Fabrication</label>--> <!-- <div class="input-field">--> <!-- <textarea class="custom-input ckeditor" type="text" name="EditProductLongDesc" id="EditProductLongDesc"><?php echo e($edit->product_long_description); ?></textarea>--> <!-- </div>--> <!--</div>--> <!--<br>--> <!--<div class="input-field">--> <!-- <label for="">Product Fit</label>--> <!-- <div class="input-field">--> <!-- <textarea class="custom-input ckeditor" type="text" name="EditProductTable" id="EditProductTable"><?php echo e($edit->product_table); ?></textarea>--> <!-- </div>--> <!--</div>--> <br> <div class="input-field"> <label for="">Product Colors</label> <div class="input-field"> <select name="productColor[]" class="form-control multiple-select custom-input" id="productColor" multiple> <option value="">Select</option> <?php $__currentLoopData = $colors; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $color): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($color->color_id); ?>" <?php $__currentLoopData = $pro_color; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pcolor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($pcolor->color_id == $color->color_id ? 'selected' : ''); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>><?php echo e($color->color_name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="input-field"> <label for="">Product Sizes</label> <div class="input-field"> <select name="productSize[]" class="form-control multiple-select custom-input" id="productSize" multiple> <option value="">Select</option> <?php $__currentLoopData = $sizes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $size): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($size->size_id); ?>" <?php $__currentLoopData = $pro_size; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $psize): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php echo e($psize->size_id == $size->size_id ? 'selected' : ''); ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>><?php echo e($size->size); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="input-field"> <label for="">Product Origional Price</label> <div class="input-field"> <input class="custom-input" type="text" name="EditProductPrice" value="<?php echo e($edit->product_origional_price); ?>"> </div> </div> <div class="input-field"> <label for="">Product Selling Price</label> <div class="input-field"> <input class="custom-input" type="text" name="EditProductSellingPrice" value="<?php echo e($edit->product_selling_price); ?>"> </div> </div> <div class="input-field"> <label for="">Product Quantity</label> <div class="input-field"> <input class="custom-input" type="number" name="EditProductQuantity" value="<?php echo e($edit->product_quantity); ?>"> </div> </div> <div class="input-field"> <label for="">Product Tax</label> <div class="input-field"> <input class="custom-input" type="number" name="EditProductTax" value="<?php echo e($edit->product_tax); ?>"> </div> </div> <?php if(!empty($edit->product_image)): ?> <div class="input-field"> <label>Previous Front Image</label> <div class="img-upload-wrapper"> <img src="<?php echo e(asset('storage/images/'.$edit->product_image)); ?>" style="margin: 0; max-height: 200px; max-width: 200px; object-fit: contain;"> <input type="hidden" name="PrevProductImage" id="PrevProductImage" value="<?php echo e($edit->product_image); ?>" readonly> </div> </div> <div class="custom-checkbox"> <label for="">Remove Image</label> <input type="checkbox" id="RemoveProductImage" name="RemoveProductImage"> <span class="checkmark"></span> </div> <?php endif; ?> <div class="input-field"> <label>Change Image</label> <div class="img-upload-wrapper"> <input class="img-upload" type="file" name="EditProductImage" id="EditProductImage" accept="image/png, image/jpeg"> </div> <div class="btn-wrapper"> <label class="btn img-upload-btn" for="EditProductImage">Select Image</label> </div> </div> <?php if(!empty($edit->product_back_image)): ?> <div class="input-field"> <label>Previous Back Image</label> <div class="img-upload-wrapper"> <img src="<?php echo e(asset('storage/images/'.$edit->product_back_image)); ?>" style="margin: 0; max-height: 200px; max-width: 200px; object-fit: contain;"> <input type="hidden" name="PrevProductbackImage" id="PrevProductbackImage" value="<?php echo e($edit->product_back_image); ?>" readonly> </div> </div> <div class="custom-checkbox"> <label for="">Remove Image</label> <input type="checkbox" id="RemoveProductbackImage" name="RemoveProductbackImage"> <span class="checkmark"></span> </div> <?php endif; ?> <div class="input-field"> <label>Change Image</label> <div class="img-upload-wrapper"> <input class="img-upload" type="file" name="EditProductbackImage" id="EditProductbackImage" accept="image/png, image/jpeg"> </div> <div class="btn-wrapper"> <label class="btn img-upload-btn" for="EditProductbackImage">Select Image</label> </div> </div> <?php $images = json_decode($edit->product_gallery); ?> <?php if(!empty($images)): ?> <div class="input-field"> <label>Previous Gallery Image</label> <div class="img-upload-wrapper"> <?php $__currentLoopData = $images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <img src="<?php echo e(asset('storage/images/'.$image)); ?>" > <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <input type="hidden" name="PrevGalleryImage" id="PrevGalleryImage" value="<?php echo e($edit->product_gallery); ?>" readonly> </div> </div> <div class="custom-checkbox"> <label for="">Remove Gallery Image</label> <input type="checkbox" id="RemoveGalleryImage" name="RemoveGalleryImage"> <span class="checkmark"></span> </div> <?php endif; ?> <div class="input-field"> <label>Change Gallery Images</label> <div class="img-upload-wrapper"> <input class="img-upload" type="file" name="EditProductGallery[]" id="EditProductGallery" accept="image/png, image/jpeg" multiple> </div> <div class="btn-wrapper"> <label class="btn img-upload-btn" for="EditProductGallery">Select Image</label> </div> </div> <!-- <div class="input-field"> <label>Service Icon Image</label> <div class="img-upload-wrapper"> <input class="img-upload" type="file" name="serviceIconImg" id="serviceIconImg" accept="image/png, image/jpeg"> </div> <div class="btn-wrapper"> <label class="btn img-upload-btn" for="serviceIconImg">Select Image</label> </div> </div> <div class="input-field"> <label>Service Video</label> <div class="img-upload-wrapper"> <input class="img-upload" type="file" name="serviceVideo" id="serviceVideo"> </div> <div class="btn-wrapper"> <label class="btn img-upload-btn" for="serviceVideo">Select Video</label> </div> </div> --> <div class="input-field"> <label for="">Product Status</label> <div class="custom-switch checked"> <input checked type="checkbox" name="EditProductStatus" id="EditProductStatus"> <span class="circle"></span> <span class="no"><i class="fa-light fa-xmark"></i></span> <span class="yes"><i class="fa-light fa-check"></i></span> </div> </div> <!-- <h6>* Required Fields</h6> --> <div class="form-footer"> <button type="submit">Update Product</button> </div> </div> </form> </div> </div> </div> <!-- Edit Product --> <script> $(document).ready(function(){ $("#EditProductForm").on('submit', function(e){ e.preventDefault(); for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); var data = new FormData(this); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ url: "<?php echo e(url('/update_product')); ?>", method: "POST", data: data, datatype: "json", cache: false, contentType: false, processData: false, success:function(data) { if($.isEmptyObject(data.error)) { toastr.success(data.success,"Updated",{timeOut: 1500}); document.getElementById('EditProductForm').reset(); CKEDITOR.instances.EditProductDesc.setData(""); CKEDITOR.instances.EditProductLongDesc.setData(""); CKEDITOR.instances.EditProductTable.setData(""); window.location = "<?php echo e(url('product')); ?>" } else if(data.error.EditProductTitle) { toastr.error(data.error.EditProductTitle,"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductHeading) { toastr.error(data.error.EditProductHeading,"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductPrice) { toastr.error(data.error.EditProductPrice,"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductImage) { toastr.error(data.error.EditProductImage,"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductImage[1]) { toastr.error(data.error.EditProductImage[1],"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductGallery[0]) { toastr.error(data.error.EditProductGallery[0],"Error",{timeOut: 1500}); return false; } else if(data.error.EditProductGallery[1]) { toastr.error(data.error.EditProductGallery[1],"Error",{timeOut: 1500}); return false; } }, error:function() { toastr.error("SomeThing Went Wrong...","Error"); return false; }, }); }); }); </script> <!-- Edit Product Ends Here --> <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?> <?php $component = $__env->getContainer()->make(Illuminate\View\AnonymousComponent::class, ['view' => 'components.admin.footer','data' => []]); ?> <?php $component->withName('admin.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; ?><?php /**PATH /home/wpdeatle/public_html/easy-buyer/resources/views/admin/edit_product.blade.php ENDPATH**/ ?>