

<?php if( $this->error_product_shelf == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_shelf); ?></div>
	
<?php }else if( $this->error_product_body == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_body); ?></div>

<?php }else if( $this->error_product_front == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_front); ?></div>

<?php }else if( $this->error_product_type == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_type); ?></div>

<?php }else if( $this->error_product_accessories == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_accessories); ?></div>

<?php }else if( $this->error_product_legs == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_legs); ?></div>

<?php }else if( $this->error_product_handles == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_handles); ?></div>

<?php }else if( $this->error_product_options == true ){ ?>

	<div class="errorConf"><?php echo @Lib_Lang::translate(front_configurator_errorData_options); ?></div>

<?php }else{ ?>

	<div class="priceConf"><?php echo number_format($this->cena_calkowita, 2, ',', ' '); ?> zł</div>
	
	
	
	
	
	
<?php if( $this->basket_edit == false ){ ?>	
	
	
	
	<div class="amountConf">

<script type="text/javascript" language="javascript">
	
	

	$(document).ready(function () {
	
		$('#minus').click(function(){
			var i = parseInt($('#amount').val()) - 1;
			if( i > 0 ) $('#amount').val(i);
		});
	
		$('#plus').click(function(){
			var i = parseInt($('#amount').val()) + 1;
			if( i < 11 ) $('#amount').val(i);
		});
		
		
		$('#addProduct').click(function(){
			$("#shopInfo").load("<?php echo $this->url(array('controller' => 'shop', 'action' => 'shopinfo'), 'default', true); ?>",{operation: 'addproduct', idProduct: <?php echo$this->idProduct; ?>, amount: parseInt($('#amount').val())},function(){
				window.location.href = '#';
			});
		});
	
	});

</script>		

		<button id="minus">-</button>
		<input id="amount" style="width:30px;text-align:center;" value="1" disabled="disabled" />
		<button id="plus">+</button>
	</div>
	<div class="addConf"><button id="addProduct">DODAJ</button></div>
	
	
	
<?php }else{ ?>
	
	
	
	<div class="amountConf">

<script type="text/javascript" language="javascript">
	
	

	$(document).ready(function () {
	
		$('#minus').click(function(){
			var i = parseInt($('#amount').val()) - 1;
			if( i > 0 ) $('#amount').val(i);
		});
	
		$('#plus').click(function(){
			var i = parseInt($('#amount').val()) + 1;
			if( i < 11 ) $('#amount').val(i);
		});
		
		
		$('#editProduct').click(function(){
			$("#shopInfo").load("<?php echo $this->url(array('controller' => 'shop', 'action' => 'shopinfo'), 'default', true); ?>",{operation: 'editproduct', idProduct: <?php echo$this->idProduct; ?>, idBasket: <?php echo$this->basketid; ?>, amount: parseInt($('#amount').val())},function(){
				window.location.href = '#';
			});
		});
	
	});

</script>		

		<button id="minus">-</button>
		<input id="amount" style="width:30px;text-align:center;" value="<?php echo$this->amount; ?>" disabled="disabled" />
		<button id="plus">+</button>
	</div>
	<div class="addConf"><button id="editProduct">EDYTUJ</button></div>
	
	
	

<?php } ?>	
	
	
	
	
	

<?php } ?>

