127 lines
5.3 KiB
PHP
Executable File
127 lines
5.3 KiB
PHP
Executable File
<?php
|
|
// $nomFicAppelant = basename(__FILE__);
|
|
//a optimiser ! flag edt, pourquoi initVar.produits n'est pas chargé ?
|
|
// if( !isset($idType1)) {
|
|
// $idType1='';
|
|
// $idType2='';
|
|
// $idType3='';
|
|
// $idType4='';
|
|
// $idType5='';
|
|
// $idType6 ='';
|
|
// $idType7 ='';
|
|
// $idType8 ='';
|
|
// $idType9 ='';
|
|
// $idType10 ='';
|
|
// $idType11 ='';
|
|
// $idType10 ='';
|
|
// $idType12 ='';
|
|
// $idType13 ='';
|
|
// $idType14 ='';
|
|
// $idType15 ='';
|
|
// $idType16 ='';
|
|
// $idType17 ='';
|
|
// $idType18 ='';
|
|
// $idType19 ='';
|
|
// $idType20 ='';
|
|
// $idType21 ='';
|
|
// $idType22 ='';
|
|
// $idType23 ='';
|
|
// }
|
|
|
|
// ---------------------------------------------------
|
|
// produit Posté
|
|
// ---------------------------------------------------
|
|
if (!empty($idPrd)) {
|
|
$stmt = $idPdo->prepare("SELECT * from `produits` as p JOIN `produitslibelle` AS l ON p.idPrd = l.idPrd WHERE p.idPrd = :idPrd ;");
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['reqSelect' => $reqSelect], 'panier.reqSelectPrd.php'); }
|
|
$stmt->bindValue(':idPrd', $idPrd, PDO::PARAM_INT);
|
|
$stmt->execute(['idPrd' => $idPrd]);
|
|
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if ($result != false) {
|
|
// $idPrd=$result['idPrd'];
|
|
$prixUnitHT=$result['prixHt'];
|
|
$prixUnitTtc=$result['prixTtc'];
|
|
$refPrd=$result['refPrd'];
|
|
$imagePrd=$result['lienImagePt'];
|
|
$promo=$result['promo'];
|
|
$poids=$result['poids'];
|
|
$unitePoids=$result['unitePoids'];
|
|
$tvaPrd=$result['tva'];
|
|
$stock=$result['stock'];
|
|
|
|
$idType1=$result['idType1'];
|
|
$idType2=$result['idType2'];
|
|
$idType3=$result['idType3'];
|
|
$idType4=$result['idType4'];
|
|
$idType5=$result['idType5'];
|
|
|
|
$idType6=$result['idType6'];
|
|
$idType7=$result['idType7'];
|
|
$idType8=$result['idType8'];
|
|
$idType9=$result['idType9'];
|
|
$idType10=$result['idType10'];
|
|
|
|
$idType11=$result['idType11'];
|
|
$idType12=$result['idType12'];
|
|
$idType13=$result['idType13'];
|
|
$idType14=$result['idType14'];
|
|
$idType15=$result['idType15'];
|
|
$idType16=$result['idType16'];
|
|
$idType17=$result['idType17'];
|
|
$idType18=$result['idType18'];
|
|
$idType19=$result['idType19'];
|
|
$idType20=$result['idType20'];
|
|
$idType21=$result['idType21'];
|
|
$idType22=$result['idType22'];
|
|
$idType23=$result['idType23'];
|
|
|
|
$nomPrd=$result['nomPrd'];
|
|
|
|
if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['produit trouvé : idPrd' => $idPrd, 'nomPrd' => $nomPrd, 'poids' => $poids, 'tvaPrd' => $tvaPrd], ''); }
|
|
}
|
|
else { $usrSiteMsg .= '<span>Erreur : produit non trouvé !</span>'; $usrSiteMsgClass='ko';}
|
|
|
|
// // ---------------------------------------------------
|
|
// // Libelle produit
|
|
// // ---------------------------------------------------
|
|
// $reqSelect="SELECT nomPrd FROM produitslibelle WHERE idPrd=" .$idPrd. " and idLg='" .$lg. "';";
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['reqSelect' => $reqSelect], ''); }
|
|
// $result=array();
|
|
// $resConn='';
|
|
// $resConn=$idPdo->query($reqSelect);
|
|
// if ($resConn) {
|
|
// $result=$resConn->fetch(PDO::FETCH_ASSOC);
|
|
// $nomPrd=$result['nomPrd'];
|
|
// if (isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug (2, ['nomPrd' => $nomPrd], '') ;}
|
|
// }
|
|
}
|
|
else
|
|
{$usrSiteMsg .= '<span>Erreur : Identifiant produit vide dans panier !</span>'; $usrSiteMsgClass='ko';}
|
|
|
|
$isOptionForThisPrd=false;
|
|
if ($idType1!='' && $idType1!='-' && $idType1!='0') $isOptionForThisPrd=true;
|
|
if ($idType2!='' && $idType2!='-' && $idType2!='0') $isOptionForThisPrd=true;
|
|
if ($idType3!='' && $idType3!='-' && $idType3!='0') $isOptionForThisPrd=true;
|
|
if ($idType4!='' && $idType4!='-' && $idType4!='0') $isOptionForThisPrd=true;
|
|
if ($idType5!='' && $idType5!='-' && $idType5!='0') $isOptionForThisPrd=true;
|
|
if ($idType6!='' && $idType6!='-' && $idType6!='0') $isOptionForThisPrd=true;
|
|
if ($idType7!='' && $idType7!='-' && $idType7!='0') $isOptionForThisPrd=true;
|
|
if ($idType8!='' && $idType8!='-' && $idType8!='0') $isOptionForThisPrd=true;
|
|
if ($idType9!='' && $idType9!='-' && $idType9!='0') $isOptionForThisPrd=true;
|
|
if ($idType10!='' && $idType10!='-' && $idType10!='0') $isOptionForThisPrd=true;
|
|
if ($idType11!='' && $idType11!='-' && $idType11!='0') $isOptionForThisPrd=true;
|
|
if ($idType12!='' && $idType12!='-' && $idType12!='0') $isOptionForThisPrd=true;
|
|
if ($idType13!='' && $idType13!='-' && $idType13!='0') $isOptionForThisPrd=true;
|
|
if ($idType14!='' && $idType14!='-' && $idType14!='0') $isOptionForThisPrd=true;
|
|
if ($idType15!='' && $idType15!='-' && $idType15!='0') $isOptionForThisPrd=true;
|
|
if ($idType16!='' && $idType16!='-' && $idType16!='0') $isOptionForThisPrd=true;
|
|
if ($idType17!='' && $idType17!='-' && $idType17!='0') $isOptionForThisPrd=true;
|
|
if ($idType18!='' && $idType18!='-' && $idType18!='0') $isOptionForThisPrd=true;
|
|
if ($idType19!='' && $idType19!='-' && $idType19!='0') $isOptionForThisPrd=true;
|
|
if ($idType20!='' && $idType20!='-' && $idType20!='0') $isOptionForThisPrd=true;
|
|
if ($idType21!='' && $idType21!='-' && $idType21!='0') $isOptionForThisPrd=true;
|
|
if ($idType22!='' && $idType22!='-' && $idType22!='0') $isOptionForThisPrd=true;
|
|
if ($idType23!='' && $idType23!='-' && $idType23!='0') $isOptionForThisPrd=true;
|
|
?>
|