Flux d’activité
Flux d’activité de Messages
-
-
Bonjour,
j'ai un probleme quand je clic sur ajouter produit, j'ai cette page qui s'afiche....
et je ne vois pas le probleme !!!!
QQ'un peut me m'aider
Merci
http://boutique-enligne.com/gisserot/
Warning: Cannot use a scalar value as an array in /home/boutiquem/www/gisserot/lib/class/caddie.php on line 180
Warning: Cannot use a scalar value as an array in /home/boutiquem/www/gisserot/lib/class/caddie.php on line 181
Warning: Cannot modify header information - headers already sent by (output started at /home/boutiquem/www/gisserot/lib/class/caddie.php:180) in /home/boutiquem/www/gisserot/achat/caddie_ajout.php on line 288
*********voici mes 2 pages*********
voici ma page caddie_ajout.php
<?include("../configuration.inc.php");
if (!isset($_COOKIE['PHPSESSID'])) {
header("Location: $wwwroot/cookie.php");
} else {
$quantite = intval($_POST['qte']);
$id = intval($_POST['id']);
$email_check = vb($_POST['email_check']);
$resProd = mysql_query("SELECT nom_".$_SESSION['langue']." as nom, prix, prix_revendeur, tva, promotion, on_stock, etat_stock, delai_stock, points, poids, on_check FROM peel_produits WHERE id = '".intval($id)."'")
or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());
$prod = mysql_fetch_array($resProd);
if ($prod['on_check'] == 0 || $prod['on_check'] == 1 && $email_check != '') {
$on_stock = vb($prod['on_stock']);
$delivery_stock = vb($prod['delai_stock']);
$poids = vn($prod['poids']);
$points = vn($prod['points']);
$etat_stock = vn($prod['etat_stock']);
switch ($on_stock) {
case "1" :
$criteres = explode("|", vb($_POST['critere']));
$cId = vn($criteres[0]);
$sId = vn($criteres[1]);
if (!empty($cId) || !empty($sId)) {
$stock_post = intval(vb($criteres[2]));
} else {
$stock_post = intval(vn($_POST['stock']));
}
break;
case "0" :
$stock_post = ""; #- Initialisation de la variable à blanc pour les produits sans gestion de stock.
$cId = vn($_POST['couleur']);
$sId = vn($_POST['taille']);
break;
}
$delivery_stock = vb($prod['delivery_stock']);
$comment = vb($_POST['comment']);
$remise_produit_percent = $prod['promotion'];
$tva_percent = !empty($_SESSION['caddie']->zoneTva) ? $prod['tva'] : "0";
# Récupère le nom de la couleur
$sqlColor = "SELECT nom_".$_SESSION['langue']." as nom FROM peel_couleurs WHERE id = '".vb($cId)."'";
$resColor = mysql_query($sqlColor);
if ($resColor) {
if (mysql_num_rows($resColor) > 0) {
$Color = mysql_fetch_array($resColor);
$couleur = $Color['nom'];
} else {
$couleur = "";
}
}
# Récupère le prix et la taille
$sqlSize = "SELECT nom_".$_SESSION['langue']." as nom, prix, prix_revendeur FROM peel_tailles WHERE id = '".vn($sId)."'";
$resSize = mysql_query($sqlSize);
$option = 0;
if ($resSize) {
if (mysql_num_rows($resSize) > 0) {
$Size = mysql_fetch_array($resSize);
if ($Size['prix'] != 0) {
(isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $option = $Size['prix_revendeur'] * (1-$remise_produit_percent/100) : $option = $Size['prix'] * (1-$remise_produit_percent/100);
}
$taille = $Size['nom'];
} else {
$taille = "";
}
}
/* Choix entre prix revendeur et prix public */
(isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") ? $prix_cat = $prod['prix_revendeur'] + vn($option) : $prix_cat = $prod['prix'] + vn($option);
$prix_cat_ht = $prix_cat / (1 + $tva_percent/100);
/****************************************************************************/
/* 2 - On calcule les promotions en valeur (calculé toujours sur le prix HT) */
/***************************************************************************/
$remise_produit_percent = vn($prod['promotion']);
$remise_produit = $prix_cat_ht * $remise_produit_percent/100;
$prix_ht = $prix_cat_ht - $remise_produit;
$prix = $prix_ht * (1+$tva_percent/100);
$total_prix = $prix * $quantite;
$total_prix_ht = $prix_ht * $quantite;
$tva = $total_prix - $total_prix_ht;
if ($on_stock == 1) {
$stock = $stock_post - $quantite;
if ($stock < 0) {
$stock = 0;
$quantite = $stock_post;
}
$sql = "SELECT stock FROM peel_stocks_temp WHERE produit_id = '".intval($_REQUEST['id'])."' AND couleur_id = '".$cId."' AND taille_id = '".$sId."'";
$res = mysql_query($sql);
if (mysql_num_rows($res) == 0) {
@mysql_query("INSERT INTO peel_stocks_temp (produit_id, couleur_id, taille_id, stock, qte, o_timestamp) VALUES ('".$_REQUEST['id']."', '".$cId."', '".$sId."', '".$stock."', '".$quantite."', now())")
or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());
} else {
@mysql_query("UPDATE peel_stocks_temp SET stock = '".$stock."', qte = qte + ".$quantite.", o_timestamp = now() WHERE produit_id = '".$_REQUEST['id']."' AND couleur_id = '".$cId."' AND taille_id = '".$sId."'")
or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());
}
}
if (!in_array($_REQUEST['id'], $_SESSION['caddie']->articles)) { #- Si le produit n'est pas dans le caddie
$_SESSION['caddie']->ajout(
$id,
$_POST['qte'],
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check
);
} else { #- Si le produit est dans le caddie
$array_ligne = array_keys($_SESSION['caddie']->articles, $_REQUEST['id']);
$ligne = $array_ligne[0];
if ($_SESSION['caddie']->couleur[$ligne] == vb($cId) && $_SESSION['caddie']->taille[$ligne] == vb($sId) ) {
$quantite = $_SESSION['caddie']->quantite[$ligne] + $quantite;
$total_prix = $prix * $quantite;
$total_prix_ht = $prix_ht * $quantite;
$tva = $total_prix - $total_prix_ht;
$_SESSION['caddie']->modif(
$ligne,
$id,
$quantite,
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check
);
} else {
$_SESSION['caddie']->ajout(
$id,
$_POST['qte'],
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check
);
}
}
$_SESSION['caddie']->nettoie();
$_SESSION['caddie']->recalc_total();
}
if (! empty($_SERVER['HTTP_REFERER'])) {
header("Location: ".$_SERVER['HTTP_REFERER']."");
} else {
header("Location: $wwwroot/index.php");
}
}
?>
voici ma page lib/class/caddie.php
<?class Caddie {
/* Déclaration des tableaux */
var $articles; /* Tableau des articles */
var $quantite; /* Tableau des quantités */
var $poids; /* Tableau des poids */
var $couleur; /* Tableau des couleurs */
var $taille; /* Tableau des tailles */
var $comment; /* Tableau des commentaires */
var $prix_cat; /* Tableau des prix catalogue TTC*/
var $prix_cat_ht; /* Tableau des prix catalogue HT*/
var $prix; /* Tableau des prix unitaire TTC*/
var $prix_ht; /* Tableau des prix unitaire HT*/
var $total_prix; /* Net produit vendu TTC prix x qte*/
var $total_prix_ht; /* Net produit vendu HT prix_ht x qte */
var $tva_percent; /* Tableau des taux de tva */
var $tva; /* Tableau des tva en valeur */
var $remise_produit_percent; /* Tableau des remises produits en % */
var $remise_produit; /* Tableau des remises produits en valeur */
var $points; /* Tableau des points clients */
var $etat_stock; /* Tableau stock produit géré ou non*/
var $delivery_stock; /* Tableau délai d'approvisionnement du stock */
var $option; /* Tableau du prix des options */
var $email_check; /* Tableau des emails amis */
/* Déclaration des variables */
var $total; /* Montant total du caddie */
var $total_ht; /* Montant total du caddie HT */
var $total_tva; /* Montant total de la tva */
var $total_produit_avant_promo;
var $total_produit_avant_promo_ht;
var $total_produit; /* Montant total ttc la tva */
var $total_produit_ht; /* Montant total ttc la tva */
var $total_poids; /* Poids total du caddie */
var $total_points; /* Total des points cadeaux */
var $cout_transport;
var $cout_transport_ht;
var $tva_transport;
var $total_remise_produit; /* Total des remises produits en valeur */
var $total_remise_produit_ht; /* Total des remises produits en valeur */
var $total_remise_client; /* Total des remises clients en valeur */
var $total_remise_client_ht; /* Total des remises clients en valeur */
var $remise_client_percent; /* Remises clients en % */
var $total_remise_code; /* Total des remises codes promo en valeur */
var $total_remise_code_ht; /* Total des remises codes promo en valeur */
var $remise_code_percent; /* Remises codes promo en % */
var $total_remise_cheque; /* Total des remises par chèque cadeau en valeur */
var $total_remise_cheque_ht; /* Total des remises par chèque cadeau en valeur */
var $code_cheque; /* Code cheque cadeau */
var $total_remise_bon; /* Total des remises par bons de réduction en valeur */
var $total_remise_bon_ht; /* Total des remises par bons de réduction en valeur */
var $code_bon; /* Code bon de réduction */
var $avoir; /* Avoir client en EURO */
var $type;
var $zone;
var $zoneTva;
var $pays;
var $paiement;
var $tarif_paiement; /* supplément pour le paiement */
var $code_promo; /* Nom du code promo */
var $ecotaxe_ttc;
var $ecotaxe_ht;
var $ecotaxe_tva;
function Caddie() {
/* constructeur d'object */
$this->init();
}
function init() {
/* Initialise le caddie */
$this->articles = array();
$this->quantite = array();
$this->couleur = array();
$this->taille = array();
$this->prix = array();
$this->prix_ht = array();
$this->total_prix = array();
$this->total_prix_ht = array();
$this->prix_cat = array();
$this->prix_cat_ht = array();
$this->tva_percent = array();
$this->tva = array();
$this->comment = array();
$this->poids = array();
$this->points = array();
$this->remise_produit_percent = array();
$this->remise_produit = array();
$this->etat_stock = array();
$this->delivery_stock = array();
$this->option = array();
$this->email_check = array();
$this->total = 0;
$this->avoir = 0;
$this->total_ht = 0;
$this->total_tva = 0;
$this->total_produit_avant_promo = 0;
$this->total_produit_avant_promo_ht = 0;
$this->total_produit = 0;
$this->total_produit_ht = 0;
$this->total_poids = 0;
$this->total_points = 0;
$this->cout_transport = 0;
$this->cout_transport_ht = 0;
$this->tva_transport = 0;
$this->total_remise_produit = 0;
$this->total_remise_produit_ht = 0;
$this->total_remise_client = 0;
$this->total_remise_client_ht = 0;
$this->remise_client_percent = 0;
$this->total_remise_code = 0;
$this->total_remise_code_ht = 0;
$this->remise_code_percent = 0;
$this->type = "";
$this->zone = "";
$this->zoneTva = 1;
$this->pays = "";
$this->paiement = "";
$this->tarif_paiement = 0;
$this->code_promo = "";
$this->code_cheque = "";
$this->total_remise_cheque = 0;
$this->total_remise_cheque_ht = 0;
$this->code_bon = "";
$this->total_remise_bon = 0;
$this->total_remise_bon_ht = 0;
}
function ajout(
&$produitid,
$qte,
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check) {
$this->articles[] = $produitid;
$this->quantite[] = $qte;
$this->couleur[] = $couleur;
$this->taille[] = $taille;
$this->prix_cat[] = $prix_cat;
$this->prix_cat_ht[] = $prix_cat_ht;
$this->prix[] = $prix;
$this->prix_ht[] = $prix_ht;
$this->total_prix[] = $total_prix;
$this->total_prix_ht[] = $total_prix_ht;
$this->tva_percent[] = $tva_percent;
$this->tva[] = $tva;
$this->poids[] = $poids;
$this->points[] = $points;
$this->remise_produit_percent[] = $remise_produit_percent;
$this->remise_produit[] = $remise_produit;
$this->comment[] = $comment;
$this->etat_stock[] = $etat_stock;
$this->delivery_stock[] = $delivery_stock;
$this->option[] = $option;
$this->email_check[] = $email_check;
}
function modif(
$i,
$produitid,
$qte,
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check) {
/* Met la quantité la couleur et la taille spécifiées du produit spécifié dans le caddie */
if (isset($i)) {
$this->articles[$i] = (int) $produitid;
$this->quantite[$i] = $qte;
$this->couleur[$i] = $couleur;
$this->taille[$i] = $taille;
$this->prix_cat[$i] = $prix_cat;
$this->prix_cat_ht[$i] = $prix_cat_ht;
$this->prix[$i] = $prix;
$this->prix_ht[$i] = $prix_ht;
$this->total_prix[$i] = $total_prix;
$this->total_prix_ht[$i] = $total_prix_ht;
$this->tva_percent[$i] = $tva_percent;
$this->tva[$i] = $tva;
$this->poids[$i] = $poids;
$this->points[$i] = $points;
$this->remise_produit_percent[$i] = $remise_produit_percent;
$this->remise_produit[$i] = $remise_produit;
$this->comment[$i] = $comment;
$this->etat_stock[$i] = $etat_stock;
$this->delivery_stock[$i] = $delivery_stock;
$this->option[$i] = $option;
$this->email_check[$i] = $email_check;
}
ksort($this->articles);
ksort($this->quantite);
ksort($this->couleur);
ksort($this->taille);
ksort($this->prix);
ksort($this->prix_ht);
ksort($this->total_prix);
ksort($this->total_prix_ht);
ksort($this->prix_cat);
ksort($this->prix_cat_ht);
ksort($this->tva_percent);
ksort($this->tva);
ksort($this->poids);
ksort($this->points);
ksort($this->remise_produit_percent);
ksort($this->remise_produit);
ksort($this->comment);
ksort($this->etat_stock);
ksort($this->delivery_stock);
ksort($this->option);
ksort($this->email_check);
}
function place(
$i,
$produitid,
$qte,
$couleur,
$taille,
$prix_cat,
$prix_cat_ht,
$prix,
$prix_ht,
$total_prix,
$total_prix_ht,
$tva_percent,
$tva,
$poids,
$points,
$remise_produit_percent,
$remise_produit,
$comment,
$etat_stock,
$delivery_stock,
$option,
$email_check) {
if (isset($i)) {
$this->articles[$i] = (int) $produitid;
$this->quantite[$i] = $qte;
$this->couleur[$i] = $couleur;
$this->taille[$i] = $taille;
$this->prix_cat[$i] = $prix_cat;
$this->prix_cat_ht[$i] = $prix_cat_ht;
$this->prix[$i] = $prix;
$this->prix_ht[$i] = $prix_ht;
$this->total_prix[$i] = $total_prix;
$this->total_prix_ht[$i] = $total_prix_ht;
$this->tva_percent[$i] = $tva_percent;
$this->tva[$i] = $tva;
$this->poids[$i] = $poids;
$this->points[$i] = $points;
$this->remise_produit_percent[$i] = $remise_produit_percent;
$this->remise_produit[$i] = $remise_produit;
$this->comment[$i] = $comment;
$this->etat_stock[$i] = $etat_stock;
$this->delivery_stock[$i] = $delivery_stock;
$this->option[$i] = $option;
$this->email_check[$i] = $email_check;
}
ksort($this->articles);
ksort($this->quantite);
ksort($this->couleur);
ksort($this->taille);
ksort($this->prix);
ksort($this->prix_ht);
ksort($this->total_prix);
ksort($this->total_prix_ht);
ksort($this->prix_cat);
ksort($this->prix_cat_ht);
ksort($this->tva_percent);
ksort($this->tva);
ksort($this->poids);
ksort($this->points);
ksort($this->remise_produit_percent);
ksort($this->remise_produit);
ksort($this->comment);
ksort($this->etat_stock);
ksort($this->delivery_stock);
ksort($this->option);
ksort($this->email_check);
}
function paiement(&$paiement, &$tarif_paiement) {
/* Traitement du moyen de paiement */
if (isset($paiement)) {
$this->paiement = $paiement;
$this->tarif_paiement = $tarif_paiement;
}
}
function code_promo(&$code_promo, &$remise_code_percent) {
/* Ajoute dans le caddie le code promo et la remise du code promo */
if (isset($code_promo)) {
$this->code_promo = $code_promo;
$this->remise_code_percent = $remise_code_percent;
}
}
function cheque_cadeau(&$code_cheque, &$total_remise_cheque) {
if (isset($code_cheque)) {
$this->code_cheque = $code_cheque;
$this->total_remise_cheque = $total_remise_cheque;
}
}
function bon_reduction(&$code_bon, &$total_remise_bon) {
/* Ajoute dans le caddie le bon de réduction et la remise du code promo */
if (isset($code_bon)) {
$this->code_bon = $code_bon;
$this->total_remise_bon = $total_remise_bon;
}
}
function pays(&$pays) {
/* Ajoute dans le caddie le pays d'expédition */
if (isset($pays)) {
$this->pays = $pays;
}
}
function zone(&$zone, &$zoneTva) {
/* Ajoute dans le caddie la zone d'expédition */
if (isset($zone)) {
$this->zone = $zone;
$this->zoneTva = $zoneTva;
}
}
function type(&$type) {
/* Ajoute dans le caddie la zone d'expédition */
if (isset($type)) {
$this->type = $type;
}
}
function expedition(&$expedition, &$expedition_ht) {
/* Ajoute dans le caddie la zone d'expédition */
if (isset($expedition)) {
$this->cout_transport = $expedition;
$this->cout_transport_ht = $expedition_ht;
$this->tva_transport = $this->cout_transport - $this->cout_transport_ht;
}
}
function enleve(&$numero_ligne) {
/* Enlève un produit du caddie */
if (isset($numero_ligne)) {
unset(
$this->articles[$numero_ligne],
$this->quantite[$numero_ligne],
$this->couleur[$numero_ligne],
$this->taille[$numero_ligne],
$this->prix[$numero_ligne],
$this->prix_ht[$numero_ligne],
$this->total_prix[$numero_ligne],
$this->total_prix_ht[$numero_ligne],
$this->prix_cat[$numero_ligne],
$this->prix_cat_ht[$numero_ligne],
$this->tva[$numero_ligne],
$this->tva_percent[$numero_ligne],
$this->poids[$numero_ligne],
$this->points[$numero_ligne],
$this->remise_produit_percent[$numero_ligne],
$this->remise_produit[$numero_ligne],
$this->comment[$numero_ligne],
$this->etat_stock[$numero_ligne],
$this->delivery_stock[$numero_ligne],
$this->option[$numero_ligne],
$this->email_check[$numero_ligne]);
}
$this->articles = array_values ($this->articles);
$this->quantite = array_values ($this->quantite);
$this->couleur = array_values ($this->couleur);
$this->taille = array_values ($this->taille);
$this->prix = array_values ($this->prix);
$this->prix_ht = array_values ($this->prix_ht);
$this->total_prix = array_values ($this->total_prix);
$this->total_prix_ht = array_values ($this->total_prix_ht);
$this->prix_cat = array_values ($this->prix_cat);
$this->prix_cat_ht = array_values ($this->prix_cat_ht);
$this->tva = array_values ($this->tva);
$this->tva_percent = array_values ($this->tva_percent);
$this->poids = array_values ($this->poids);
$this->points = array_values ($this->points);
$this->remise_produit_percent = array_values ($this->remise_produit_percent);
$this->remise_produit = array_values ($this->remise_produit);
$this->comment = array_values ($this->comment);
$this->etat_stock = array_values ($this->etat_stock);
$this->delivery_stock = array_values ($this->delivery_stock);
$this->option = array_values ($this->option);
$this->email_check = array_values ($this->email_check);
}
function nettoie() {
/* Cette fonction nettoie le caddie, en enlevant tous les produits non valides
* c'est à dire ceux dont l'identifiant n'est pas numérique ou dont la quantité est < 1 */
foreach ($this->quantite as $i => $qte) {
if ($qte < 0) { /* Attention ici normalement on nettoie si la quantité commandée est < à 1 */
unset($this->articles[$i]);
unset($this->quantite[$i]);
unset($this->couleur[$i]);
unset($this->taille[$i]);
unset($this->prix[$i]);
unset($this->prix_ht[$i]);
unset($this->total_prix[$i]);
unset($this->total_prix_ht[$i]);
unset($this->prix_cat[$i]);
unset($this->prix_cat_ht[$i]);
unset($this->tva_percent[$i]);
unset($this->tva[$i]);
unset($this->poids[$i]);
unset($this->points[$i]);
unset($this->remise_produit_percent[$i]);
unset($this->remise_produit[$i]);
unset($this->comment[$i]);
unset($this->etat_stock[$i]);
unset($this->delivery_stock[$i]);
unset($this->option[$i]);
unset($this->email_check[$i]);
}
}
}
function compte_elements() {
/* Renvoie le nombre d'articles dans le caddie */
$total = 0;
if (!empty($this->quantite)) {
foreach ($this->quantite as $qte) {
$total += $qte;
}
}
return $total;
}
function recupere_produitid_list() {
/* Renvoie la liste des produits délimités par des virgules */
$produitid_list = "";
foreach ($this->articles as $produitid => $quantite) {
$produitid_list .= ",'" . $produitid . "'";
}
/* Enlève la virgule du début */
return substr($produitid_list, 1);
}
function recupere_liste_du_caddie() {
/* Renvoie une variable tableau de la liste des produitid */
$liste_du_caddie = array();
foreach ($this->articles as $i =>/*$produitid =>*/ $produitid) {
$liste_du_caddie[$i]=$produitid;
}
return $liste_du_caddie;
}
function recalc_total() {
/* Recalcule le prix total des articles du caddie */
$this->total = 0;
$this->total_ht = 0;
$this->total_produit_avant_promo = 0;
$this->total_produit_avant_promo_ht = 0;
$this->total_produit = 0;
$this->total_produit_ht = 0;
$this->total_tva = 0;
$this->total_remise_produit = 0;
$this->total_remise_produit_ht = 0;
$this->total_remise_client = 0;
$this->total_remise_client_ht = 0;
$this->total_remise_code = 0;
$this->total_remise_code_ht = 0;
$this->total_remise_cheque_ht = 0;
$this->total_remise_bon_ht = 0;
$this->total_poids = 0;
$this->total_points = 0;
$this->remise_client_percent = vn($_SESSION['utilisateur']['remise_percent']);
$this->avoir = vn($_SESSION['utilisateur']['avoir']);
$this->ecotaxe_ttc = 0;
$this->ecotaxe_ht = 0;
$this->ecotaxe_tva = 0;
foreach ($this->articles as $i => $produitid) {
$qid = mysql_query("SELECT id, poids, points, promotion, id_ecotaxe FROM peel_produits WHERE id= '$produitid'");
if ($qid) {
if (mysql_num_rows($qid) > 0) {
$produit=mysql_fetch_array($qid);
$reseco = mysql_query("SELECT prix_ht, prix_ttc FROM peel_ecotaxes WHERE id = '".intval($produit['id_ecotaxe'])."'");
if (mysql_num_rows($reseco) > 0) {
$eco = mysql_fetch_object($reseco);
$this->ecotaxe_ht += $eco->prix_ht * $this->quantite[$i];
$this->ecotaxe_ttc += $eco->prix_ttc * $this->quantite[$i];
}
$this->total_produit += $this->total_prix[$i] ; #- Ce total inclut la remise produit, il s'agit du total ttc des produits avant promo et frais de port
$this->total_produit_ht += $this->total_prix_ht[$i] ;
$this->total_tva += $this->tva[$i] ;
$this->total_remise_produit += $this->remise_produit[$i] ; #- A titre indicatif uniquement
$this->total_remise_produit_ht += $this->remise_produit[$i] / (1 + $this->tva[$i]) ; #- A titre indicatif uniquement
$this->total_poids += $this->quantite[$i] * $this->poids[$i] ;
$this->total_points += $this->quantite[$i] * $this->points[$i] ;
}
}
}
$this->ecotaxe_tva = $this->ecotaxe_ttc - $this->ecotaxe_ht ;
$this->total_tva = $this->ecotaxe_tva + $this->total_tva;
$this->total_produit_avant_promo = $this->total_produit + $this->ecotaxe_ttc ;
$this->total_produit_avant_promo_ht = $this->total_produit_ht + $this->ecotaxe_ht;
$this->total_produit = $this->total_produit + $this->ecotaxe_ttc ;
$this->total_produit_ht = $this->total_produit_ht + $this->ecotaxe_ht;
/* On défalque la remise client */
$this->total_remise_client = $this->total_produit * vn($this->remise_client_percent) / 100;
$tva_remise_client = $this->total_remise_client * 0.196 / 1.196;
$this->total_remise_client_ht = $this->total_remise_client - $tva_remise_client;
$this->total_produit = $this->total_produit - $this->total_remise_client ;
$this->total_tva = $this->total_tva - $tva_remise_client;
/* On défalque la remise par code promotionnel */
$this->total_remise_code = $this->total_produit * vn($this->remise_code_percent) /100;
$tva_remise_code = $this->total_remise_code * 0.196 / 1.196;
$this->total_remise_code_ht = $this->total_remise_code - $tva_remise_code;
$this->total_produit = $this->total_produit - $this->total_remise_code;
$this->total_tva = $this->total_tva - $tva_remise_code;
/* On défalque la remise par chèque cadeau */
$tva_remise_cheque = $this->total_remise_cheque * 0.196 / 1.196;
$this->total_remise_cheque_ht = $this->total_remise_cheque - $tva_remise_cheque;
$this->total_produit = $this->total_produit - $this->total_remise_cheque;
$this->total_tva = $this->total_tva - $tva_remise_cheque;
/* On défalque la remise par bon de réduction */
$tva_remise_bon = $this->total_remise_bon * 0.196 / 1.196;
$this->total_remise_bon_ht = $this->total_remise_bon - $tva_remise_bon;
$this->total_produit = $this->total_produit - $this->total_remise_bon;
$this->total_tva = $this->total_tva - $tva_remise_bon;
/* On défalque l'avoir client */
$tva_avoir = $this->avoir * 0.196 / 1.196;
$this->total_produit = $this->total_produit - $this->avoir;
$this->total_tva = $this->total_tva - $tva_avoir;
/* On calcul le cout global du caddie */
$this->total_tva = $this->total_tva + $this->tva_transport;
$this->total = $this->total_produit + $this->cout_transport + $this->tarif_paiement;
$this->total_ht = $this->total - $this->total_tva;
}
}
/* Variables pouvant être ajouté
total_remise_client_ht : Total de la remise client HT
tva_remise_client_ht : Total tva de la remise client
total_remise_code_ht : Total de la remise code HT
tva_remise_code_ht : Total tva de la remise code
seuil revendeur
seuil public
*/
?>
-
pruault
Bonjour,sur ma page d'accueil les meta title + descipt + keyword sont là.
Ttefois des que je choisis (clic) sur une categorie je n'ai plus les met_desc
Comment puis je faire pour y remedier
Merci
Dans /modeles/haut.php, il faut regarder la requête qui affiche les META et vérifier le champ récupérer pour la table catégorie
-
Bonjour,
sur ma page d'accueil les meta title + descipt + keyword sont là.
Ttefois des que je choisis (clic) sur une categorie je n'ai plus les met_desc
Comment puis je faire pour y remedier
Merci
-
Bonjour,
je souhaiterais developper un catalogue avec cet open source de http://w3net.eu/xmdb/
Pensez vous que cela est possible et que l'on puisse l'adapter a peel premiun
Merci
-
-
Bonjour à tous,
je tente par plusieurs moyens d'espacer un peu mes catégories de ma rubrique nouveauté en page d'accueil du site.
en clair, je souhaiterais une ligne vide entre mes dernières catégories et l'affichage rubrique Nouveautés...
Je cale, j'ai tenté diverses procédures, aussi bien sur la page index.php que sur le template, mais rien ne passe comme il faut, j'ai toujours un message d'erreur différent selon ce que j'ai fait..
Pour schématiser, voila ce que je désire faire
tetière LE CATALOGUE
CATAGORIES DE PRODUITS
-> mettre un peu plus d'espace ici <-
tetière NOUVEAUTES
Merci de vos astuces de programmeurs ;)
-
-
Il faut modifier les paramètres du fichier /lib/setup/info.inc.phpServeur : localhost
Id : root
Pass : ne rien mettre
Bdd : mettre le nom de la base de données
Merci pour cette info.
Bon en local, j'ai abandonné le projet , mamp sur mon mac n'est pas stable.
Je l'ai donc mi sur un serveur web 'provisoire'
-
L'un et l'autre sont équivalents > le débat sur la longueur des URL n'a pas de sensJe trouve simplement que vous mettez trop de mots clés
Dans le doute je preferais poser la question
merci a vous
-
pruault
Bonjour,j'aurais voulu avoir qq informations concernant le rewriting url
Quelle est la meilleure ecriture
http://www.produits-bretons.fr/cat-Culture...retagne-90.html
.... cat-Culture-et-musique-bretonnes,livres-de-bretagne,pays-celtiques,contes-et-legendes-de-la-bretagne-90.html
ou
http://www.produits-bretons.fr/cat-musique...retagne-90.html
.... cat-musique-livres-de-bretagne-90.html
La 1ere n'est-elle pas trop longue pour les moteurs de recherche?
Est ce que je met trop de mots cles dans l'url?
Pouvez vous me donner votre avis
Merci
L'un et l'autre sont équivalents > le débat sur la longueur des URL n'a pas de sens
Je trouve simplement que vous mettez trop de mots clés
-
Bonjour,
j'aurais voulu avoir qq informations concernant le rewriting url
Quelle est la meilleure ecriture
http://www.produits-bretons.fr/cat-Culture...retagne-90.html
.... cat-Culture-et-musique-bretonnes,livres-de-bretagne,pays-celtiques,contes-et-legendes-de-la-bretagne-90.html
ou
http://www.produits-bretons.fr/cat-musique...retagne-90.html
.... cat-musique-livres-de-bretagne-90.html
La 1ere n'est-elle pas trop longue pour les moteurs de recherche?
Est ce que je met trop de mots cles dans l'url?
Pouvez vous me donner votre avis
Merci
-
-
Merci M. Ruault de votre réponse.
Quelle procédé faire pour que cette fonction n'agisse qu'une fois le paiement réellement effectué ?
-
Bonjour,
Dans un message sur Peel Shopping Mr Ruault parle de templates
En collaboration avec Willy, on va vous publier un système de Template sur une version Shopping 3.0 avec TBSPensez vous aussi le mettre en place pour la version Premium ?
-
Bonjour,
Lorsque je cliques sur un produit dans "Lister les produits" et que j'édite ce produit après avoir cliqué sur "Sauvegarde changements" la liste se réaffiche avec 3 erreurs de ce type en dessous de la liste
Warning: Cannot use a scalar value as an array in /home/sites/site83/web/boutique/administrer/produits.php on line 1130
Avez-vous une idée ?
Merci d'avance pour votre aide ;)
-
pruault
Oui l'incrémentation est bonne.J'ai une commande (celle de départ) et l'incrémentation est à 2.
Repasser la fonctions cree_commande de lib/fonctions/fonctions.php et /administrer/commandes.php à partir de la version d'origine
-
pruault
Bonjour,sujet qui m'intrigue beaucoup...
actuellement, le paiement CB et Paypal est gèré par le processus de validation de commande qui se termine par le réglement via la page paypal.
Pour le paiement, lorsque le client a suivi son processus choix de destination, d'expédition etc..., il arrive sur la page fin_commande.php et un clic sur un bouton paypal permet de régler cette commande.
Moi, ce que je souhaite savoir dans l'immédiat est à quel moment se fait l'envoi de mail administrateur car j'ai énormément de commandes non réglées qui m'arrivent sur ma boite mail.
Autre point, je souhaiterais de la page achat_maintenant.php passer à la page paypal une fois cliqué sur "valider la commande" et ainsi ne pas avoir la page fin_commande...
Gros problème tout cela que j'aimerais ne plus rencontrer...
Merci aux personnes qui m'apporterons leur aide
la fonction de mail part à partir de la page /achat/fin_commande.php
-
pruault
il me semble que cela interviens depuis la modif par Mme Bagu du site...En effet, sur mon ancienne version, donc avant modif de Mme Bagu, pas de pb...
Mais avec tous les fichiers modifiés, je n'arrive pas trop à savoir où cela se passe...
Merci à ceux qui m'orienterais sur mon travail ;)
Il faut regarder dans la fonction affiche_prix()
Et vérifier que vous avez quelques choses du style :
if (isset($_SESSION['utilisateur']['priv']) && $_SESSION['utilisateur']['priv'] == "reve") {
if ($prix !=0) {
echo "<span class=\"prix\">".PRICE." : </span>";
echo ($objProd->promotion != 0) ? "<span class=\"prix\"><s>".fprix($prix_barre_ht)."</s><br />".fprix($prix_ht)." ".$_SESSION['devise']['symbole']." H.T.</span>" : "<span class=\"prix\">".fprix($prix_ht)." ".$_SESSION['devise']['symbole']." H.T.</span>";
echo (!empty($ecotaxe_ht)) ? "<br /><font class='petit'><i>dont ecotaxe : ".fprix($ecotaxe_ht)." ".$_SESSION['devise']['symbole']."</i></font>" : "";
}
} else {
if ($prix !=0) {
echo "<span class=\"prix\">".PRICE." : </span>";
echo ($objProd->promotion != 0) ? "<span class=\"prix\"><s>".fprix($prix_barre)."</s><br />".fprix($prix)." ".$_SESSION['devise']['symbole']." T.T.C</span>" : "<span class=\"prix\">".fprix($prix)." ".$_SESSION['devise']['symbole']." T.T.C</span>";
echo (!empty($ecotaxe_ttc)) ? "<br /><font class='petit'><i>dont ecotaxe : ".fprix($ecotaxe_ttc)." ".$_SESSION['devise']['symbole']."</i></font>" : "";
}
}
Le prix barré est affiché au niveau de <s>".fprix($prix_barre)."</s>
-
-
il me semble que cela interviens depuis la modif par Mme Bagu du site...
En effet, sur mon ancienne version, donc avant modif de Mme Bagu, pas de pb...
Mais avec tous les fichiers modifiés, je n'arrive pas trop à savoir où cela se passe...
Merci à ceux qui m'orienterais sur mon travail ;)
-
Oui l'incrémentation est bonne.
J'ai une commande (celle de départ) et l'incrémentation est à 2.
-
pruault
Bonjourj'utilse peel 2.9 premium
Pb concernant le listing des tailles pour mes article malgré l'utilisation du numero de classement dans l'administrateur l'ordre ne change pas
je n'arrive pas a visualiser comment cela se classe ( pas classement d'orgine, pas ordre alphabetqiue)
Je n'est pas retrouvé sur le forum de rectif a ce sujet
Es ce que quelqu'un peu m'eclairer SVP?
Il faut publier ici les fonctions print_critere_stock_prix
-
Bonjour
j'utilse peel 2.9 premium
Pb concernant le listing des tailles pour mes article malgré l'utilisation du numero de classement dans l'administrateur l'ordre ne change pas
je n'arrive pas a visualiser comment cela se classe ( pas classement d'orgine, pas ordre alphabetqiue)
Je n'est pas retrouvé sur le forum de rectif a ce sujet
Es ce que quelqu'un peu m'eclairer SVP?
-
pruault
Slt,Essai de relancer le fichier installer.php afin de remettre les bonnes variables.
Sinon supprime peut etre le .htaccess. pour essayer.
Il faut modifier les paramètres du fichier /lib/setup/info.inc.php
Serveur : localhost
Id : root
Pass : ne rien mettre
Bdd : mettre le nom de la base de données
Probleme meta_desc
dans Module PEEL Premium pour PEEL SHOPPING
noya_m
Posté(e) · Signaler ce message
merci