home
/
zktecojo
/
public_html
/
app
/
views-feb 24
/
admin
/
products
➕ New
📤 Upload
✎ Editing:
edit.blade.php
← Back
@include('admin.common.header') @include('admin.common.leftmenu') <aside class="right-side"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Dashboard <small>Control panel</small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li>Products</li> <li class="active">Add New</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="box box-warning"> <div class="box-header"> <h3 class="box-title">Add Products</h3> </div> <!-- /.box-header --> <div class="box-body"> <?php echo $messages; ?> <input type="hidden" name="prd_id" id="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div id="tabs" class="ProductTab"> <ul> <li><a href="#fragment-1"><span>General</span></a></li> <li><a href="#fragment-2"><span>Gallery</span></a></li> <li><a href="#fragment-3"><span>Package</span></a></li> <li><a href="#fragment-4"><span>Download</span></a></li> <li><a href="#fragment-5"><span>Related Products</span></a></li> </ul> <div id="fragment-1"> <div class="box-body"> <?php echo $messages; ?> <?php echo Form::open(array('url' => array('admin/product/update_product_basic/'),'files'=>true,'id'=>"updateProduct")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div id="accordion"> <h3>Section 1</h3> <div> <div class="row"> <div class="col-sm-4"> <label>Select Product Category</label> <select name="product_cat" class="form-control" > <option value="0">select</option> <?php if(!empty($menuProductTree)){ echo get_menu_helper($menuProductTree,'option',0,$rsproducts->product_cat_id) ; } ?> </select> </div> </div> <div class="row"> <div class="col-sm-6"> <label>Product title</label> <input type="text" name="product_title" id="product_title" class="form-control" value="<?php echo $rsproducts->product_title; ?>" /> </div> <div class="col-sm-6"> <label>Product title Arabic</label> <input type="text" name="product_title_arabic" class="form-control" value="<?php echo $rsproducts->product_title_arabic; ?>" /> </div> </div> <div class="row"> <div class="col-sm-6"> <label>Product Short Description </label> <textarea name="product_short_desc" class="form-control mceEditorupdate" placeholder="" ><?php echo $rsproducts->product_short_content;?></textarea> </div> <div class="col-sm-6"> <label>Product Short Description Arabic </label> <textarea name="product_short_desc_arabic" class="form-control mceEditorupdate" placeholder="" ><?php echo $rsproducts->product_short_content_arabic;?></textarea> </div> </div> <!--<div class="row"> <div class="col-sm-4"> <label>Product Priority</label> <input type="text" name="product_priority" class="form-control" value="<?php echo $rsproducts->product_priority; ?>" /> </div> </div>--> <div class="row"> <div class="col-sm-2"> <label>Status</label> <select name="product_status" class="form-control"> <option value="1" <?php echo ($rsproducts->product_status==1)?"selected":"";?>>Activate</option> <option value="0" <?php echo ($rsproducts->product_status==0)?"selected":"";?>>Deactivate</option> </select> </div> </div> </div> <h3>Overview</h3> <div> <div class="row"> <div class="col-sm-6"> <label>english</label> <textarea name="pgm_overview" id="pgm_overview" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_overview;?></textarea> </div> <div class="col-sm-6"> <label>arabic</label> <textarea name="pgm_overview_arabic" id="pgm_overview_arabic" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_overview_arabic;?></textarea> </div> </div> </div> <h3>Function</h3> <div> <div class="row"> <div class="col-sm-6"> <label>english</label> <textarea name="pgm_function" id="pgm_function" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_function;?></textarea> </div> <div class="col-sm-6"> <label>arabic</label> <textarea name="pgm_function_arabic" id="pgm_function_arabic" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_function_arabic;?></textarea> </div> </div> </div> <h3>Specification</h3> <div> <div class="row"> <div class="col-sm-6"> <label>english</label> <textarea name="pgm_specification" id="pgm_specification" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_specification;?></textarea> </div> <div class="col-sm-6"> <label>arabic</label> <textarea name="pgm_specification_arabic" id="pgm_specification_arabic" class="form-control mceEditorupdate" ><?php echo $rsproducts->product_specification_arabic;?></textarea> </div> </div> </div> <h3>Configuration</h3> <div> <?php if(!empty($rsproducts->product_image_name)){?><img src="<?php echo URL::to('assets/uploads/products'.$rsproducts->product_image_name);?>" width="50" height="50"> <?php } ?> <div class="row"> <div class="col-sm-6"> <label>Configuration Image</label> <input type="file" name="product_image_name" class="form-control" placeholder="" /> </div> </div> </div> </div> <div class="row"> <div class="col-sm-2"> <label> </label> <div class="form-group"> <input type="submit" name="creategeneral" value="Submit" id="updateGeneral" class="btn btn-primary"> </div> </div> </div> {{ Form::close() }} </div> </div> <div id="fragment-2"> <div class="box-body"> <?php echo $messages; ?> <?php if(!empty($productGallery)){echo Form::open(array('url' => array('admin/product/update_gallery_baseImage/'),'files'=>true,'id'=>"uploadGal",'name'=>"uploadGal")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div class="row"> <?php foreach($productGallery as $list){ ?> <div class="col-sm-2 blr1"> <div class="check-box1"><input type="checkbox" name="deleteImg[]" value="<?php echo $list->pg_id; ?>" /></span></div> <img src="{{asset('assets/uploads/products/small/'.$list->pg_image_name )}}" class="img1"/> <div class="radio-block"> <input type="radio" name="base_image" value="<?php echo $list->pg_id; ?>" <?php echo ($list->pg_base_image==1)? "checked='checked'":'' ; ?>/>Base Image </div> </div> <?php } ?> </div> <div class="row"> <div class="col-sm-3"> <label> </label> <div class="form-group"> <input type="submit" name="setBaseImage" value="Submit" id="uploadGallery" class="btn btn-primary pull-left" style="margin-right:10px"> <input type="submit" name="deleteGal" onclick="return confirm('Are you sure want to delete?');" value="Delete" id="uploadGallery" class="btn btn-danger btn-sm"> </div> </div> </div> {{ Form::close() }} <?php } ?> <div class="clearfix"> </div> <?php echo Form::open(array('url' => array('admin/product/update_gallery/'),'files'=>true,'id'=>"uploadGal",'name'=>"uploadGal")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div class="form-group clearfix "> <label>Add Images<span style="color:red">(image size 350*386)</span></label> <input type="File" name="gal_name[]" class="" style="padding-left:0" /> <div class="addVideo"> <span class="btn btn-primary addMore">+ Add More Image </span></div> </div> <div class="row"> <div class="col-sm-2"> <label> </label> <div class="form-group"> <input type="submit" name="creategeneral" value="Submit" id="uploadGallery" class="btn btn-primary"> </div> </div> </div> {{ Form::close() }} </div> </div> <div id="fragment-3"> <div class="box-body"> <?php echo $messages; ?> <?php if(!empty($productPackages)){echo Form::open(array('url' => array('admin/product/delete_pack/'),'files'=>true,'id'=>"delPack",'name'=>"delPack")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div class="row"> <?php foreach($productPackages as $list){ ?> <div class="col-sm-3"> <div class="alignRight"><input type="checkbox" name="delete_pack[]" value="<?php echo $list->pp_id; ?>" /></span></div> <img src="{{asset('assets/uploads/products/small/'.$list->pp_image_name )}}" /> <div><?php echo $list->pp_name .'('.$list->pp_name_arabic . ')' ; ?></div> </div> <?php } ?> </div> <div class="row"> <div class="col-sm-3"> <label> </label> <div class="form-group"> <input type="submit" name="deletePack" onclick="return confirm('Are you sure want to delete?');" value="Delete" id="deletePack" class="btn btn-danger btn-sm"> </div> </div> </div> {{ Form::close() }} <?php } ?> <div class="clearfix"></div> <?php echo Form::open(array('url' => array('admin/product/update_packages/'),'files'=>true,'id'=>"uploadGal",'name'=>"uploadGal")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <label>Add Package</label> <div class="row"> <div class="form-group clearfix"> <div class="col-sm-4"> <div><label>Pckage name</label></div> <input type="text" name="pack_label[]" class="" /> </div> <div class="col-sm-4"> <div><label>Pckage name arabic</label></div> <input type="text" name="pack_label_arabic[]" class="" /> </div> <div class="col-sm-4"> <input type="File" name="pack_name[]" class="" /> </div> </div> </div> <div class="addPackage"> <span class="btn btn-primary addMore">+ Add More Packages </span> </div> <div class="clearfix"> </div> <div class="row"> <div class="col-sm-3"> <label> </label> <div class="form-group"> <input type="submit" name="creategeneral" value="Submit" id="uploadGallery" class="btn btn-primary"> </div> </div> </div> {{ Form::close() }} </div> </div> <div id="fragment-4"> <div class="box-body"> <?php echo $messages; ?> <?php if(!empty($productPdfList)){echo Form::open(array('url' => array('admin/product/delete_download/'),'files'=>true,'id'=>"delPack",'name'=>"delPack")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div class="row"> <?php foreach($productPdfList as $list){ ?> <div class="col-sm-2"> <div class="alignRight"><input type="checkbox" name="delete_download[]" value="<?php echo $list->ppd_id; ?>" /></span></div> <img src="{{asset('assets/uploads/products/pdf/image/small/'.$list->ppd_image_name )}}" /> <div><?php echo $list->ppd_label ; ?></div> <div><?php echo $list->ppd_size ; ?></div> <div><?php echo date("jS F, Y", strtotime($list->ppd_date)); ?></div> </div> <?php } ?> </div> <div class="row"> <div class="col-sm-2"> <label> </label> <div class="form-group"> <input type="submit" name="deleteDownload" onclick="return confirm('Are you sure want to delete?');" value="Delete" id="deleteDownload" class="btn btn-danger btn-sm"> </div> </div> </div> {{ Form::close() }} <?php } ?> <div class="clearfix"></div> <?php echo Form::open(array('url' => array('admin/product/update_download/'),'files'=>true,'id'=>"uploadGal",'name'=>"uploadGal")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <h3>Add Download</h3> <div class="downloadBlock"> <div class="row"> <div class="col-sm-3"> <div><label>Name</label></div> <input type="text" name="pdf_label[]" class="" /> </div> <div class="col-sm-3"> <div><label>Name Arabic</label></div> <input type="text" name="pdf_label_arabic[]" class="" /> </div> <div class="col-sm-3"> <div><label>Image To Display</label></div> <input type="File" name="pdf_image[]" class="" /> </div> <!--<div class="col-sm-3"> <div><label>Size</label></div> <input type="text" name="pdf_size[]" class="" /> </div> --> </div> <div class="row"> <div class="col-sm-3"> <div><label>Category Name</label></div> <select name="pdf_cat_name[]" class="" > <option value="0">Select</option> <?php if(!empty($menuDownloadTree)){ echo get_menu_helper($menuDownloadTree,'option',0,0) ; } ?> </select> </div> <div class="col-sm-3"> <div><label>Upload FILE</label></div> <input type="File" name="pdf_name[]" class="" /> </div> <div class="col-sm-3"> <div><label>Date</label></div> <input type="text" name="pdf_date[]" class="datepicker" /> </div> </div> </div> <div class="addDownload"> <span class="btn btn-primary addMore">+ Add More Download </span></div> <div class="clearfix"> </div> <div class="row"> <div class="col-sm-2"> <label> </label> <div class="form-group"> <input type="submit" name="creategeneral" value="Submit" id="uploadGallery" class="btn btn-primary"> </div> </div> </div> {{ Form::close() }} </div> </div> <div id="fragment-5"> <?php /* if(!empty($relatedProduct)){?> <div class="row"> <?php foreach($relatedProduct as $list){ ?> <div class="col-sm-2"> <?php if(!empty($list->pg_image_name)){ echo '<img src="'.asset('assets/uploads/products/'.$list->pg_image_name).'" width="100" height="80" />'; }else{ echo '<img src="'.asset('assets/images/no_image.gif').'" width="100" height="80" />'; } echo '<div>'.$list->product_title.'</div>'; ?> </div> <?php } ?> </div> <?php }*/ ?> <?php // echo '<pre>';print_r($relatedProduct); ?> <div class="clearfix"></div> <?php //echo get_menu_helper_related($menuProductTree,'option',0,$relatedProduct) ;exit; echo Form::open(array('url' => array('admin/product/update_related_products/'),'files'=>true,'id'=>"uploadGal",'name'=>"uploadGal")); ?> <input type="hidden" name="prd_id" value="<?php echo $rsproducts->product_id ?>" /> <div class="row"> <div class="col-sm-4"> <label>Select Product Category</label> <select name="product_cat_relat[]" data-productId="<?php echo $rsproducts->product_id ?>" id="multiple" multiple class="form-control productCat " > <option value="0">select</option> <?php if(!empty($menuProductTree)){ echo get_menu_helper_related($menuProductTree,'option',0,$relatedProduct) ; } ?> </select> <input type="button" name="loadRelat" id="loadRelat" value="load"/> </div> <div class="clearfix"></div> <div class=" clearfix col-sm-12 productList"> </div> <div class="clearfix"> </div> <div class="row"> <div class="col-sm-2"> <label> </label> <div class="form-group"> <input type="submit" name="creategeneral" value="Submit" class="btn btn-primary"> </div> </div> </div> </div> {{ Form::close() }} </div> </section><!-- /.content --> </aside> <script> $(document).ready( function(){ onloadProduct(); $(document).on('focus',".datepicker_recurring_start", function(){ $(this).datepicker(); }); $('.datepicker').datepicker({dateFormat: 'yy-mm-dd'}); tinymce.init({ mode : "textareas", editor_selector : "mceEditorupdate", relative_urls:false, //plugins: ["link","paste","spellchecker","preview","fullscreen","code","table","filemanager","directionality"], //toolbar: ["fullscreen | undo redo | ltr rtl | filemanager | bullist numlist |styleselect | bold italic | aligncenter alignright alignjustify | link"], plugins: [ "advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste jbimages" ], toolbar: "fullscreen |insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link jbimages", relative_urls: false }); $( "#accordion" ).accordion(); //$('.ProductTab').tabs('enable', 3); var baseURL = $("meta[name='baseurl']").attr("content"); $( "#tabs" ).tabs({ collapsible: false, }); }); </script> <script type="text/javascript"> var baseURL = $("meta[name='baseurl']").attr("content"); $('.addVideo').on('click',function(){ $('.addVideo').before('<div class="row"><div class="galleryFile"><input type="file" name="gal_name[]" class="textlink"/></div><div class="col-sm-2 removeLink alignRight"><i class="fa fa-trash-o"></i></div></div>'); }); $('.form-group').on('click','.removeLink',function(e){ if(confirm('are you sure')==true){ $(this).parent().remove(); } }); $('.addPackage').on('click',function(){ $('.addPackage').before('<div class="row">'+ '<div class="form-group clearfix">'+ '<div class="col-sm-4">'+ '<div><label>Pckage name </label></div>'+ '<input type="text" name="pack_label[]" />'+ '</div>'+ '<div class="col-sm-4">'+ '<div><label>Pckage name arabic</label></div>'+ '<input type="text" name="pack_label_arabic[]" class="" />'+ '</div>'+ '<div class="col-sm-3">'+ '<div><label> </label></div>'+ '<input type="File" name="pack_name[]" class="" />'+ '</div>'+ '<div class="col-sm-1 removePblock alignRight"><i class="fa fa-trash-o"></i></div>'+ '</div>'+ '</div>'); }); $(document).on('click','.removePblock',function(e){ if(confirm('are you sure')==true){ $(this).parent().remove(); } }); $('.addDownload').on('click',function(){ $('.addDownload').before('<div class="downloadBlock"><div class="row">'+ '<div class="col-sm-3">'+ '<div><label>name</label></div>'+ '<input type="text" name="pdf_label[]" class="" />'+ '</div>'+ '<div class="col-sm-3">'+ '<div><label>name arabic</label></div>'+ '<input type="text" name="pdf_label_arabic[]" class="" />'+ '</div>'+ '<div class="col-sm-3">'+ '<div><label>Image To Display</label></div>'+ '<input type="File" name="pdf_image[]" class="" />'+ '</div>'+ /* '<div class="col-sm-3">'+ '<div><label>Size</label></div>'+ '<input type="text" name="pdf_size[]" class="" />'+ '</div>'+ */ '</div>'+ '<div class="row">'+ '<div class="col-sm-3">'+ '<div><label>Category Name</label></div>'+ '<select name="pdf_cat_name[]" class="" >'+ '<option value="0">Select</option>'+ '<?php if(!empty($menuDownloadTree)){echo get_menu_helper($menuDownloadTree,'option',0,0) ;}?>'+ '</select></div>'+ '<div class="col-sm-3">'+ '<div><label>Upload FILE</label></div>'+ '<input type="File" name="pdf_name[]" class="" />'+ '</div>'+ '<div class="col-sm-3">'+ '<div><label>Date</label></div>'+ '<input type="text" name="pdf_date[]" class="datepicker_recurring_start" />'+ '</div>'+ '</div><div class="col-sm-1 removeDblock alignRight"><i class="fa fa-trash-o"></i></div>'+ '</div>'); }); $('#fragment-4').on('click','.removeDblock',function(e){ if(confirm('are you sure')==true){ $(this).parent().remove(); } }); $(document).on('click','#loadRelat',function(e){ dataToSend = {}; //alert($(this).attr('data-productId')); var cur_value = $('option:selected',this).val(); var foo = []; var fooText = []; $('#multiple :selected').each(function(i, selected){ foo[i] = $(selected).val(); fooText[i] = $(selected).text(); }); dataToSend.product = $('#multiple').attr('data-productId'); dataToSend.cat_id = foo; dataToSend.cat_value = fooText; $.ajax({ url: baseURL +"admin/product/load_product", type:'post', data:dataToSend, dataType:'html', statusCode: { 302:function(){ alert('Forbidden. Access Restricted'); }, 403:function(){ alert('Forbidden. Access Restricted','403'); }, 404:function(){ alert('Page not found','404'); }, 500:function(){ alert('Internal Server Error','500'); } } }).done(function(responseData){ $('.productList').html(responseData); }).error(function(jqXHR,textStatus){ }); }); function onloadProduct(){ dataToSend = {}; //alert($(this).attr('data-productId')); var cur_value = $('option:selected',this).val(); var foo = []; var fooText = []; $('#multiple :selected').each(function(i, selected){ foo[i] = $(selected).val(); fooText[i] = $(selected).text(); }); dataToSend.product = $('#multiple').attr('data-productId'); dataToSend.cat_id = foo; dataToSend.cat_value = fooText; $.ajax({ url: baseURL +"admin/product/load_product", type:'post', data:dataToSend, dataType:'html', statusCode: { 302:function(){ alert('Forbidden. Access Restricted'); }, 403:function(){ alert('Forbidden. Access Restricted','403'); }, 404:function(){ alert('Page not found','404'); }, 500:function(){ alert('Internal Server Error','500'); } } }).done(function(responseData){ $('.productList').html(responseData); }).error(function(jqXHR,textStatus){ }); } </script> @include('admin.common.footer')
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel