관리-도구
편집 파일: 502fa7f241779ad4de2f3df7ad5f6dd0e0978248.php
<?php $__env->startSection('content'); ?> <div class="row"> <div class="col-lg-12"> <span class="panel-title d-none"><?php echo e(_lang('Add Product')); ?></span> <form method="post" class="validate" autocomplete="off" action="<?php echo e(route('products.store')); ?>" enctype="multipart/form-data"> <?php echo e(csrf_field()); ?> <div class="row"> <div class="col-lg-8"> <div class="card"> <div class="card-header"> <span class="panel-title"><?php echo e(_lang('General Information')); ?></span> </div> <div class="card-body"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Name')); ?></label> <input type="text" class="form-control" name="name" value="<?php echo e(old('name')); ?>" required> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Description')); ?> <span class="required"> *</span></label> <textarea class="form-control summernote" name="description"><?php echo e(old('description')); ?></textarea> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Short Description')); ?></label> <textarea class="form-control" name="short_description"><?php echo e(old('short_description')); ?></textarea> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Brand')); ?></label> <select class="form-control auto-select select2" data-selected="<?php echo e(old('brand_id')); ?>" name="brand_id"> <option value=""><?php echo e(_lang('Select One')); ?></option> <?php $__currentLoopData = \App\Entity\Brand\Brand::all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $brand): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($brand->id); ?>"><?php echo e($brand->translation->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Tax Class')); ?></label> <select class="form-control auto-select select2" data-selected="<?php echo e(old('tax_class_id')); ?>" name="tax_class_id"> <option value=""><?php echo e(_lang('Select One')); ?></option> <?php $__currentLoopData = \App\Entity\Tax\Tax::all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tax): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($tax->id); ?>"><?php echo e($tax->translation->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Categories')); ?></label> <select class="form-control auto-multiple-select select2" data-selected="[<?php echo e(old('categories') ? implode (', ', old('categories')) : ''); ?>]" name="categories[]" multiple> <?php echo e(buildOptionTree(\App\Entity\Category\Category::all(), 0, null, 0, -1)); ?> </select> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Tags')); ?></label> <select class="form-control auto-multiple-select select2" data-selected="[<?php echo e(old('tags') ? implode (', ', old('tags')) : ''); ?>]" name="tags[]" multiple> <?php $__currentLoopData = \App\Entity\Tag\Tag::all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tag): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($tag->id); ?>"><?php echo e($tag->translation->name); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Price').' ('.currency().')'); ?></label> <input type="text" class="form-control float-field" name="price" value="<?php echo e(old('price')); ?>" required> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Special Price').' ('.currency().')'); ?></label> <input type="text" class="form-control float-field" name="special_price" value="<?php echo e(old('special_price')); ?>"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Status')); ?></label> <select class="form-control auto-select" data-selected="<?php echo e(old('is_active',1)); ?>" name="is_active" required> <option value="1"><?php echo e(_lang('Active')); ?></option> <option value="0"><?php echo e(_lang('Inactive')); ?></option> </select> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Featured Tag')); ?></label> <select class="form-control auto-select" data-selected="<?php echo e(old('featured_tag')); ?>" name="featured_tag"> <option value=""><?php echo e(_lang('Nothing')); ?></option> <option value="featured"><?php echo e(_lang('Featured')); ?></option> <option value="on_sale"><?php echo e(_lang('On Sale')); ?></option> <option value="exclusive"><?php echo e(_lang('Exclusive')); ?></option> <option value="new"><?php echo e(_lang('New')); ?></option> </select> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Product Type')); ?></label> <select class="form-control auto-select" id="product_type" data-selected="<?php echo e(old('product_type','simple_product')); ?>" name="product_type" required> <option value="simple_product"><?php echo e(_lang('Simple Product')); ?></option> <option value="variable_product"><?php echo e(_lang('Variable Product')); ?></option> <option value="digital_product"><?php echo e(_lang('Digital Product')); ?></option> </select> </div> </div> <div class="col-md-12 d-none" id="digital_file"> <div class="form-group"> <label class="control-label"> <?php echo e(_lang('Upload File')); ?> (<?php echo e(_lang('Zip Only')); ?>) <span class="required"> *</span> </label> <input type="file" class="form-control dropify" name="digital_file" data-allowed-file-extensions="zip" data-max-file-size="<?php echo e(get_option('digital_file_max_upload_size',2)); ?>M"> </div> </div> <div class="col-md-12 variable-product <?php echo e(old('product_type') == 'variable_product' ? '' : 'd-none'); ?>"> <?php if(old('product_option')): ?> <?php $__currentLoopData = old('product_option'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product_option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="row product-option" <?php echo e($loop->first ? 'id="option"' : ''); ?>> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Option Name')); ?></label> <input type="text" class="form-control product_option" name="product_option[]" value="<?php echo e($product_option); ?>" placeholder="Ex - Color"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Option Value')); ?></label> <input type="text" class="form-control product_option_value" name="product_option_value[]" value="<?php echo e(old('product_option_value.'.$loop->index)); ?>" placeholder="Ex - Red, Green, Blue"> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <div class="row product-option" id="option"> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Option Name')); ?></label> <input type="text" class="form-control product_option" name="product_option[]" value="" placeholder="Ex - Color"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Option Value')); ?></label> <input type="text" class="form-control product_option_value" name="product_option_value[]" placeholder="Ex - Red, Green, Blue"> </div> </div> </div> <?php endif; ?> <button type="button" class="btn btn-dark btn-xs float-right" id="add_more_option"> <i class="ti-plus"></i> <?php echo e(_lang('Add More Option')); ?> </button> </div> <!--Product Variations--> <div class="col-md-12 variable-product <?php echo e(old('product_type') == 'variable_product' ? '' : 'd-none'); ?>"> <div class="card"> <div class="card-header"> <span class="panel-title"><?php echo e(_lang('Variations Prices')); ?></span> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered" id="variations-prices-table"> <thead> <?php if(old('variation_price')): ?> <?php $__currentLoopData = old('product_option'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product_option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <th><?php echo e($product_option); ?></th> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <th><?php echo e(_lang('Price')); ?></th> <th><?php echo e(_lang('Special Price')); ?></th> <th class="text-center"><?php echo e(_lang('Is Available')); ?></th> <?php endif; ?> </thead> <tbody> <?php if(old('variation_price')): ?> <?php $__currentLoopData = old('variation_price'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $variation_price): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <tr> <?php $__currentLoopData = old('product_option'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product_option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <td><?php echo e($product_option); ?></td> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <td> <input type="text" name="variation_price[]" class="form-control" value="<?php echo e(old('variation_price.'.$loop->index)); ?>" placeholder="<?php echo e(_lang('Regular Price')); ?>"> </td> <td> <input type="text" name="variation_special_price[]" class="form-control" value="<?php echo e(old('variation_special_price.'.$loop->index)); ?>" placeholder="<?php echo e(_lang('Special Price')); ?>"> </td> <td class="text-center"> <input type="checkbox" name="is_available[]" value="<?php echo e(old('is_available.'.$loop->index)); ?>"> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </tbody> </table> </div> <button type="button" class="btn btn-light btn-xs btn-block" id="generate_variations"> <i class="ti-reload"></i> <?php echo e(_lang('Generate Variations')); ?> </button> <div class="text-center"> <small><?php echo e(_lang('Click Generate Variations after adding/updating all Option Value')); ?></small> </div> </div> </div> </div> <div class="col-md-12"> <div class="form-group"> <button type="submit" class="btn btn-primary"><?php echo e(_lang('Save Product')); ?></button> </div> </div> </div> </div> </div> </div> <div class="col-lg-4"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <span class="panel-title"><?php echo e(_lang('Inventory')); ?></span> </div> <div class="card-body"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('SKU')); ?></label> <input type="text" class="form-control" name="sku" value="<?php echo e(old('sku')); ?>"> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Manage Inventory')); ?></label> <select class="form-control auto-select" data-selected="<?php echo e(old('manage_stock',0)); ?>" name="manage_stock" id="manage_inventory" required> <option value="0"><?php echo e(_lang('No')); ?></option> <option value="1"><?php echo e(_lang('Yes')); ?></option> </select> </div> </div> <div class="col-md-12 inventory-quantity d-none"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Qty')); ?> <span class="required"> *</span></label> <input type="number" class="form-control" name="qty" value="<?php echo e(old('qty')); ?>"> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('In Stock')); ?></label> <select class="form-control auto-select" data-selected="<?php echo e(old('in_stock',1)); ?>" name="in_stock"> <option value="1"><?php echo e(_lang('In Stock')); ?></option> <option value="0"><?php echo e(_lang('Out of Stock')); ?></option> </select> </div> </div> </div> </div> </div> </div> <!--Meta data--> <div class="col-md-12"> <div class="card"> <div class="card-header"> <span class="panel-title"><?php echo e(_lang('SEO')); ?></span> </div> <div class="card-body"> <div class="row"> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Meta Title')); ?></label> <input type="text" class="form-control" name="meta[meta_title]" value="<?php echo e(old('meta[meta_title]')); ?>"> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Meta Leywords')); ?></label> <input type="text" class="form-control" name="meta[meta_keywords]" value="<?php echo e(old('meta[meta_keywords]')); ?>"> </div> </div> <div class="col-md-12"> <div class="form-group"> <label class="control-label"><?php echo e(_lang('Meta Description')); ?></label> <textarea name="meta[meta_description]" class="form-control"><?php echo e(old('meta[meta_description]')); ?></textarea> </div> </div> </div> </div> </div> </div> <div class="col-md-12"> <div class="card"> <div class="card-header"> <span class="panel-title"><?php echo e(_lang('Images')); ?></span> </div> <div class="card-body"> <div class="form-group"> <button type="button" class="choose-media btn btn-light" data-media-type="image" data-input-name="files[product_image]"> <i class="fa fa-folder-open m-r-5"></i> <?php echo e(_lang('Product Image')); ?> </button> <div class="image-container"> </div> </div> <div class="form-group"> <button type="button" class="choose-media btn btn-light" data-multiple="true" data-media-type="image" data-input-name="files[gallery_images][]"> <i class="fa fa-folder-open m-r-5"></i> <?php echo e(_lang('Gallery Images')); ?> </button> <div class="multiple-image-container"> </div> </div> </div> </div> </div> </div> </div> </div><!--End Row--> </form> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('js-script'); ?> <script src="<?php echo e(asset('public/backend/assets/js/product.js')); ?>"></script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/customdevdevopdi/findjobs.customdev.devopdigital.com/resources/views/backend/product/create.blade.php ENDPATH**/ ?>