42 lines
1.9 KiB
PHP
Executable File
42 lines
1.9 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
$idLgCdeTab= array();
|
|
$idPrdTab= array();
|
|
$nbArt=0;
|
|
require_once ($includePath. "/_fonctions/fonctions.gene.php");
|
|
|
|
if (empty($idCde) && isset($_SESSION['idCde'])) {$idCde=$_SESSION['idCde'];}
|
|
if ($idCde!='') {
|
|
$resConn='';
|
|
$reqSelect="SELECT * FROM commandelignes WHERE idCde=" .$idCde. ";";
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['codeOpe' => $codeOpe, 'reqSelect comandeLignes' => $reqSelect ], 'Panier.reqSelectLignes.php');}
|
|
$resConn=$idPdo->query($reqSelect);
|
|
$i=0;
|
|
if ($resConn) {
|
|
while ($lignesCde = $resConn->fetch(PDO::FETCH_ASSOC)) {
|
|
$idLgCdeTab[$i]=$lignesCde['idLgCde'];
|
|
$idPrdTab[$i]=$lignesCde['idPrd'];
|
|
$qteTab[$i]=$lignesCde['qte'];
|
|
$poidsTab[$i]=$lignesCde['poidsLigne'];
|
|
$prixUnitRemiseHtTab[$i]=$lignesCde['prixUnitRemiseHtLigne'];
|
|
$typeReducLigneTab[$i]=$lignesCde['typeReducLigne'];
|
|
$montantReducLigneTab[$i]=$lignesCde['montantReducLigne'];
|
|
$montantTvaLigneTab[$i]=$lignesCde['montantTvaLigne'];
|
|
$totTtcLigneTab[$i]=$lignesCde['totTtcLigne'];
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['Ligne trouvée' => $idLgCdeTab[$i], 'idPrdTab' => $idPrdTab[$i], 'totTtcLigneTab' => $totTtcLigneTab[$i], 'prixUnitRemiseHtTab' => $prixUnitRemiseHtTab[$i], 'poidsTab' => $poidsTab[$i], 'typeReducLigneTab' => $typeReducLigneTab[$i] ], 'panier.reqSelectLignes.php'); }
|
|
$nbArt=intval($nbArt)+intval($qteTab[$i]);
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1' ) {include ("./pages/panier/panier.debugLignes.php");}
|
|
$i++;
|
|
}
|
|
$_SESSION['nbArt']=$nbArt;
|
|
}
|
|
else {
|
|
if (isset($debug[2]) && $debug[2] == '1' ) $debugMsg .= monDebug (2, ['select lignes= vide dans panier.reqSelectLignes' => ''], '');
|
|
}
|
|
}
|
|
else {
|
|
if (isset($debug[2]) && $debug[2] == '1' ) $debugMsg .= monDebug (2, ['idCde vide dans panier.reqSelectLignes' => ''], '');
|
|
}
|
|
?>
|