Current File : /home/karenpetzb/application/modules/default/views/scripts/ajax/ajaxcaddy.phtml |
<?php header('Content-type: text/html; charset=iso-8859-1');
$myFacture = $this->myFacture;
if (isset($myFacture) && $myFacture->getNbArticles() == 0) { ?>
<div class="col-xs-12 text-center" style="margin-top: 20px;">Il n'y a aucun article dans votre panier.</div>
<div class="col-xs-12 text-center" style="margin-top: 20px;">
<a data-placement="bottom" class="btn btn-default btn-lg" href="<?php if (isset($this->urlCurrentProduct) && !empty($this->urlCurrentProduct)) { echo $this->urlCurrentProduct; } else { echo $this->baseUrl.'/'; } ?>" >
CONTINUER MES ACHATS
</a>
</div>
<?php } else { ?>
<div class="col-xs-12">
<form id="caddyCheckForm" action="<?php echo $this->baseUrl; ?>/produits/ajaxcheckcaddy/" method="post">
<div style="float: left;width: 100%;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="prod-detail-ref-table">
<thead>
<tr align="center" height="50px" style="background-color: #e7e7e7">
<th class="text-center" style="width: 55%">Produit</th>
<th class="text-center" style="width: 10%">Dispo.</th>
<th class="text-center" style="width: 15%">Prix Unitaire (HT)</th>
<th class="text-center" style="width: 10%">Quantit�</th>
<th class="text-center" style="width: 10%">Prix Total</th>
</tr>
</thead>
<tbody>
<?php
$index = 1;
$i = 0;
$caddyType_first = true;
$isHaveItems = false;
foreach($myFacture->facture_lines as $row) {
if (!$isHaveItems && !$row->isCaddyTypeActif()) { $isHaveItems = true;}
if (($caddyType_first && $row->isCaddyTypeActif()) && $isHaveItems) { $caddyType_first = false;?>
<tr>
<td colspan="5"><div style="background-color: red;clear:both;width: 500px; height: 1px;margin: 5px auto 5px auto;"></div></td>
</tr>
<?php } ?>
<tr align="center" height="25px" style="background-color:<?php if ($index == 0) {echo '#E7E7E7'; $index=1;} else {$index=0; echo '#FFFFFF';} ?>;">
<td width="400px">
<div class="caddyProdImg" >
<?php if (isset($row->item_isAccessoire) && $row->item_isAccessoire == "N") { ?>
<a href="<?php echo $this->baseUrl; ?>/<?php Utils_Tool::getFormattedUrlProduct($row->product_navnom_urlparents, $row->product_navnom, $row->product_id); ?>"
>
<img src="<?php echo $this->baseUrl.'/'.$row->product_url; ?>">
</a>
<?php } ?>
</div>
<div class="caddyProdTxt" >
<div class="link17" style="width: auto;clear:both">
<a href="<?php echo $this->baseUrl; ?>/<?php echo Utils_Tool::getFormattedUrlProduct($row->product_navnom_urlparents, $row->product_navnom, $row->product_id); ?>">
<?php echo $row->item_designation;?>
</a>
</div>
<div class="textA1 productDetail_ref">
<div class="productDetail_ref_label">
<?php echo "Ref. ".$this->escape($row->item_reference); ?>
</div>
<div class="productDetail_ref_selected">
<?php
if (!empty($row->item_selectedOption) && !empty($row->item_optionsByList)) {
$optionsByList = $row->item_optionsByList;
?>
<select name="selectedOption[]" class="selectedOption form-control">
<?php foreach($optionsByList->values as $currentOption) { ?>
<option value="<?php echo $currentOption; ?>" <?php if ($row->item_selectedOption == $currentOption) { echo 'selected="selected"'; } ?> >
<?php echo $currentOption; ?>
</option>
<?php } ?>
</select>
<input type="hidden" name="selectedOptionName[]" value="<?php echo $optionsByList->name; ?>" />
<?php } else { ?>
<input type="hidden" name="selectedOption[]" value="" />
<input type="hidden" name="selectedOptionName[]" value="" />
<?php } ?>
</div>
</div>
</div>
</td>
<td >
<?php if ((int)$row->item_stock == 1) { ?>
<img class="tooltips" alt="Disponible imm�diatement" title="Disponible imm�diatement" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock11.png" class="tooltips">
<?php } else if ((int)$row->item_stock == 2) { ?>
<imgclass="tooltips" alt="Disponible sous 8 jours" title="Disponible sous 8 jours" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock22.png" class="tooltips" >
<?php } else if ((int)$row->item_stock == 3) { ?>
<img class="tooltips" alt="Nous contacter" title="Nous contacter" src="<?php echo $this->baseUrl; ?>/business/image/admin/stock33.png" class="tooltips">
<?php }?>
</td>
<td valign="middle">
<?php $this->currentData = $row;
echo $this->render("/produits/ajaxshowpromopricecaddy.phtml"); ?>
</td>
<td valign="middle" align="center">
<div style="clear:both;width: 90px">
<div class="col-xs-8 noPadding">
<input type="text" class="form-control text-center caddyQuantity" maxlength="6" name="Quantity[]" id="Quantity_<?php echo $row->item_id.'_'.$i; ?>" value="<?php echo $row->item_qte; ?>" />
</div>
<div class="col-xs-4 noPadding">
<a href="javascript:;" onclick="caddyDeleteByModify($(this), '<?php echo $row->item_id.'_'.$i; ?>')">
<img alt="Supprimer" class="tooltips" data-placement="right" title="Supprimer" src="<?php echo $this->baseUrl; ?>/business/image/admin/suppcaddy.png">
</a>
</div>
</div>
<input type="hidden" name="Child[]" value="<?php echo $row->item_id; ?>" />
<input type="hidden" name="QuantityMin[]" value="<?php echo $row->item_qte_min; ?>" />
<input type="hidden" name="Accessoire[]" value="<?php echo $row->item_isAccessoire; ?>" />
<input type="hidden" name="CaddyType[]" value="<?php echo $row->caddytype_id; ?>" />
</td>
<td width="120px" valign="middle">
<div class="textPriceBox" style="margin: 10px 0 0 0; " >
<span>
<?php if (!$row->isSurDevis()) { echo number_format($row->getPrixTotalHT(true), 2, ',', ' ').' €'; } ?>
</span>
</div>
</td>
</tr>
<?php $i++; } ?>
<?php foreach($myFacture->facture_fidelite_lines as $row) {
if ($row->isFideliteGift()) { ?>
<tr>
<td colspan="3">
<div style="font-weight: bold;margin:10px;">
<?php echo 'Carte de fid�lit� : '.$row->fidelite_nom.' ('.$row->fidelite_nbpoint.' points)'; ?>
</div>
</td>
<td style="text-align:right">
<a href="<?php echo $this->baseUrl; ?>/user/deletecaddyfidelitypoint/id/<?php echo $row->fidelite_id; ?>" >
<img alt="Supprimer" class="tooltips" data-placement="right" title="Supprimer" src="<?php echo $this->baseUrl; ?>/business/image/admin/suppcaddy.png">
</a>
</td>
<td></td>
</tr>
<?php } } ?>
</tbody>
</table>
</div>
</form>
</div>
<div class="col-xs-12" >
<div class="col-sm-6 col-xs-12">
<?php if (!isset($this->isCommandValid)) { ?>
<div class="textA4" style="clear: both;margin: 20px 0 0 0;">
Vous b�n�ficiez d'un code de r�duction ?
</div>
<div id="labelCodeReduc" class="caddyLabelReduc">
<?php if (isset($this->messageSuccessReduc)) {
if ($this->messageSuccessReduc == "OK") { ?>
<span class="messageSuccess"><?php echo $this->messageMessReduc ?></span>
<?php } else { ?>
<span class="messageError"><?php echo $this->messageMessReduc; ?></span>
<?php }
} ?>
</div>
<div style="clear: both;text-align: center;width: 100%">
<div class="textA2" style="float: left;margin: 15px 0 0 30px">Saisissez-le ici : </div>
<div style="float: left; margin: 10px 0 0 10px"><input class="form-control" type="text" name="caddyCodeReduc" id="caddyCodeReduc"></div>
<div style="float: left;margin: 0 0 0 10px">
<?php if (isset($myFacture->code_reduction) && !empty($myFacture->code_reduction)) { ?>
<input type="image" id="submitCodeReduc" src="<?php echo $this->baseUrl; ?>/business/image/admin/btnok.png" >
<?php } else { ?>
<input type="image" id="submitCodeReduc" src="<?php echo $this->baseUrl; ?>/business/image/admin/btnnon.png" >
<?php } ?>
</div>
</div>
<?php } ?>
</div>
<div class="col-sm-6 col-xs-12" style="padding-right: 0;">
<div style="float: right;">
<div class="caddyPrice1 textA3" >Total HR / HT</div>
<div class="caddyPrice2" >
<div class="textPriceBox">
<span><?php echo number_format($myFacture->total_HT_HR, 2, ',', ' '); ?> €</span>
</div>
</div>
</div>
<div style="float: right;">
<div class="caddyPrice1 textA3" style="color: #1d7f0d; ">Remises sp�cifiques <?php if (isset($myFacture->code_reduction) && !empty($myFacture->code_reduction) ) { echo " ( ".$myFacture->code_reduction['CODE']." ) "; } ?></div>
<div class="caddyPrice2" >
<div class="textPriceBox" >
<span><?php echo number_format($myFacture->getPrixRemise(), 2, ',', ' ') ; ?> €</span>
</div>
</div>
</div>
<div style="float: right;">
<div class="caddyPrice1 textA3" >
Frais de port
</div>
<div class="caddyPrice3" >
<div class="textPriceBox">
<span id="showLivraison" > <?php echo number_format($myFacture->total_frais_port, 2, ',', ' '); ?> €</span>
</div>
</div>
</div>
<div style="float: right;">
<div class="caddyPrice1 textA3" style="color: #ff0000; height: 31px">TOTAL HT</div>
<div class="caddyPrice2 textA3" style="color: #ff0000; height: 31px;padding: 5px 0 5px 0; ">
<div class="textPriceBoxHT" >
<span id="showTotalHT"><?php echo number_format($myFacture->total_HT_FP, 2, ',', ' '); ?> €</span>
</div>
</div>
</div>
</div>
</div>
<?php if (isset($this->isCommandValid)) { ?>
<div class="col-xs-6 col-xs-offset-3 alert alert-danger text-center" style="margin-bottom: 0px;" >
<?php echo $this->isCommandValid; ?>
</div>
<?php }
if (isset($this->resteFrancoLiv)) { ?>
<div class="col-xs-6 col-xs-offset-3 alert alert-danger text-center" style="margin-bottom: 0px;" >
<?php echo $this->resteFrancoLiv; ?>
</div>
<?php } ?>
<div id="caddyCheckFormLog" class="col-xs-12" style="min-height: 72px;"> </div>
<div class="col-xs-12" style="margin-bottom: 40px;">
<div class="col-md-3 col-sm-6 text-center">
<input type="button" style="margin-top: 5px; margin-bottom: 5px" class="btn btn-default btn-block" data-placement="bottom" value="CALCULER MON PANIER" id="caddySubmitValid" />
</div>
<div class="col-md-3 col-sm-6 text-center">
<a style="margin-top: 5px; margin-bottom: 5px" data-placement="bottom" class="btn btn-default btn-block" href="<?php if (isset($this->urlCurrentProduct) && !empty($this->urlCurrentProduct)) { echo $this->urlCurrentProduct; } else { echo $this->baseUrl.'/'; } ?>" >
CONTINUER MES ACHATS
</a>
</div>
<div class="col-md-3 col-sm-6 text-center">
<a title="Pour r�aliser un devis" data-placement="bottom" class="tooltips btn btn-primary btn-lg btn-block caddy-link" href="<?php echo $this->baseUrl; ?>/mon-panier-livraison.html" >
DEVIS
</a>
</div>
<?php if (!isset($this->isCommandValid)) { ?>
<div class="col-md-3 col-sm-6 text-center">
<a title="Pour passer une commande" data-placement="bottom" class="tooltips btn btn-success btn-lg btn-block caddy-link" href="<?php echo $this->baseUrl; ?>/mon-panier-livraison.html" >
COMMANDER
</a>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if ($this->isCarteFideliteEnable && isset($this->myCaddyFideliteAvailable)) { ?>
<div class="col-xs-12" style="padding-bottom:150px;">
<h3>Carte de fid�lit� <a class="btn btn-primary" href="<?php echo $this->baseUrl; ?>/mon-compte.html#cartefidelite" ><span class="fa fa-user"></span> MES POINTS<?php if (isset($this->myUserFideliteInfo)) {echo ' : '.$this->myUserFideliteInfo['POINTFIDELITETOTAL']; }?></a></h3><hr/>
<?php
foreach($this->myCaddyFideliteAvailable as $row) { ?>
<div class="col-md-12">
<h4><?php echo $row['TITRE'];?> : <?php echo $row['POINTFIDELITE'];?> points</h4>
</div>
<div class="col-md-12" style="padding:10px">
<div class="col-md-10">
<?php echo $row['CONTENT'];?>
</div>
<div class="col-md-2">
<a class="btn btn-success" href="<?php echo $this->baseUrl; ?>/user/addcaddyfidelitypoint/id/<?php echo $row['ID']; ?>" ><span class="fa fa-plus-circle"></span> AJOUTER AU PANIER</a>
</div>
</div>
<?php }?>
<?php
foreach($this->myCaddyFideliteAllExceptCurrents as $row) { ?>
<div class="col-md-12">
<h4><?php echo $row['TITRE'];?> : <?php echo $row['POINTFIDELITE'];?> points</h4>
</div>
<div class="col-md-12" style="padding:10px">
<div class="col-md-10">
<?php echo $row['CONTENT'];?>
</div>
<div class="col-md-2">
<a class="btn btn-success" disabled="disabled" href="<?php echo $this->baseUrl; ?>/user/addcaddyfidelitypoint/id/<?php echo $row['ID']; ?>" ><span class="fa fa-plus-circle"></span> AJOUTER AU PANIER</a>
</div>
</div>
<?php }?>
</div>
<?php } ?>