Current File : /home/karenpetzb/application/modules/default/views/scripts/produits/detail.phtml

<?php
	$product = $this->detailProduct;
	$userNamespace = new Zend_Session_Namespace($this->session_variable);
	$myCaddy = $userNamespace->myObjectCaddy;
	$nbOption = 3;

    $auth = Zend_Auth::getInstance();
	$auth->setStorage(new Zend_Auth_Storage_Session($this->session_storage));
	$storage = $auth->getStorage()->read(); 

?>	

<?php if (Utils_Tool::isMobile()) { ?>
	  <?php echo $this->render("/produits/detailmobile.phtml"); ?>
<?php } else { ?>

<?php if ($this->prefixPromoClass == "eco-") { ?>
<style type="text/css">

html, body {
	background: url('/business/image/eco-bg1.jpg') no-repeat top center;
	background-color: #21530d;
	-webkit-background-size: cover; 
    -moz-background-size: cover;   
    -o-background-size: cover;   
    background-size: cover;  
}
.wrapBgContent-l,
.wrapBgContent-r {
	background:none;
}
.wrapBgContent-1 {
  -webkit-box-shadow: 0px 0px 30px rgba(0, 0, 0, 1);
          box-shadow: 0px 0px 30px rgba(0, 0, 0, 1);
}

.wrapBgContent-2 {
  -webkit-box-shadow: 0px 20px 30px rgba(0, 0, 0, 1);
          box-shadow: 0px 20px 30px rgba(0, 0, 0, 1);
}

</style>
<?php } ?>
 
<div >
    
	<?php echo $this->render("/produits/ajaxdownloaddocument.phtml"); ?>
	<?php echo $this->render("/produits/ajaxsendfriend.phtml"); ?>
</div>

<div class="col-xs-12 prod-detail-box" itemscope itemtype="http://schema.org/Product">
	<div class="col-xs-12 prod-detail-title-box noPadding">
		<?php 
		$colTitle = "col-xs-12";
		if (!empty($product['DOCNAME']) && !empty($product['DOCURL'])) { 
			$colTitle = "col-xs-10";
		} ?> 
			
		<div class="<?php echo $colTitle?> noPadding">
			<h1 class="prod-detail-title "  itemprop="name">
				<?php echo $this->escape($product['NOM']); ?>
			</h1>
		</div>

        <?php  if (!empty($product['DOCNAME']) && !empty($product['DOCURL'])) { 
            if (($auth->hasIdentity() && isset($storage['user'])) || !$this->FeatureProductDocumentDownloadGuest) { ?>
			    <div class="col-xs-2 noPadding">
				    <div style="float: left;" class=" hidden-xs hidden-sm">			
					    <div class="prod-detail-document" style="width: 100px;">					
						    <a href="<?php echo $this->baseUrl.'/'.$this->escape($product['DOCURL']); ?>" target="_blank">
							    <span > 
								    <?php echo $this->escape($product['DOCNAME']); ?>
							    </span>
						    </a>
					    </div>
				    </div>
				    <div class="prod-detail-document prod-detail-document-pic">
					    <a style="line-height: 50px;" class="tooltips" data-placement="bottom" title="<?php echo $this->escape($product['DOCNAME']); ?>" href="<?php echo $this->baseUrl.'/'.$this->escape($product['DOCURL']); ?>" target="_blank">
						    <img src="<?php echo $this->baseUrl; ?>/business/image/icon-pdf.png" alt="<?php echo $this->escape($product['DOCNAME']); ?>">	
					    </a>
				    </div>
			    </div>
		    <?php } else if ($this->FeatureProductDocumentDownloadGuest) { ?>
                <div class="col-xs-2 noPadding">
				    <div style="float: left;" class=" hidden-xs hidden-sm">			
					    <div class="prod-detail-document" style="width: 100px;">					
						    <a href="#dialog-form-doc" class="popup-with-form-doc" >
							    <span > 
								    <?php echo $this->escape($product['DOCNAME']); ?>
							    </span>
						    </a>
					    </div>
				    </div>
				    <div class="prod-detail-document prod-detail-document-pic">
					    <a style="line-height: 50px;" class="tooltips popup-with-form-doc"  data-placement="bottom" title="<?php echo $this->escape($product['DOCNAME']); ?>" href="#dialog-form-doc" >
						    <img src="<?php echo $this->baseUrl; ?>/business/image/icon-pdf.png" alt="<?php echo $this->escape($product['DOCNAME']); ?>">	
					    </a>
				    </div>
			    </div>
        <?php } } ?> 
	</div>
	<div class="col-xs-12 noPadding prod-detail-mid-box">
		<div class="col-md-6 col-xs-12 prod-detail-pics-box noPadding">
			<div class="pikachoose" >
				<ul id="pikame" class="jcarousel-skin-pika">
				<?php    foreach ($product['LISTPICS'] as $pic) { ?>
					<li><a data-fancybox-group="prodpicdetail" href="<?php echo $this->baseUrl.'/'.$pic['URL']; ?>" title="<?php echo $this->escape($pic['STRING1'].' '.$pic['STRING2']) ; ?>"><img itemprop="image" src="<?php echo $this->baseUrl.'/'.$pic['URL']; ?>" style="height: 300px"/></a><span><?php if (!empty($pic['STRING1'])) {  
										echo $pic['STRING1'].'<br/>';
									} if (!empty($pic['STRING2'])) {  
										echo $pic['STRING2'] ;
									} ?></span></li>
				<?php } ?>
				</ul>
			</div>
		</div>
		<div class="col-md-6 col-xs-12 noPadding prod-detail-info-box"  >		
			<div class="col-xs-12 prod-detail-info-box-content">
				<input type="hidden" id="isEcoDurable" value="<?php echo $this->prefixPromoClass;?>">
				<div>
  					<a href="#1" class="btn btn-tab-link <?php if(empty($this->prefixPromoClass)) { echo "btn-danger"; } else { echo "btn-success";} ?> btn-tab-default-active" data-liquidslider-ref="prod-info-slider-id">Description</a>
					<?php 
					$count = 2;
					if (!empty($product['DESCTECH'])) { ?>
 					<a href="<?php echo '#'.$count; ?>" class="btn btn-tab-link btn-tab-default-link" data-liquidslider-ref="prod-info-slider-id">Informations techniques</a>
					<?php $count++;} 
					if (!empty($product['DESCNORME'])) { ?>
					<a href="<?php echo '#'.$count; ?>" class="btn btn-tab-link btn-tab-default-link" data-liquidslider-ref="prod-info-slider-id">Normes</a>
					
						<?php } ?>
				</div>
			
				<div class="liquid-slider liquid-slider-product-info" id="prod-info-slider-id">				
				     <div>
	      				<?php echo $product['DESCLONG']; ?>
	      			</div>      			
						<?php if (!empty($product['DESCTECH'])) { ?>
						  <div>
		      				<?php echo $product['DESCTECH']; ?>
		      			</div>
						<?php } if (!empty($product['DESCNORME'])) { ?>
						  <div>
			      				<?php echo $product['DESCNORME']; ?>
			      			</div>
						<?php } ?>
						
				</div>
			</div>
			
			<div class="prod-detail-price"  itemprop="offers" itemscope itemtype="http://schema.org/Offer">
					<?php if ($product['isDEVISPRODUCT'] == 1) { ?>
          <meta itemprop="priceCurrency" content="EUR" />
          <meta itemprop="price" content="<?php echo number_format($product['PRIXLOWEST'], 2, ',', ' '); ?>" /> 
					<div class="productPriceDetailBox" >
						<span class="<?php echo $this->prefixPromoClass; ?>productPriceTitle" style="float: right;" >� partir de</span><br />
						<span class="<?php echo $this->prefixPromoClass; ?>productPriceDetail" ><?php echo number_format($product['PRIXLOWEST'], 2, ',', ' ').' '; ?> &#8364;</span>
						<span class="<?php echo $this->prefixPromoClass; ?>productPriceDetailHT"  style="float: right;" > HT</span>
					</div>
					<?php } else { ?>
					<div class="productPriceDetailBox">
						<span  class="<?php echo $this->prefixPromoClass; ?>productPriceTitle" style="margin-left: 10px; margin-top: 5px">Sur devis</span>
					</div>
					<?php } ?>
			</div>
      
		 	<div class="col-xs-12 " >
				<?php if (!empty($product['STOCK']) && !empty($product['STOCK']) && !$this->isProductOutOfStock) { ?>
				<div class="<?php echo $this->prefixPromoClass; ?>prod-detail-liv-title">D�lais de livraison
					<?php if ((int)$product['STOCK'] == 1) { ?>
					<img class="tooltips" alt="Disponible imm�diatement" title="Disponible imm�diatement" src="<?php echo $this->baseUrl; ?>/business/image/stock111.png">
					<?php } else if ((int)$product['STOCK'] == 2) { ?>
					<img class="tooltips" alt="Disponible sous 8 jours" title="Disponible sous 8 jours" src="<?php echo $this->baseUrl; ?>/business/image/stock222.png">
					<?php } else if ((int)$product['STOCK'] == 3) { ?>
					<img class="tooltips" alt="Nous contacter" title="Nous contacter" src="<?php echo $this->baseUrl; ?>/business/image/stock333.png">
					<?php }?> 
				</div>
				<?php } ?>
			</div>
		</div> 
	</div>
	
		
			<div class="col-xs-12 noPadding" style="margin-bottom: 5px;">	
				<div  class="col-sm-6 col-xs-12 noPadding "> 
					<?php if ($this->escape($product['BRENDURL']) && $product['isSHOWBREND'] == 0) {?>
           <meta itemprop="brand" content="<?php echo $this->escape($product['BREND']); ?>" />

					<img class="prod-detail-brend tooltips" title="<?php echo $this->escape($product['BREND']); ?>" src="<?php echo $this->baseUrl.'/'.$product['BRENDURL']; ?>" alt="<?php echo $product['BREND']; ?>" title="<?php echo $product['BREND']; ?>" />
					<?php } ?> 
					<?php if ($product['isQTEPRIXACTIVE']) { ?>
					<img class="tooltips" data-placement="right" alt="D�couvrez nos prix d�gressif" title="D�couvrez nos prix d�gressif" src="<?php echo $this->baseUrl; ?>/business/image/degressif2.png">
					<?php } ?>
				</div>
				<div  class="col-sm-6 col-xs-12">
          <?php $url = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]; ?>
          <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url; ?>" class="btn btn-facebook"><i class="fa fa-facebook"></i></a>
          <a target="_blank" href="https://plus.google.com/share?url=<?php echo $url; ?>" class="btn btn-google-plus"><i class="fa fa-google-plus"></i></a>
          <a target="_blank" href="https://twitter.com/home?status=<?php echo $url; ?>" class="btn btn-twitter"><i class="fa fa-twitter"></i></a>
          <a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=<?php echo $url; ?>&title=<?php echo utf8_encode($this->escape($product['NOM'])); ?>&summary=<?php echo utf8_encode($this->escape($product['DESCSHORT'])); ?>&source=<?php echo $this->baseUrl_SiteCommerceUrl; ?>" class="btn btn-linkedin"><i class="fa fa-linkedin"></i></a>
        
         <?php  if ($this->FeatureProductSendDetail) { ?>
            <a href="#dialog-form-send-friend" class="btn btn-default popup-with-form-send-friend"><i class="fa fa-envelope"></i> Conseillez cet article</a>
         <?php  } ?>
          
        </div> 
			
			</div>

  <form id="productAddForm" action="<?php echo $this->baseUrl; ?>/produits/ajaxaddpanier/<?php echo $product['NAVNOM']; ?>/p/<?php echo $product['ID']; ?>" method="post">
    
    <div class="col-xs-12 noPadding prod-detail-buy text-right">
      <?php if (!$this->isProductOutOfStock) { ?> 
          <div class=" col-xs-12 noPadding">
            <div id="detailAddInfo" style="display:none" class="detailAddInfoContent"></div>
          </div>
          <button type="submit" class="btn btn-success btn-lg">
            <img id="prod-detail-add-btn" src="<?php echo $this->baseUrl; ?>/business/image/add-caddy.png" class="glyphicon-caddy" /> AJOUTER AU PANIER
          </button>
      <?php } else { ?>
        <span class="btn btn-success btn-lg">Le produit est �puis�</span>
      <?php } ?>
    </div>

  <div class="col-xs-12 noPadding">

			<div class="col-xs-12 noPadding">
				<input type="hidden" name="idProd" id="idProd" value="<?php echo $this->escape($product['ID']); ?>" />
          <h2 class="prod-detail-desc"  itemprop="description">
            <b>Descriptif : </b>
            <?php echo strip_tags($product['DESCSHORT']); ?>
          </h2>
				<table border="0" cellpadding="0" cellspacing="0" width="100%" class="prod-detail-ref-table">
					<thead>
					<tr >
						<th class="textTh1" style="text-align: center;" >Produit</th>
							
						<?php for($i=0 ; $i < $nbOption; $i++) { 
						if (isset($product['LISTOPTION'][$i]) && isset($product['LISTOPTION'][$i]['NOMOPTION']) ) {
							?>
						<th  class="textTh1 productDetail_option" > 
							<?php echo $this->escape($product['LISTOPTION'][$i]['NOMOPTION']); ?>
						</th>
						<?php }
						} ?>
						<?php  if ($product['ONSELECT_IDOPTION'] > 0  && !empty($product['ONSELECT_OPTION'])) { ?>
						<th  class="textTh1 productDetail_option" > 	
						 	<?php $currentOption = $product['ONSELECT_OPTION'];
								echo $currentOption->name;
							 ?>
						</th>
						<?php } ?>
						<th  class="textTh1" style="text-align: center;" width="130px" nowrap="nowrap">Prix Unitaire (HT)</th>
            <?php if (!$this->isProductOutOfStock) { ?>
						<th  class="textTh1 hidden-print" id="qteTableHeader" width="100px" style="text-align: center">Quantit�</th>
            <?php } ?>
					</tr>
					</thead>
					<tbody>
					<?php 
					$index = 1;
					$count = 0; 
					if (sizeof($product['LISTCHILD']) > 0) { 
						foreach($product['LISTCHILD'] as $child) {  ?>
						<tr align="center" class="<?php if ($index == 0) {echo 'trStripOdd'; $index=1;} else {$index=0; echo 'trStripEven';} ?>" >
																
							<td>
								<?php 
									$isFTFDS = false;
									if ($this->listFTFDS) {
									foreach($this->listFTFDS as $rowFTFDS) { 
										if ($rowFTFDS['ID_CHILD'] == $child['ID']) { ?>
									<div class="prod-detail-document" style="float: left;margin: 10px;" >
                                      <?php  if (($auth->hasIdentity() && isset($storage['user'])) || !$this->FeatureProductDocumentDownloadGuest) { ?>
			        					<a class="tooltips" data-placement="bottom" title="Voir la fiche technique et donn�es de s�curit�" href="<?php echo $this->baseUrl.'/'.$rowFTFDS['URL']; ?>" target="_blank">
											<img src="<?php echo $this->baseUrl; ?>/business/image/icon-pdf.png" alt="Voir la fiche technique et donn�es de s�curit�">	
										</a>
                                      <?php  } else if ($this->FeatureProductDocumentDownloadGuest) { ?>
										<a class="tooltips popup-with-form-doc" data-placement="bottom" title="Voir la fiche technique et donn�es de s�curit�" href="#dialog-form-doc" >
											<img src="<?php echo $this->baseUrl; ?>/business/image/icon-pdf.png" alt="Voir la fiche technique et donn�es de s�curit�">	
										</a>
                                      <?php  } ?>
                                         
                                         
									</div>
									<?php }}} ?>
									
									<div style="float: left;">
										<div class="textA1" style="width: auto;"> 
											<?php echo $child['DESIGNATION'];?>
										</div>
										<div class="textA1 productDetail_ref" >
											<div style="float: left;margin: 5px 0 5px 0">
												<?php echo "Ref. ".$this->escape($child['REFERENCE']); ?>
											</div>
											<?php if ($child['isQTEPRIXACTIVE'] && $child['QTEPRIXITEM'] > 0) { ?>
											<div style="float: right;margin: 0 10px 5px 0">
												<a class="btn <?php if(empty($this->prefixPromoClass)) { echo "btn-danger"; } else { echo "btn-success";} ?> tooltips showModalPrice" data-placement="right" href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlProduct($product['NAVNOM_URLPARENTS'], $product['NAVNOM'], $product['ID']); ?>" title="Nos prix d�gressif" id="item-<?php echo $child['ID']; ?>-<?php echo $child['QTEPRIXITEM'];?>">
													Prix d�gressif
												</a>
							 				</div>
											<?php } ?>
										</div>
									</div>
							</td>
							<?php for($i=0 ; $i < $nbOption; $i++) { 
							if (isset($product['LISTOPTION'][$i]) && isset($product['LISTOPTION'][$i]['NOMOPTION'])) { ?>
							<td class="textTd1 ">
								<?php 
								 if (isset($child['OPTION_VALUES'][$product['LISTOPTION'][$i]['IDOPTION']])) {echo $this->escape($child['OPTION_VALUES'][$product['LISTOPTION'][$i]['IDOPTION']]['OPTIONVALUE']); } 
								?> 
							</td>
							<?php } } ?>
							
							<?php  if ($product['ONSELECT_IDOPTION'] > 0  && !empty($product['ONSELECT_OPTION'])) { ?>
							<td  class="textTh1" > 	
							 	<select name="selectedOption_<?php echo $count; ?>" class="selectedOption form-control">
									<?php 
									$optionsList = $product['ONSELECT_OPTION'];
									foreach($optionsList->values as $currentOption) {  ?>
									<option value="<?php echo $currentOption; ?>">
										<?php echo $currentOption; ?> 
									</option>
									<?php } ?>
								</select> 
							</td>
							<?php } ?>
							
							
							<td align="center" >
							<?php $this->currentData = $child;
								echo $this->render("/produits/ajaxshowpromoprice.phtml"); ?>
							</td>
              <?php if (!$this->isProductOutOfStock) { ?>
							<td class="textTd1  hidden-print" >
								<div class="col-md-8 col-md-offset-2 noPadding">
								<?php  
									if (isset($myCaddy->items))  {
										$myValue = $myCaddy->getQuantity($child['ID']);
									}
								
									?>
									<input onclick="clearById('quantity_<?php echo $this->escape($child['ID']); ?>', '0')" type="text" class="form-control text-center" maxlength="5" name="quantity_<?php echo $this->escape($child['ID']); ?>" id="quantity_<?php echo $this->escape($child['ID']); ?>" value="<?php echo $myValue; ?>" />
									<input type="hidden" name="idChild_<?php echo $count; ?>" value="<?php echo $this->escape($child['ID']); ?>" />
									<input type="hidden" name="qtyMinChild_<?php echo $count; ?>" value="<?php echo $this->escape($child['QUANTITYMIN']); ?>" />
									<input type="hidden" name="isAccessoire_<?php echo $count; ?>" value="N" >
								</div>
							</td>
              <?php } ?>
						</tr>
						<?php $count++; } }
						
						
						
						if (sizeof($product['PRODUCT_ACCESSOIRE']) > 0) {  
					foreach ($product['PRODUCT_ACCESSOIRE']  as $child ) { ?>
					<tr align="center" class="<?php if ($index == 0) {echo 'trStripOdd'; $index=1;} else {$index=0; echo 'trStripEven';} ?>"  >
																
							<td>
									<div style="float: left;">
										<div class="textA1" style="width: auto;"> 
											<?php echo $child['DESIGNATION'];?>
										</div>
										<div class="textA1 productDetail_ref" >
											<div style="float: left;margin: 5px 0 5px 0">
												<?php echo "Ref. ".$this->escape($child['REFERENCE']); ?>
											</div>
											<?php if ($child['isQTEPRIXACTIVE'] && $child['QTEPRIXITEM'] > 0) { ?>
											<div style="float: right;margin: 0 10px 5px 0">
												<a class="btn <?php if(empty($this->prefixPromoClass)) { echo "btn-danger"; } else { echo "btn-success";} ?> tooltips showModalPrice" data-placement="right" href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlProduct($product['NAVNOM_URLPARENTS'], $product['NAVNOM'], $product['ID']);?>" title="Nos prix d�gressif" id="item-<?php echo $child['ID']; ?>-<?php echo $child['QTEPRIXITEM'];?>">
													Prix d�gressif
												</a>
							 				</div>
											<?php } ?>
										</div>
									</div>
							</td>
							<?php for($i=0 ; $i < $nbOption; $i++) { 
							if (isset($product['LISTOPTION'][$i]) && isset($product['LISTOPTION'][$i]['NOMOPTION'])) { ?>
							<td class="textTd1">
								<?php 
								 if (isset($child['OPTION_VALUES'][$product['LISTOPTION'][$i]['IDOPTION']])) {echo $this->escape($child['OPTION_VALUES'][$product['LISTOPTION'][$i]['IDOPTION']]['OPTIONVALUE']); } 
								?> 
							</td>
							<?php } } ?>
							
							<?php  if ($product['ONSELECT_IDOPTION'] > 0  && !empty($product['ONSELECT_OPTION'])) { ?>
							<td  class="textTh1" > 	
							 	<select name="selectedOption_<?php echo $count; ?>" class="selectedOption form-control">
									<?php 
									$optionsList = $product['ONSELECT_OPTION'];
									foreach($optionsList->values as $currentOption) {  ?>
									<option value="<?php echo $currentOption; ?>">
										<?php echo $currentOption; ?> 
									</option>
									<?php } ?>
								</select> 
							</td>
							<?php } ?>
							
							<td align="center" >
							<?php $this->currentData = $child;
								echo $this->render("/produits/ajaxshowpromoprice.phtml"); ?>
							</td>
            <?php if (!$this->isProductOutOfStock) { ?>
							<td class="textTd1  hidden-print" >
								<div class="col-md-8 col-md-offset-2 noPadding">
								<?php  
									if (isset($myCaddy->items))  {
										$myValue = $myCaddy->getQuantity($child['ID']);
									}
								
									?>
									<input onclick="clearById('quantity_<?php echo $this->escape($child['ID']); ?>', '0')" type="text" class="form-control text-center" maxlength="5" name="quantity_<?php echo $this->escape($child['ID']); ?>" id="quantity_<?php echo $this->escape($child['ID']); ?>" value="<?php echo $myValue; ?>" />
									<input type="hidden" name="idChild_<?php echo $count; ?>" value="<?php echo $this->escape($child['ID']); ?>" />
									<input type="hidden" name="qtyMinChild_<?php echo $count; ?>" value="<?php echo $this->escape($child['QUANTITYMIN']); ?>" />
									<input type="hidden" name="isAccessoire_<?php echo $count; ?>" value="Y" >
								</div>
							</td>
            <?php } ?>
						</tr>
					<?php $count++; }}  ?>
					</tbody>
				</table>
				<input type="hidden" name="nbr" value="<?php echo $count; ?>" />
			</div>
			<div class="col-xs-12 noPadding">
			
				<div class="<?php echo $this->prefixPromoClass; ?>prod-detail-caracs col-sm-6 col-xs-12">
					<a class="showModalDetail tooltips" data-placement="bottom" data-nbrchilds="<?php echo $count;?>" href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlProduct($product['NAVNOM_URLPARENTS'], $product['NAVNOM'], $product['ID']);?>" title="Voir toutes les caract�ristiques - <?php echo $this->escape($product['NOM']); ?>">Voir toutes les caract�ristiques</a>
				</div>
				
				
				<div id="productAddFormLog"> </div>
			</div>
  </div>
  </form>
</div>

	<?php echo $this->render("/produits/ajaxannexelist.phtml"); ?>
<script type="text/javascript">
$(function(){
	initEventDetail(); 
}); 
</script> 
<?php } ?>