
					
					
					
					

					
				<?php if( $this->rowProduct['product_front'] == 1 ){ ?>
					<div class="configuratorMenuElement" data-field="frontBox"><?php if( $this->ProductFieldnameInfo['product_fieldname_front'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_front']; else echo @Lib_Lang::translate(front_configurator_front); ?><div class="configuratorMenuElementZR"><?php echo @Lib_Lang::translate(front_configurator_zr); ?></div></div>
					
					
				<div class="configuratorDiv">
				
				
				
				
				
				
				
				
					
				<?php if( $this->rowProduct['product_front'] == 1 ){ ?>
					<div class="configuratorDivElement" id="frontBox">					
						<h4><?php if( $this->ProductFieldnameInfo['product_fieldname_front'] != '' ) echo $this->ProductFieldnameInfo['product_fieldname_front']; else echo @Lib_Lang::translate(front_configurator_front); ?></h4>					
					
					
					<script type="text/javascript" language="javascript">

						$(document).ready(function () {
					
							$(".elementItemFront").click(function(){
								$(".elementItemFront").removeClass('activ');
								$(this).addClass('activ');	
								
							});
					
							$(".elementItemFront").hover(function(){	
								var kids = $(this).children('.elementItemFrontCloud');
								$(kids).show();
							},function(){
								var kids = $(this).children('.elementItemFrontCloud');
								$(kids).hide();
							});
							
							if( $('[name="frontType"]').val() == 'no' ){
								$('.frontTypeRemove').hide();
								$(".elementItemFront").removeClass('activ');
								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'product_front_id';
								var product_value = 'no';
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );

							}else{
								$('.frontTypeRemove').show();							
							}
							
							$('[name="frontType"]').click(function(){							
								if( $(this).val() == 'no' ){
									$('.frontTypeRemove').hide();
									$(".elementItemFront").removeClass('activ');	
								
									var idProduct = <?php echo$this->idProduct;?>;
									var product_field = 'product_front_id';
									var product_value = 'no';
									
									$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );								
								}else{
									$('.frontTypeRemove').show();							
								}								
							});
					
							$(".elementItemRim2").click(function(){
								$(".elementItemRim2").removeClass('activ');
								$(this).addClass('activ');	
								
							});
							

							
								
	function filtrFiltrChange(){
		var f = $('[name="frontType"] option:selected').val();		
		var fl = $('[name="frontType"] option:selected').attr('filtrlist');
		
		$('.filtrfronttype').hide();
		var res = fl.split(",");
		for ( i = 0; i < res.length; i++ ) {
			$('.filtrfronttype.fop'+res[i]).show();
		}
		$('.filtrfronttype.foptionall').show();
				
		$('.elementItemFront').hide();
		$('.elementItemFront[cmd*="fyp'+f+',"]').show();
	

		if( f == 0 || f == 3 ){
			$('div .frontTypeRemove2').show();
		}else{
			$('div .frontTypeRemove2').hide();			
		}	
	}
							
							filtrFiltrChange();
								
							$('[name="frontType"]').change(function(){							
							
								filtrFiltrChange();
								
								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'front_filtr';
								var product_value = $(this).val();
								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );
							
							});
							
							
							$('.filtrfronttype').click(function(){
								var f = $('[name="frontType"] option:selected').val();
								var option = $(this).attr('data-field');
								$('.elementItemFront').hide();
								if( option == 'foptionall' ){	
									$('.elementItemFront[cmd*="fyp'+f+',"]').show();
								}else{
									$('.elementItemFront[cmd*="fyp'+f+',"][cmd*="'+option+',"]').show();
								}							
							});
							
							
							$('[name="frontType2"]').change(function(){								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'front_type_2';
								var product_value = $(this).val();								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );							
							});
							
							
							$('[name="client_info"]').change(function(){								
								var idProduct = <?php echo$this->idProduct;?>;
								var product_field = 'client_info';
								var product_value = $(this).val();								
								$( "#shopProduct" ).load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshop'), 'default', true); ?>", {product_id: idProduct, product_field: product_field, product_value: product_value}, function(){$('#productTable').load( "<?php echo $this->url(array('controller' => 'product', 'action' => 'productshoptable'), 'default', true); ?>", {product_id: <?php echo$this->idProduct; ?>}, function(){} );} );							
							});
							
							
							$('.aFiltrBodyType').click(function(){
								var v = $(this).attr('c');
								$('[name="frontType"] option').prop('selected',false);
								$('[name="frontType"] option[value="'+v+'"]').prop('selected',true);
								
								$('.aFiltrBodyType').removeClass('selected');
								$(this).addClass('selected');
								
								$('[name="frontType"]').click();
								$('[name="frontType"]').change();
							});
							
							
							
						});

					</script>	
					
					
						<div class="row" style="margin:5px;"><?php echo @Lib_Lang::translate(front_configurator_frontdesc); ?></div>
						
						<div class="row" style="margin:5px;">
						
						<table width="100%">
							<tr>
								<td width="">
							<table width="">
							
							
							<tr>							
							<td width="80px"><?php echo @Lib_Lang::translate(front_configurator_fronttypetext); ?></td>
							<td>
							
							<select class="selectFiltrBodyType" name="frontType" style="width:100%;display:none;">
								<option filtrlist="" value="no" <?php if( $this->dataSelect['front_filtr'] == 'no' )echo'selected'; ?>><?php echo @Lib_Lang::translate(front_configurator_fronttypebd); ?></option>
								
								<?php foreach ($this->dataTableMapFiltrFront as $key => $val): ?>
								<option filtrlist="<?php echo Lib_Product::mapfront($val); ?>" value="<?php echo$val['map_filtr_front_index']; ?>" <?php if( $this->dataSelect['front_filtr'] == $val['map_filtr_front_index'] ) echo'selected'; ?>><?php echo @Lib_Lang::translate(front_configurator_fronttype.$val['map_filtr_front_index']); ?></option>
								<?php endforeach; ?>							
							</select>
							
								<a class="aFiltrBodyType <?php if( $this->dataSelect['front_filtr'] == 'no' )echo'selected'; ?>" c="no"><?php echo @Lib_Lang::translate(front_configurator_fronttypebd); ?></a>
							
								<?php foreach ($this->dataTableMapFiltrFront as $key => $val): ?>
									<a class="aFiltrBodyType <?php if( $this->dataSelect['front_filtr'] == $val['map_filtr_front_index'] )echo'selected'; ?>" c="<?php echo$val['map_filtr_front_index']; ?>"><?php echo @Lib_Lang::translate(front_configurator_fronttype.$val['map_filtr_front_index']); ?></a>
								<?php endforeach; ?>							
							
							</td>
							</tr>
							
							</table>
								
								
								</td>
							</tr>
							<tr>
								<td width="">
									<textarea name="client_info" style="width:100%;" class="frontTypeRemove" placeholder="<?php echo @Lib_Lang::translate(front_configurator_addcolor); ?>"><?php echo$this->dataSelect['client_info']; ?></textarea>
								</td>
							</tr>
						</table>
						
						</div>
						
						
						<div class="row frontTypeRemove" style="text-align:center;background-color:#ccc;margin:5px;padding:10px;">
						
							<a href="javascript:void(0);" class="filtrfronttype foptionall" data-field="foptionall"><?php echo @Lib_Lang::translate(front_configurator_front_option_all); ?></a>
						
							<?php for( $i=1; $i<=15; $i++ ){ ?>
							<a href="javascript:void(0);" class="filtrfronttype fop<?php echo$i; ?>" data-field="fpt<?php echo$i; ?>" c="<?php echo$i; ?>"><?php echo @Lib_Lang::translate(front_configurator_front_option.$i); ?></a>
							<?php } ?>
						
						</div>
					
						<div class="row frontTypeRemove" style="margin:5px;overflow-y:scroll;max-height:575px;">
						<?php if( count($this->dataFront) > 0 ){ ?>
						
						<?php foreach ($this->dataFront as $key => $val): ?>
						<div class="elementItem elementItemFront<?php if($val['product_front_id']==$this->dataSelect['product_front_id'])echo' activ';?>" cmd="<?php echo Lib_Product::mapproductfront($val);?>" data-field="product_front_id" data-value="<?php echo$val['product_front_id']; ?>">
							<?php if( $val['product_front_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/front/<?php echo$val['product_front_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 95px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 95px;margin-bottom:3px;">
								</div>
							<?php } ?>
							<center><?php echo @Lib_Lang::consta(product_frontname_.$val['product_front_id']); ?></center>
							<div class="elementItemFrontCloud">
							
							<?php if( $val['product_front_image'] ){ ?>
								<div style="background: url('<?php echo $this->escape($this->baseUrl); ?>/public/uploads/front/<?php echo$val['product_front_image']; ?>.jpeg');background-repeat: no-repeat;background-size:cover;background-position:center;width:100%;height: 250px;margin-bottom:3px;"></div>
							<?php }else{ ?>			
								<div style="width:100%;height: 250px;margin-bottom:3px;">
								</div>
							<?php } ?>
							
							<div style="content: ''; position: absolute; width: 0; height: 0; border: 15px solid;border-color: transparent; border-right-color: #464646; top: 25px; right: 100%; margin-top: -15px;"></div>
							
							
							<div style="padding:5px;">								
								<center><h4><?php echo @Lib_Lang::consta(product_frontname_.$val['product_front_id']); ?></h4></center>
								<?php echo @Lib_Lang::consta(product_frontdescription_.$val['product_front_id']); ?>
							</div>
							
							</div>
						</div>
						<?php endforeach; ?>
						
						<?php }else{ ?>
						<center><?php echo @Lib_Lang::translate(front_element_list_0); ?></center>
						<?php } ?>						
						</div>
						
					
					<?php 
						if(
							$this->rowProduct['product_rim1'] == 1 OR
							$this->rowProduct['product_rim2'] == 1 OR
							$this->rowProduct['product_rim3'] == 1 OR
							$this->rowProduct['product_rim4'] == 1
						){
					?>
					<div class="frontTypeRemove frontTypeRemove2">
						<div class="row" style="background-color:#ccc;margin:5px;padding:10px;">
							<b><?php echo @Lib_Lang::translate(front_configurator_frontrimtext); ?></b>						
						</div>						
						<div class="row" style="margin:5px;">
						
						<?php if( $this->rowProduct['product_rim1'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 1 )echo' activ';?>" data-field="product_rim2_id" data-value="1"><?php echo @Lib_Lang::translate(front_configurator_front_rim1); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim2'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 2 )echo' activ';?>" data-field="product_rim2_id" data-value="2"><?php echo @Lib_Lang::translate(front_configurator_front_rim2); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim3'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 3 )echo' activ';?>" data-field="product_rim2_id" data-value="3"><?php echo @Lib_Lang::translate(front_configurator_front_rim3); ?></div>
						<?php } ?>
						
						<?php if( $this->rowProduct['product_rim4'] == 1 ){ ?>
							<div class="elementItem elementItemRim2<?php if( $this->dataSelect['product_rim2_id'] == 4 )echo' activ';?>" data-field="product_rim2_id" data-value="4"><?php echo @Lib_Lang::translate(front_configurator_front_rim4); ?></div>
						<?php } ?>
						
						
						</div>
					</div>
					<?php } ?>
						
						
						
					
					</div>
				<?php } ?>
				</div>




				
				<?php } ?>