Aide - Recherche - Membres - Calendrier
Version complète : Ecotax Version 1.3 by paddybl (compatible Recupel pour la Belgique)
Forum osCommerce-fr > Adapter OsCommerce MS2 > Contributions
Pages : 1, 2, 3, 4, 5, 6
thierry29
Bonsoir,

Tout d'abord trés, trés pratique ta contribution paddybl, je fais un petit retour pour savoir si sur les grosses commandes, tu n'as pas des erreurs d'arrondis dans le sous-total HT, de 0.01 ou 0.02 ou 0.03 centimes. Erreurs d'arrondi qui n'apparaissent pas lorsque l'écotaxe est désactivée. Je suis en train de regarder le order.php dans le dossier includes/classes et est-ce que ça peut venir de là:
($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)

Une autre petite question :
Comment faire apparaître le total HT de l'écotaxe

bon je m'arrête là, je vous tiens au courant dans mes introspections.
paddybl
en effet j'ai remarqué depuis le début cette erreur de 0,01 centime. le problème vients de la méthode de calcul de tva ajouter à celle de l'écotaxe le souci vient du fait que la tva est calcul grace au prix ht donc vue que le prix ht (si tu regarde dans tes fiches produits et basé sur un nombre à 4 chiffres après la virgule) lorsque tu calcul a tva que sur le produit tu obtiens aussi un nombre à 4 chiffre aprés la virgule! le truc c'est qu'on arrondi ce chiffre pour n'avoir que 2 chiffres. meme si l'arrondi ce fait au plus pret et que celui-ci reste juste pour un sous total ou pour la tva, lorsque l'on ajoute des somme de 0,08 ht d'écotaxe par exemple sur un souris le prix sans arrondi reste juste. Mais lors du calcul de la tva celui-ci peut passer sur un arrondi superieur (en 2 mots, en arrondissant 2 fois tu introduits 2 fois un erreur minime) qui se répercut sur le résultat final. d'ou l'écard non systhématique de 0.01 ou a peine plus. je n'ai trouvé de solution efficace pour eviter ces erreurs du au arrondi! si quelqu'un à une idée je suis preneur...



pour la ligneque tu m'indiques elle est juste:

($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)

si la taxe est inferieur a 10% le taux multiplicateur de tva est de 1.0j'affiche le taux

exemple tva à 5.5% <10 donc le multiplicateur est 1.055 si superieur 1.196 pas le 0. ce n'est pas moi qui aie créé cette fonction elle est d'origine dans osc

tu le trouve pour le client dans le popup d'information de la catégorie d'écotaxe et sur la facture que tu enverra au client

ou avec cette fonction

CODE


$ecotax_price=tep_get_ecotax_price_value($ecotax_rates_id);

echo $currencies->display_price($ecotax_price, $tax_rate,0, 1)


ou $ecotax_rates_id et la valeur de l'id d'écotax du produit exemple: $product_info['ecotax_rates_id']

$tax_rate le taux de tva. attention de l'utilisation logique du module tu doits récuperér ce taux dans écotax, parce que tous dépends de la tva qui s'appliquera dans le futur. en toute logique on pourrait remplacer directement par 19.6 ! mais j'enticipe de futur changement surtout au niveau européens...

la fonction pour écupérer le taux est

CODE
$tax_rate=tep_get_ecotax_rate($product_info['ecotax_rates_id']);  


la valeur de la tva retourné dépendra du pays d'origine si le client est authentifier, sinon 19.6...

pas bête non twisted.gif ?

jack_bauer
C'est bon ca marche. Je testerais plus en profondeur quand j'aurais mis mon site en ligne, car pour l'heure j'ai encore pas mal d'entrée a y mettre.
J'ai essayé FaqDesk et NewsDesk et je pense que je vais les adopter.
Merci.
NooKyZ
Chapeau, vraiment quel beau travail que cette contrib.

Je rencontre néanmoins un problème sur le admin/include/classes/order.php

je pense que mon problème vient de cette partie, jointure question.gif mais la mrgreen.gif .......
CODE
    //debut modif by paddybl for ecotax
    $countryid = tep_get_country_id($this->delivery["country"]);
    $zoneid = tep_get_zone_id($countryid, $this->delivery["state"]);

    $index = 0;

    $orders_products_query = tep_db_query("
     SELECT
     op.orders_products_id,
     op.products_name,
     op.products_model,
     op.products_price,
     op.products_tax,
     op.ecotax_rates_id,    
     op.products_ecotax,
     op.products_quantity,
     op.final_price,
     p.products_tax_class_id,
     p.products_weight
   FROM  " . TABLE_ORDERS_PRODUCTS . " op
  LEFT JOIN " . TABLE_PRODUCTS . " p
    ON  op.products_id = p.products_id
WHERE orders_id = '" . (int)$order_id . "'");
//fin modif by paddybl for ecotax


j'obtiens l'erreur suivante en éditant une com. ou coté client en validant..
CITATION
1054 - Unknown column 'op.products_ecotax' in 'field list'

SELECT op.orders_products_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.ecotax_rates_id, op.products_ecotax, op.products_quantity, op.final_price, p.products_tax_class_id, p.products_weight FROM ( orders_products op) LEFT JOIN products p ON op.products_id = p.products_id WHERE orders_id = '3508'

[TEP STOP]


Si quelqu'un peut m'éclairer.
groover
as tu installé le fichier sql ?
NooKyZ
Bonsoir groover. Oui j'ai bien installé le fichier SQL mais j'ai fait l'install de la contrib sur une MS2 "vierge" par contre j'ai dupliqué une base SQL qui fonctionne sur une boutique plutot qu'une SQL neuve de MS2.
J'ai controlé par principe mais les tables et champs ont bien été ajouté sans problème, ou alors un problème d'incrément sur MYSQL 5..
paddybl
+1 pour groover

j'ai testé la requete et elle fonctionne, je pense qu'il faut vérifier la table order_products pour voir si les champs ecotax_rates_id,products_ecotax sont présent



à défaux essai de remplacer la requete par ceci

CODE
$orders_products_query = tep_db_query("
     SELECT
     op.orders_products_id,
     op.products_name,
     op.products_model,
     op.products_price,
     op.products_tax,
     op.ecotax_rates_id,    
     op.products_ecotax,
     op.products_quantity,
     op.final_price,
     p.products_tax_class_id,
     p.products_weight
   FROM  ( " . TABLE_ORDERS_PRODUCTS . " op)
  LEFT JOIN " . TABLE_PRODUCTS . " p
    ON  (op.products_id = p.products_id)
WHERE orders_id = '" . (int)$order_id . "'");




NooKyZ
Salut paddybl, j'ai essayer la modif cela ne change rien.
Par contre dans order_products je n'ai que le champ ecotax_rates_id et pas de champ products_ecotax ?
Celui ci n'est pas présent dans le fichier ecotax.sql V1.1 que j'ai téléchargé.
paddybl
en effet après vérification la création du champ est manquante dans la requète sql, bien vu

voilà, execute ceci dans phpmyadmin

CODE
ALTER TABLE `orders_products` ADD `products_ecotax` DECIMAL( 7, 4 ) NOT NULL;  


il est possible que les résultats de la facture ne soit plus juste! si tu souhaites modifier manuellement ta facture, dans le champ product_ecotax place la valeur en TTC de ton écotax genre "0.5000"

j'en profite pour corriger l'archive! merci de me l'avoir signalé
NooKyZ
rolleyes.gif Géant tongue.gif
Il manquait effectivement la requête dans l'install sql
CODE
ALTER TABLE `orders_products` ADD `products_ecotax` DECIMAL( 7, 4 ) NOT NULL;


Je viens de faire vite une com. cela passe sans problème coté client ainsi qu'à l'édition coté admin.
Je vais tester dans tous les sens la contrib et voir si je rencontre d'autre problèmes, en tout cas merci, je suivais ce post depuis qq jours et hier un essai concluant, très beau travail.

JE regarde les décimaux et dirais ce qu'il en est, merci.
paddybl
je suis heureux pour toi que celà fonctionne NooKyZ

A force de comparer les fichiers pour créer l'install, + les nouveautés on fini par oublier certaines choses. désolé du contretemps

si effectivement tu arrives à trouver une méthode pour éviter l'erreur d'arrondi je suis preneur

j'ai tourné le problème dans beaucoup de sens, mais la méthode de calcul d'origine des prix ht et ttc réppercut l'erreur lorsque l'on ajoute encore l'écotaxe
jack_bauer
Bonjour tout l'monde

Ca y'est paddybl c'est partit on dirait. Content pour toi. wink.gif
Bonne continuation.

NooKyZ
... une piste peut être à suivre ... >> ICI <<

un test rapide en l'appliquant j'ai ca "tjs erroné":
Sous-Total: 499.10€
TVA 19.6%: 81.79€
Dont TVA sur l'Ecotaxe : 0.02€
Colissimo suivi (1 kg): 7.10€
Total: 506.20€

+

j'édite mon produit coté admin, je remet le tarif "propre" en ttc/ht
(car par exemple 948 ttc / 792.5621 ht ressortait en 948.0957 ttc / 792.6421 ht)
et voila cette fois ci sans erreur de résultat au 2eme test:
Sous-Total: 499.00€
TVA 19.6%: 81.78€
Dont TVA sur l'Ecotaxe : 0.02€
Colissimo suivi (1 kg): 7.10€
Total: 506.10€

peut être une requête à lancer sous mysql à appliquer sur les tarifs déja rentrés.
paddybl
Bon concernant l'erreur d'arrondi sur l'impression des factures dans l'admin, je pense avoir trouvé la solution

chercher se code dans admin/orders.php

CODE
// debut modif by paddybl for ecotax
      echo '            </td>' . "\n";

   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   $product_info_ecotax=tep_get_ecotax_description($order->products[$i]['ecotax_rates_id']);
   echo '        <td class="dataTableContent" align="center" valign="top"><a style="cursor: pointer; cursor: hand;" onclick="java script:popup2=window.open(\'/popup_ecotax.php?rate='.$order->products[$i]['ecotax_rates_id'].'\',\'popup2\',\'scrollbars,resizable,width=625,height=500,left=50,top=50\'); popup2.focus(); return false;"><font color="blue"><u>'.$product_info_ecotax[0]['code'] . '</u></font></a></td>'. "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
  
       echo    '            <td class="dataTableContent" align="center" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    

      echo '        <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   echo '        <td class="dataTableContent" align="right" valign="top">'.$currencies->display_price(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id']), $order->products[$i]['ecotax_taxe_rate'], $order->products[$i]['qty']) . "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
      echo '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price']-$order->products[$i]['products_ecotax'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
    
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price']-$order->products[$i]['products_ecotax'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
   '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(($order->products[$i]['price'] * $order->products[$i]['qty'])+(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id'])*$order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax((tep_round($order->products[$i]['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-$order->products[$i]['products_ecotax'])* $order->products[$i]['qty'], $order->products[$i]['tax'])+($order->products[$i]['products_ecotax']* $order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
      echo '      </tr>' . "\n";
    }
?>
          <tr>
            <td align="right" <?php
  if(MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true'){echo 'colspan="10"';
  }else{echo 'colspan="8"';}
  
  ?>><table border="0" cellspacing="0" cellpadding="2">
<?php //fin modif by paddybl for ecotax




le remplacer par

CODE
// debut modif by paddybl for ecotax
      echo '            </td>' . "\n";

   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   $product_info_ecotax=tep_get_ecotax_description($order->products[$i]['ecotax_rates_id']);
   echo '        <td class="dataTableContent" align="center" valign="top"><a style="cursor: pointer; cursor: hand;" onclick="java script:popup2=window.open(\'/popup_ecotax.php?rate='.$order->products[$i]['ecotax_rates_id'].'\',\'popup2\',\'scrollbars,resizable,width=625,height=500,left=50,top=50\'); popup2.focus(); return false;"><font color="blue"><u>'.$product_info_ecotax[0]['code'] . '</u></font></a></td>'. "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
  
       echo    '            <td class="dataTableContent" align="center" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    
      echo '        <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   echo '        <td class="dataTableContent" align="right" valign="top">'.$currencies->display_price(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id']), $order->products[$i]['ecotax_taxe_rate'], $order->products[$i]['qty']) . "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
      echo '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_round($order->products[$i]['final_price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax(tep_round($order->products[$i]['final_price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
   '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format((tep_round($order->products[$i]['price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) * $order->products[$i]['qty'])+(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id'])*$order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '      
    
      <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax((tep_round($order->products[$i]['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])), $order->products[$i]['tax'])* $order->products[$i]['qty']+tep_round(($order->products[$i]['products_ecotax']* $order->products[$i]['qty']), $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
      echo '      </tr>' . "\n";
   }
?>
          <tr>
            <td align="right" <?php
  if(MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true'){echo 'colspan="10"';
  }else{echo 'colspan="8"';
  }
  
  ?>><table border="0" cellspacing="0" cellpadding="2">
<?php //fin modif by paddybl for ecotax




dans le fichier admin/invoice.php trouvé

CODE
// debut modif by paddybl for ecotax
      echo '            </td>' . "\n";

   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   $product_info_ecotax=tep_get_ecotax_description($order->products[$i]['ecotax_rates_id']);
   echo '        <td class="dataTableContent" align="center" valign="top">'.$product_info_ecotax[0]['code'] . '</td>'. "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
      echo '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    
      echo '        <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   echo '        <td class="dataTableContent" align="right" valign="top">'.$currencies->display_price(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id']), $order->products[$i]['ecotax_taxe_rate'], $order->products[$i]['qty']) . "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
      echo '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price']-$order->products[$i]['products_ecotax'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
    
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price']-$order->products[$i]['products_ecotax'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
   '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(($order->products[$i]['price'] * $order->products[$i]['qty'])+(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id'])*$order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax((tep_round($order->products[$i]['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-$order->products[$i]['products_ecotax'])* $order->products[$i]['qty'], $order->products[$i]['tax'])+($order->products[$i]['products_ecotax']* $order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
      echo '      </tr>' . "\n";
    }
?>
      <tr>
        <td align="right" <?php
  if(MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true'){echo 'colspan="10"';
  }else{echo 'colspan="8"';
  }
  
  ?>><table border="0" cellspacing="0" cellpadding="2">
<?php //fin modif by paddybl for ecotax
  for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    echo '          <tr>' . "\n" .
         '            <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
         '            <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
         '          </tr>' . "\n";
  }
//fin modif by paddybl for ecotax







remplacer par

CODE
// debut modif by paddybl for ecotax
      echo '            </td>' . "\n";

   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   $product_info_ecotax=tep_get_ecotax_description($order->products[$i]['ecotax_rates_id']);
   echo '        <td class="dataTableContent" align="center" valign="top"><u>'.$product_info_ecotax[0]['code'] . '</u></td>'. "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
  
       echo    '            <td class="dataTableContent" align="center" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    
      echo '        <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";
   if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$order->products[$i]['ecotax_rates_id']=="0"){
   echo '        <td class="dataTableContent" align="right" valign="top">'.$currencies->display_price(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id']), $order->products[$i]['ecotax_taxe_rate'], $order->products[$i]['qty']) . "\n";}else{if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true')echo '        <td class="dataTableContent" align="center" valign="top">&nbsp;</td>'. "\n";}
      echo '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_round($order->products[$i]['final_price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax(tep_round($order->products[$i]['final_price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
   '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format((tep_round($order->products[$i]['price'],$currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) * $order->products[$i]['qty'])+(tep_get_ecotax_price_value($order->products[$i]['ecotax_rates_id'])*$order->products[$i]['qty']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
           '      
    
      <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax((tep_round($order->products[$i]['final_price'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])-tep_round($order->products[$i]['products_ecotax'], $currencies->currencies[DEFAULT_CURRENCY]['decimal_places'])), $order->products[$i]['tax'])* $order->products[$i]['qty']+tep_round(($order->products[$i]['products_ecotax']* $order->products[$i]['qty']), $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
      echo '      </tr>' . "\n";
   }
?>
          <tr>
            <td align="right" <?php
  if(MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true'){echo 'colspan="10"';
  }else{echo 'colspan="8"';
  }
  
  ?>><table border="0" cellspacing="0" cellpadding="2">
<?php //fin modif by paddybl for ecotax


Merci Nookyz pour la piste, ce n'était pas la solution, mais celà ma obligé à revoir mon code... mrgreen.gif



Voilà, j'ai corrigé l'archive



D'autre part, je sais que celà ne se fait pas de réclamer.A tout hasard, je vous informe que j'ai placé un petit bouton de donation sur mon site. Si le coeur vous en dit pour noël et si vous souhaitez me faire un petit cadeau, je vous en remercie d'avance blush.gif

(c'est comme pour les pompiers, on donne ce que l'on veut...)

groover
Pour ma part, ca a l'air de fonctionner. Mis en prod ce jour.

Pour les utilisateurs de creload template Thema, ne pas oublier de modifier les fichiers whats_new et specials dans templates/thema/boxes.

Très bon travail de Paddybl.
Merci
jack_bauer
C'est clair que c'est une belle contrib.
Bonne journée
jack_bauer
Bjr
J'ai toujours ce problème d'affichage sur la page des produits (comme vue plus haut).
J'ai refait une install a neuf et rien ni fait. Que ce soit sous IE ou Firefox ca ne marche pas. Pourtant il y'a bien une classe ecotax sur les produits.
J'ai l'affichage par default d'osc (sans aucune modif des *.css).
Voila
merci a vous.
NooKyZ
Merci paddybl je vais mettre la modif sur ma ms2 en test.
Gnidhal
Et la contribution de Paddybl est disponible là : http://www.oscommerce.com/community/contributions,4779
smile.gif
paddybl
Voici une astuce qui va vous permettre de modifier la zone concernée par les tarifs d'écotax, pour tous les taux,et en une seule fois. En effet les 176 tarifs sont appliqué par défaut à la france métropolitaine (tax_zone_id ='2' de la table ecotax). Si votre zone d'application ne correspond pas, vous étes obligé de modifier une par une la zone de chaque tarif. (vu le nombre celà prend un moment... unsure.gif )
Pourquoi ces zones sont-elles importantes?
Tous comme le système de TVA le choix de la zone d'application permet d'affecter ou non l'écotax aux tarifs si le pays est ou non concerné. Problème si vous étes hors france ou si votre zone d'application ne correspond pas à celle d'origine l'ecotax ne sera pas appliqué.

pour changer la zone en une seule fois, trouver grace à phpmyadmin, le code correspondant à votre zone :

dans la table countries trouvez l'un des pays faisant partie de votre zone fiscale: notez le code countries_id correspondant.
dans la table zones_to_geo_zones trouvez le code précédemment noter dans la colonne zone_country_id, sur cette ligne notez la valeur de la colonne geo_zone_id. cette valeur correspond à la zone dans lequel ce trouve le pays qui doit étre écotaxé.

Cliquez ensuite sur l'onglet SQL en haut. Dans le champ execution de requete copiez ce code en remplacant la valeur 2 par celle que vous venez de noter.
CODE
UPDATE  `ecotax`  SET  `tax_zone_id`  =  '2'

exécutez la requete, et voilà 176 lignes corrigé en une seule fois rolleyes.gif

Maverick
Salut paddybl wink.gif

félicitation pour cette contrib!!! et bien content de la revoir acceptée sur le forum wink.gif

Je viens de l'installer( version 1.1), une après midi de taf... laugh.gif
J'ai constaté qu'il y avait un problème dans le calcul de la tva appliquée à l'écotaxe...

Un exemple valant mieux qu'un long discours:

1 x Hewlett Packard LaserJet 1100Xi 477.20€
Ecotaxe : Catégorie 3.6 [info] 0.50€

1 x Laser Monochrome HP LaserJet 1160 239.95€
Ecotaxe : Catégorie 3.6 [info] 0.50€


--------------------------------------------------------------------------------
Sous-Total: 718.15€
Expédition: 0.00€
Dont TVA sur l'Ecotaxe : 0.24€ au lieu de 1-(1/1.196)=0.1639 confused.gif
Dont TVA 19,6%: 117.61€
Total TTC: 718.15€


Le total TTC et le total TVA sont corrects...

Tu as une idée du problème?
wink.gif



paddybl
Salut Maverick, bien content moi aussi, je me sens moin seul dans mon coin...

alors voyons, ouvrez la bouche... mrgreen.gif

je réserve mon diagnostique ne sachant pas ou tu as constaté cette erreur ( partie client, partie admin) ?

sur la facture, l'historique client, partout ? si c'est partout, je vais avoir du taf...

il est clair que meme si je suis nul en math 0.8+0.8=0.16 on dirait que je travail pour les impots du coût...

j'avoue, je suis le medecin gynecoBLOG du centre géneral... lol



Aller j'attend un peu plus d'info





Maverick
Salut Paddy biggrin.gif

you welcome back at home, man !!!! laugh.gif

L'erreur se produit coté client, dans le récapitulatif de commande:
checkout_payment, checkout_confirmation et bon de commande...

wink.gif
Maverick
idem pour account_history, la facture et le mail de confirmation de commande...
confused.gif

un prob de calcul dans classes/order.php ????
paddybl
J'ai honte, cry.gif huh.gif blush.gif wink.gif shock.gif

Encore un matin ou je n'avais pas encore atteind mon 12eme café idea.gif

Bon en effet la coquille est dans le fichier /includes/classes/order.php

recherchez:

CODE
$this->info['ecotax_groups']["$products_ecotax_description"] +=tep_get_ecotax_taxable($this->products[$index]['ecotax_rates_id'])* $this->products[$index]['qty']+tep_get_ecotax_taxable($this->products[$index]['ecotax_rates_id'])*$this->products[$index]['qty'];



et remplacer par

CODE
  $this->info['ecotax_groups']["$products_ecotax_description"] +=tep_get_ecotax_taxable($this->products[$index]['ecotax_rates_id'])* $this->products[$index]['qty'];



Je vous dis que je devrais bosser pour les impots (shame on me...)


j'attend confirmation que cette modif fonctionne et je la publie sur osc
Maverick
Ah, ben y a pas........ ça va mieux comme ça.... laugh.gif laugh.gif laugh.gif laugh.gif

Nikel Paddy... wink.gif
Maverick
Salut paddy wink.gif

encore un petit problème dans le shopping cart....

CITATION
Warning: reset() [function.reset]: Passed variable is not an array or object in /home/WwwBSD/xxxxx/demo/includes/modules/order_total/ot_ecotax.php on line 29

Warning: Variable passed to each() is not an array or object in /home/WwwBSD/xxxxx/demo/includes/modules/order_total/ot_ecotax.php on line 30


ligne 29 et 30
CODE
      reset($order->info['ecotax_groups']);
      while (list($key, $value) = each($order->info['ecotax_groups'])) {


confused.gif

Et le lien info qui ne renseigne pas la classe de taxe dans le popup

Eco-participation (DEEE): Tarif HT Tarif TTCTVA (0%)
Classe d'appareil () Nous contacter Nous contacter
Not used

wink.gif
paddybl
Maverick, tu es mon ange gardien (de la paix)

tu es trop fort, tu arrive à retrouver toutes les coquilles que j'ai laissé !

A croire qu'il n'ya que toi qui utilise vraiment ecotax... merci cool.gif



en effet j'étais on va dire toujours pas au 12eme café pour cette page là non plus!

cette fois ci c'est pas du code en trop, c'est carrement du code en moin blink.gif



donc dans le fichier shopping_cart.php trouvez

CODE
    //debut modif by paddybl for ecotax
   $num_break=3;
      if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        reset($products[$i]['attributes']);
        while (list($option, $value) = each($products[$i]['attributes'])) {
          $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';$num_break++;
        }
      }


ajouter en dessous

CODE
if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true' && !$products[$i]['ecotax_rates_id']=="0"){
$product_info_ecotax=tep_get_ecotax_description($products[$i]['ecotax_rates_id']);

$ecotax_rates_id=($products[$i]['ecotax_rates_id']!=$product_info_ecotax[0]['ecotax_id_other']&&$product_info_ecotax[0]['ecotax_id_other']!=""&& $product_info_ecotax[0]['ecotax_id_other']!="0")?$product_info_ecotax[0]['ecotax_id_other']:$products[$i]['ecotax_rates_id'];
}






And i said "shame on me" one more time



dis moi si celà corrige l'ensemble...

Maverick
Re Paddy wink.gif

je sais pas si je suis le seul à l'utiliser mais quand les autres vont découvrir que c'est une obligation légale, je pense qu'ils vont s'affoler laugh.gif laugh.gif laugh.gif

Sinon concernant ta modif, idem: toujours l'erreur.... confused.gif
Mais, comme tu le dis, c'est un code manquant et il ne créé pas d'erreur supplémentaire

N'étant pas un grand devin du php laugh.gif rolleyes.gif (je suis plutot passé maitre dans l'intégration de contrib laugh.gif ), j'ai quand même remarqué que ta modif ne concerne pas "ecotax_groups" qui subit un reset par ot_ecotax....

je reste open pour tous les tests que tu veux... wink.gif

paddybl
VOYONS voyons

la modif que j'ai indiqué, sert à résoudre l'erreur de contenu dans l'affichage du popup (liens info)

par contre je ne vois pas d'erreur dans la classe ecotax!

le reset sert a recreer le tableau des infos d'ecotax

j'affecte dans un tableau 'ecotax_groups' la valeur de la tva sur l'ecotax. normalement celle-ci est defini dans la classe order.php au moment des calculs

je n'ai pas d'erreur a cette endroit, et j'ai plusieurs boutiques qui tournent avec. ou alors je n'ai compris ou tu as ce message d'erreur faudroit qu'on voit ca en mp pour etre sur

Mais merci encore de contribuer à amélioré ecotax

pipin
dry.gif salut tous le monde meilleux voeux a vous tous .

Paddybl j'ai installer ta contrib mais j'ai un gros probléme.
il ya quelque mois j'avais installer total b2b suite tous marché sans aucun probléme.
En installant ta contrib j'ai des bugs et impossible de faire fonctionné l'écotax dans le catalog.
Côté admin sa fonctionne sans aucun probléme.

Que dois je faire pour résoudre ????

Merci par avance le retour de ta réponse.

Bien Cordialement Pipin
paddybl
bonjour, le souci et que j'ai précisé que l'installation est faite pour oscommerce de base, dans le fichiers install.txt

j'ai conçut une version pour b2bsuite de canebule(le nom je suis pas sur), mais cette version n'est disponible que sur mon site (moyennant donation de principe, (tu fixes ton prix))

il y à vraiment beaucoup de différence entre une osc de base et b2bsuite, c'est pour celà!

quant à total b2b suite, je pense que celà doit compatible (en comparant les versions)

il est vrai que je suis débordé en se moment a produire la version 1.2

contenant quelques correction de bugs (surtout dans le fichier install.txt) de plus cette version, et grace à l'aide de frombelgium sera compatible pour l'écotax belges (recupel)

j'ai produit order check 2.51b( de gindhal) avec l'ecotax que je proposerai sitot que j'aurai une demie journée.

voilà, excusez mon indisponibilité en ce moment, mais je suis obligé d'intégrer ecotax sur une creload (j'ai accepté de le faire donc...) et c'est un vrai cauchemar tellement ils y à des différences.



Donc pour ceux qui utilise creload! surtout évité, le jour ou j'aurai le temp je compilerai une version ecotax creload! mais dans l'immédiat...



A suivre...
pipin
salut paddybl tu na pas a t'excuser ont ce douté que tu avais des occupations avant tous.
Concernant la creload c'est donc ce que je dispose sa va pas me facilité la tache mais je vais essayer de faire fonctionné si l'admin fonctionne ya pas de raison que sa marche pas dans le catalog, donc si j'arrive pour le catalog je t'en informerais les changements aprés tous ont est tous ici pour faire partager non !!!!.

Merci encore d'avoir pris l'initiative de faire la contrib ecotax.

Bien Amicale Pipin
paddybl
L'un des principales souci de la creload, concerne les fichiers /admin/catalog.php qui n' a rien à voir avec osc, /admin/order_edit.php,qui est totalement différent, invoice.php sur la version que je modif! ainsi que l'emplacement de beaucoup de fichier, ou encore print_order.php,print_invoice.php etc....

L'autre souci concernant creload, c'est certaines fonctions comme xsell..., n'existe pas dans osc et doivent ètre adapté ou programmer!

concernant /admin/catalog.php verifie bien (sur ecotax en images dans mon site) que tu as bien toute les fonctions !

dans l'ensemble celà reste faisable puisque j'ai presque fini! mais il y a trop de différence pour que je conseil l'installation et je ne peux personnellement pas en assumer le suivi.

bon courage

paddybl
Voilà avec un peu de retard, la sortie de la version 1.2

Cette version corrige quelques bugs dans le fichier d'installation et dans 1 ou 2 scripts. Nouveauté grace au travail de frombelgium, Ecotax inclus l'installation pour la Belgique de Récupel.
Nouveau site internet pour voi tous celà:
http://www.mabootic.net

pour télécharger cett version:

Télécharger Ecotax ver 1.2



Une autre nouveauté intéressante pour les utilisateurs d'ordercheck v2.5.1b(de gnidhal), une version spécialement compatible Ecotax-Recupel

pour télécharger cett version:

Télécharger OrderCheck compatible Ecotax-Récupel



quant à la sorti d' Infinit'Images, j'ai pris du retard dans la compilation des fichiers et de l'installation. Il va donc falloir patienter... tongue.gif



Pour ceux qui ne l'aurait pas encore vue, Infinit'images est une contribution qui permettra de gérer un nombre infini d'images de produit dans une seule fenetre fck-editor. Elle permet en outre ,grace à plusieurs animation Ajax et javascript, de faire des diaporamas réglables en durée, définir la taille et la position de l'ascanseur d'images,etc...

NooKyZ
Bonjour. J'ai juste pu tester sans plus pour l'instant la contribution 1.1 sur une ms2 de base. La rien à dire sur une ms2 vierge y a qu'à remplacer les fichiers, travail quasi pharaonique que cette contribution quand on voit ce qu'elle modifie dans la ms2 de base et à quel point il faut maitriser le sujet.

Ce qui me freine personnelement à l'installer c'est toute la difficulté d'intégrations de contributions ensuite, mon manuel illustré du php étant limité...
Il est sité plus haut un développement sur Créload... quelle version de Creload serait choisi pour cette contrib ? Car au vu des difficultées à intégrer quelques contribs lourdes... la manipulation de la bdd ressemble la à un jeux d'enfant.
paddybl
Il est vrai qu'écotax modifie pas mal de fichiers. Il est vrai aussi que l'intégration est plus compliqué sur une osc déjà modifiée. Mais comme pour chaque contribution que l'on ajoute, il est préférable de comparer le code avec celui existant, ne serait ce pour pas supprimer une contribution que l'on à installé entre temps.

Sur ce point, ecotax n'est pas plus compliquée qu'une autre!

J'ai pris soin (hormis oublie) de commenter chaque bloc de code ayant été modifié pour ecotax par:

CODE
// debut modif by paddybl for ecotax

le code

/fin modif by paddybl for ecotax


ou par

CODE
<!-- debut modif by paddybl for ecotax -->

le code

<!-- fin modif by paddybl for ecotax -->


et de maniere générale si l'on voit le mot ecotax! il vaut mieux ne pas effacer la ligne biggrin.gif

Concernant la creload, comme je l'ai expliqué j'ai accepté de tenter une intégration, que dans l'ensemble j'ai réussi, s'était une 6.2 je crois. ceci à été fait à titre de test pour manipuler cette version. mais la gestion des templates pose encore plus de difficultés d'intégration que pour osc (sur une note de 1 à 10: 4 pour osc, 8 pour creload).

Je n'effectuerai pas de suivie pour creload (si y en à que celà intéresse!). il faut dire que celà ma pris 30 heures pour trouver les bon fichiers, intégrer et reprogrammer certaines fonctions, et adapter les pages différentes mrgreen.gif et heureusement que j'avais fait conçu la contrib, sinon twisted.gif ...

Même si celà marche aussi bien que sur osCommerce, J'imagine le nombre de message que je risque de recevoir pour me demander un coup de main... celà devient un travail à plein temps voir plus...

Je me contenterai donc de faire un suivi pour osCommerce seulement. mais comme explique gnidhal le forum n'est pas un sav! (sinon je ferais payé lol wink.gif )

donc en conclusion ecotax n'est pas plus dur que d'autres contributions à installer! il est vrai qu'il serait plus simple de commencer avec une oscommerce incluant l'ecotax puis d'ajouter d'autres contrib (je n'ai pas modifié tous les fichiers tous de même! et d'ailleur bien souvant on ne retouchera pas les lignes ajoutées)

Je ne compilerai pas de version creload (même si j'ai les fichiers...)

quant à l'intégration d'écotax pour la liste énorme des contributions qui pourrait nécessiter un changement:comme me la fait remarquer gentillement gnidhal, je ne vais pas faire une version pour chacun. d'ailler sur ce fait, il n'est pas très dur de rajouter l'ecotax a un prix (comparer un fichier d'une boxe et vous verez)

ajouter
CODE
p.ecotax_rates_id à la requète où l'on trouve p.products_price
et ajouter
CODE
,$nom_de_la_requete['ecotax_rates_id'] aprés tep_get_tax_rate($nom_de_la_requete['products_tax_class_id'])
on peu guére faire plus simple pour ajouter l'eco-participation.



A suivre
paddybl
Je viens de publier sur oscommerce un correctif de ecotax 1.2 et order check compatible ecotax.

Des erreurs ont été retrouvées sur le calcul d'arrondi dans les pages, admin/orders.php et admin/invoices.php
pack complet



Consulter le fichier update 1.1 to 1.2 + correction du 15 01 2007.txt ou remplcaer les 2 fichiers



A bientot et n'oubliez pas de retourner les bugs que vous rencontrez

alsaco68
Hello Paddybl.
Super ta contrib, j'ai pu l'installer sur ma boutique MS2 sans probleme, par contre sur la boutique d'un ami que j'ai voulu aider, j'ai un probleme...
dans son classes/shopping_cart.php il a les lignes suivantes commentées:
CODE

/* Handled in PriceFormatter
//rmh M-S_multi-stores edited next line
        $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image,p.ecotax_rates_id, p.products_price, p.products_weight, p.products_tax_class_id, p.distributors_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'AND p2s.stores_id = '" . STORES_ID . "'");
        if ($products = tep_db_fetch_array($products_query)) {
          $prid = $products['products_id'];
          $products_price = $products['products_price'];

//rmh M-S_multi-stores edited next line
          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " s where products_id = '" . (int)$prid . "' and status = '1' AND (s.stores_id = '" . STORES_ID . "')");
          if (tep_db_num_rows($specials_query)) {
            $specials = tep_db_fetch_array($specials_query);
            $products_price = $specials['specials_new_products_price'];
          }

  */
            $product_info_ecotax=tep_get_ecotax_description($products['ecotax_rates_id']);
$ecotax_rates_id=($products['ecotax_rates_id']!=$product_info_ecotax[0]['ecotax_id_other']&&$product_info_ecotax[0]['ecotax_id_other']!="")?$product_info_ecotax[0]['ecotax_id_other']:$products['ecotax_rates_id'];
$products_price=0;

$specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$products_id . "' and status = '1' AND (stores_id LIKE '%[" . STORES_ID . "]%')");
          if (tep_db_num_rows ($specials_query)) {
            $specials = tep_db_fetch_array($specials_query);
            $products_price = $specials['specials_new_products_price'];
          }


J'ai trouvé que les tarifs et autres détails sont gerés par includes/classes/price_schedule.php
mais j'ai beau essayer toutes les modifs possibles, la page catalog/shopping_cart.php et checkout_paiement.php ne recoivent jamais la valeur de la variable ecotax_rates_id.

La page catalog/shopping_cart.php indique toujours une ecotax a 0.00€ et catalog/shopping_cart.php n'indique rien...
Si j'utilise le fichier includes/classes/shopping_cart.php tout fonctionne, donc il y a un probleme au niveau de classes/shopping_cart.php ou includes/classes/price_schedule.php


Si quelqu'un peut m'aider a trouver ce qui cloche, je colle le code de includes/classes/price_schedule.php

CODE



<?php
/*
  $Id: price_schedule.php,v 1.0 2004/08/23 22:50:52 rmh Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

/*
    price_schedule.php - module to support customer classes with quantity pricing
    Originally Created 2003, Beezle Software based on some code mods by WasaLab Oy (Thanks!)
    Modified by Ryan Hobbs (hobbzilla)
*/

class PriceFormatter {
  var $hiPrice;
  var $lowPrice;
  var $quantity;
  var $hasQuantityPrice;
  var $hasSpecialPrice;
  var $qtyPriceBreaks;

  function PriceFormatter($prices=NULL) {
    $this->productsID = -1;

    $this->hasQuantityPrice=false;
    $this->hasSpecialPrice=false;

    $this->hiPrice=-1;
    $this->lowPrice=-1;
    $this->thePrice = -1;
    $this->specialPrice = -1;
    $this->qtyBlocks = 1;
    $this->qtyPriceBreaks = 0;

    if($prices) {
      $this->parse($prices);
    }
  }

  function encode() {
    $str = $this->productsID . ":"
           . (($this->hasQuantityPrice == true) ? "1" : "0") . ":"
           . (($this->hasSpecialPrice == true) ? "1" : "0") . ":"
           . $this->quantity[1] . ":"
           . $this->quantity[2] . ":"
           . $this->quantity[3] . ":"
           . $this->quantity[4] . ":"
           . $this->price[1] . ":"
           . $this->price[2] . ":"
           . $this->price[3] . ":"
           . $this->price[4] . ":"
           . $this->thePrice . ":"
           . $this->specialPrice . ":"
           . $this->qtyBlocks . ":"
           . $this->taxClass;
    return $str;
  }

  function decode($str) {
    list($this->productsID,
         $this->hasQuantityPrice,
         $this->hasSpecialPrice,
         $this->quantity[1],
         $this->quantity[2],
         $this->quantity[3],
         $this->quantity[4],
         $this->price[1],
         $this->price[2],
         $this->price[3],
         $this->price[4],
         $this->thePrice,
         $this->specialPrice,
         $this->qtyBlocks,
         $this->taxClass) = explode(":", $str);

    $this->hasQuantityPrice = (($this->hasQuantityPrice == 1) ? true : false);
    $this->hasSpecialPrice = (($this->hasSpecialPrice == 1) ? true : false);
  }


  function parse($prices) {
    global $customer_group_id;


    if (!tep_not_null($customer_group_id)) $customer_group_id = VISITOR_PRICING_GROUP;

    $this->productsID = $prices['products_id'];
    $this->hasQuantityPrice=false;
    $this->hasSpecialPrice=false;

   $price_schedule_query = tep_db_query("select products_groups_price, products_groups_price_qty FROM " . TABLE_PRODUCTS_PRICE_SCHEDULES . " WHERE products_id = '" . $prices['products_id'] . "' and customers_groups_id = '" . (int)$customer_group_id . "' and stores_id = '" . STORES_ID . "'");


    $this->qtyPriceBreaks = tep_db_num_rows($price_schedule_query);

    $this->thePrice = $prices['products_price'];
    $this->hiPrice = $this->thePrice;
    $this->lowPrice = $this->thePrice;
    

    $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$this->productsID  . "' and status = '1' AND (stores_id LIKE '%[" . STORES_ID . "]%')");
    if (tep_db_num_rows ($specials_query)) {
    $specials = tep_db_fetch_array($specials_query);
    $new_price = $specials['specials_new_products_price'];
    }
    $specials= tep_get_products_special_price($this->productsID);
    if ($specials)
    $new_price=$specials;
    $this->specialPrice=$new_price;
    

    $this->hasSpecialPrice = tep_not_null($this->specialPrice);

    $this->qtyBlocks = $prices['products_qty_blocks'];
    $this->taxClass=$prices['products_tax_class_id'];
    $n = 0;

    while ($price_schedule = tep_db_fetch_array($price_schedule_query)) {
      $this->price[$n]=$price_schedule['products_groups_price'];
      $this->quantity[$n]=$price_schedule['products_groups_price_qty'];
      if ($this->quantity[$n] == '1') {
        $this->thePrice = $this->price[$n];
        $this->hiPrice = $this->thePrice;
        $this->lowPrice = $this->thePrice;
      } else {
        $this->hasQuantityPrice = true;  
      }
      $n += 1;
    }

    for($i=0; $i<$this->qtyPriceBreaks; $i++) {
      if ($this->hasSpecialPrice == true) {  
        $this->hiPrice = $this->specialPrice;
        if ($this->price[$i] > $this->specialPrice) {
          $this->price[$i] = $this->specialPrice;
        }
      }

      if ($this->hasQuantityPrice == true) {      
        if ($this->price[$i] > $this->hiPrice) {
          $this->hiPrice = $this->price[$i];
        }
        if ($this->price[$i] < $this->lowPrice) {
          $this->lowPrice = $this->price[$i];
        }
      }
    }
  
  
        }

  function loadProduct($product_id, $language_id=1)
  {
    $sql="select pd.products_name, p.products_model, p.products_image, p.products_id, p.manufacturers_id, p.products_price, p.products_weight, p.products_qty_blocks, p.products_tax_class_id, p.distributors_id, IF(s.status = '1' AND s.stores_id = '" . STORES_ID . "', s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status = '1' AND s.stores_id = '" . STORES_ID . "', s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id and s.stores_id = '" . STORES_ID . "', " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id
    where p2s.stores_id = '" . STORES_ID . "' AND p.products_status = '1' and p.products_id = '" . (int)$product_id . "' and pd.products_id = '" . (int)$product_id . "' and pd.language_id = '". (int)$language_id ."'";

    $product_info_query = tep_db_query($sql);
    $product_info = tep_db_fetch_array($product_info_query);
    $this->parse($product_info);

    return $product_info;
  }

  function computePrice($qty)  {

    $qty = $this->adjustQty($qty);
    $price = $this->thePrice;

    if ($this->hasSpecialPrice == true) {
        $price = $this->specialPrice;
    }

    if ($this->hasQuantityPrice == true) {
      for ($i=0; $i<$this->qtyPriceBreaks; $i++) {
        if (($this->quantity[$i] > 0) && ($qty >= $this->quantity[$i])) {
          $price = $this->price[$i];
        }
      }
    }
    return $price;
  }

// Force QTY_BLOCKS granularity
  function adjustQty($qty) {

    $qb = $this->getQtyBlocks();
    if ($qty < 1) {
      $qty = 1;
    }

    if ($qb >= 1) {
      if ($qty < $qb) {
        $qty = $qb;
      }

      if (($qty % $qb) != 0) {
        $qty += ($qb - ($qty % $qb));
      }
    }
    return $qty;
  }

  function getQtyBlocks() {
    return $this->qtyBlocks;
  }

  function getPrice() {
    return $this->thePrice;
  }

  function getLowPrice() {
    return $this->lowPrice;
  }

  function getHiPrice() {
    return $this->hiPrice;
  }

  function hasSpecialPrice() {
    return $this->hasSpecialPrice;
  }

  function hasQuantityPrice() {
    return $this->hasQuantityPrice;
  }

  function getPriceString($style='productPriceInBox') {
    global $currencies, $customer_id;

// If you want to change the format of the price/quantity table
// displayed on the product information page, here is where you do it.


    if (($this->hasSpecialPrice == true) && ($this->hasQuantityPrice == false)) {
      $lc_text = '&nbsp;<s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span>&nbsp;';
    }



    if($this->hasQuantityPrice == true) {
      $lc_text = '<table align="top" border="1" cellspacing="0" cellpadding="0"><tr><td align="center" class=' . $style. ' colspan="2">' . ($this->hasSpecialPrice == true ? '<s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span>&nbsp;' : $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) ) . '</td></tr>';

      for($i=0; $i<=$this->qtyPriceBreaks; $i++) {
        if(($this->quantity[$i] > 0) && ($this->price[$i] > $this->specialPrice)) {
          $lc_text .= '<tr><td class='.$style.'>' . $this->quantity[$i] . '+&nbsp;</td><td class='.$style.'>' . $currencies->display_price($this->price[$i], tep_get_tax_rate($this->taxClass)) . '</td></tr>';
        }
      }
      $lc_text .= '</table>';
    } else {
      if ($this->hasSpecialPrice == true) {
        $lc_text = '&nbsp;<s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span>&nbsp;';
      } else {
        $lc_text = '&nbsp;' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '&nbsp;';
      }
    }
    if (VISITOR_PRICING_GROUP < '0' && !tep_session_is_registered('customer_id')) {
      return '';
    } else {
      return $lc_text;
    }
  }

  function getPriceStringShort() {
    global $currencies, $customer_id;

    if (($this->hasSpecialPrice == true) && ($this->hasQuantityPrice == false)) {          
      $lc_text = '&nbsp;<s>' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '</s>&nbsp;&nbsp;<span class="productSpecialPrice">' . $currencies->display_price($this->specialPrice, tep_get_tax_rate($this->taxClass)) . '</span>&nbsp;';
    } elseif ($this->hasQuantityPrice == true) {    
      $lc_text = '&nbsp;' . $currencies->display_price($this->lowPrice, tep_get_tax_rate($this->taxClass)) . ' - ' . $currencies->display_price($this->hiPrice, tep_get_tax_rate($this->taxClass)) . '&nbsp;';
    } else {
      $lc_text = '&nbsp;' . $currencies->display_price($this->thePrice, tep_get_tax_rate($this->taxClass)) . '&nbsp;';
    }

    if (VISITOR_PRICING_GROUP < '0' && !tep_session_is_registered('customer_id')) {
      return TEXT_LOGIN_TO_SEE_PRICES;
    } else {
      return $lc_text;
    }
  }
}
?>

paddybl
Bonjour, en effet ilest nécessaire de modifier la classe price_sheduler.php. le problème c'est que tu ne dis pas qu'elle est c'est contribution a quoi sert elle, ou tu ne donnes pas le shopping_cart.php pour comprendre l'include de cette class donc c'est modifier dans le vide sans ces infos

A+

alsaco68
Hello, le price sheduler je sais pas trop a quelle contrib il correspond, c'est pas ma boutique. Je te colle ci dessous le shopping_cart.php et includes/classes/shopping_cart.php.

Merci de ton aide


shopping_cart.php
CODE

<?php
/*
  $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  require("includes/application_top.php");

//rmh M-S_pricing begin
  // if the customer is not logged on AND don't display prices to visitors is selected,
  // redirect them to the login page
  if (!tep_session_is_registered('customer_id') && (VISITOR_PRICING_GROUP < '0')) {
    $navigation->set_snapshot();
    tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
  }
//rmh M-S_pricing end
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART);

  $breadcrumb->add(NAvb script:popup2=window.open(\'popup_ecotax.php?rate='.$ecotax_rates_id.'\',\'popup2\',\'scrollbars,resizable,width=625,height=500,left=50,top=50\'); popup2.focus(); return false;"><font color="blue"><u>[info]</u></font></a></div>';}
                        else {if ($ecotax_rates_id!="0"){
                        $product_info_ecotax=tep_get_ecotax_description($ecotax_rates_id);
                        $products_name.='<div align="left"><img src="/images/ecotaxe_on.jpg" border="0" height="15" align="absmiddle">&nbsp;<nobr><small>Ecotaxe non incluse<br> Catégorie '.$product_info_ecotax[0]['code'].' '.'<a style="cursor: pointer; cursor: hand;" onclick="java script:popup2=window.open(\'popup_ecotax.php?rate='.$idcotaxe.'\',\'popup2\',\'scrollbars,resizable,width=625,height=500,left=50,top=50\'); popup2.focus(); return false;"><font color="blue"><u>[info]</u></font></a></div>';}
                        
        }}
      $products_name .= '    </td>' .
                        '  </tr>' .
                        '</table>';        

      $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"',
                                             'text' => $products_name);                
//fin modif by paddybl for ecotax

      $info_box_contents[$cur_row][] = array('align' => 'center',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

      //debut modif by paddybl for ecotax
                if (MODULE_ORDER_TOTAL_ECOTAX_INCLUDE=="True" && !$products[$i]['ecotax_rates_id']=="0"){
      $info_box_contents[$cur_row][] = array('align' => 'right',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']),$ecotax_rates_id, $products[$i]['quantity']) . '</b>');}
else
     { if ($products[$i]['ecotax_rates_id']!="0"){
     $text_break="";
     for($k=0;$k<$num_break;$k++){$text_break.="<br>";}
     $add_ecotax_price=$text_break.'<nobr>+'.$currencies->display_price(tep_get_ecotax_price_value($ecotax_rates_id),tep_get_ecotax_rate( $ecotax_rates_id),0, $products[$i]['quantity']).'</nobr>';}else{$add_ecotax_price="";}
     $info_box_contents[$cur_row][] = array('align' => 'right',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => '<b><nobr>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']),0, $products[$i]['quantity']) . '</nobr></b>'.$add_ecotax_price);}


     $mao=mysql_result(tep_db_query("select * from products where products_id=".$products[$i]['id']),0,'products_make_an_offer');
      if(TYPE_SITE=='pro'&&$propos)
      if($mao)
        $info_box_contents[$cur_row][] = array('align' => 'right',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => '<b>' . tep_draw_input_field('cart_prop[]',round($products[$i]['final_price']*1.196,2), 'size="8"'));
      else
      {
        $info_box_contents[$cur_row][] = array('align' => 'right',
                                             'params' => 'class="productListing-data" valign="top"',
                                             'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) .tep_draw_hidden_field('cart_prop[]', $products[$i]['final_price']). '</b>');
    
      }
    }

    new productListingBox($info_box_contents);
?>
        </td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td align="right" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL;?>
        <?php echo $currencies->display_price($cart->show_total(),0);?></b></td>
      </tr>


<?php
    if ($any_out_of_stock == 1) {
      if (STOCK_ALLOW_CHECKOUT == 'true') {
?>
      <tr>
        <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td>
      </tr>
<?php
      } else {
?>
      <tr>
        <td class="stockWarning" align="center"><br><?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td>
      </tr>
<?php
      }
    }
    if(TYPE_SITE=='pro')
    {
    if (!$propos)
    echo '<tr>
        <td><a href='.FILENAME_SHOPPING_CART.'?propos=1>Proposer</td>
      </tr>';
    else
    echo '<tr>
        <td><a href=# onclick="document.cart_quantity.action=\'index.php?env_prop=1\';document.cart_quantity.submit()">Valider la proposition</td>
      </tr>';
    }
?>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td>
<?php
    $back = sizeof($navigation->path)-2;
    if (isset($navigation->path[$back])) {
?>
                <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td>
<?php
    }
    
?>
                <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
  
   <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
   </tr>
<!-- BEGIN estimated shipping -->
   <tr>
     <td><br><?php include(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING); ?></td>
   </tr>
<!-- END estimated shipping -->
        </table></td>
      </tr>
<?php
  } else {
?>
      <tr>
        <td align="center" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
<?php
  }
?>
    </table></form></td>
<!-- body_text_eof //-->
    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
    </table></td>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>




includes/classes/shopping_cart.php.
CODE


/*
  $Id: shopping_cart.php,v 1.35 2003/06/25 21:14:33 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  class shoppingCart {
    var $contents, $total, $weight, $cartID, $content_type;

    function shoppingCart() {
      $this->reset();
    }

    function restore_contents() {
// ############Added CCGV Contribution ##########
      global $customer_id, $gv_id, $REMOTE_ADDR;
//      global $customer_id;
// ############ End Added CCGV Contribution ##########

      if (!tep_session_is_registered('customer_id')) return false;

// insert current cart contents in database
      if (is_array($this->contents)) {
        reset($this->contents);
        while (list($products_id, ) = each($this->contents)) {
          $qty = $this->contents[$products_id]['qty'];
//rmh M-S_multi-stores edited next line
          $product_query = tep_db_query("select cb.products_id from " . TABLE_CUSTOMERS_BASKET . " cb INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON cb.products_id = p2s.products_id AND cb.customers_basket_stores_id = p2s.stores_id where cb.customers_id = '" . (int)$customer_id . "' and cb.products_id = '" . tep_db_input($products_id) . "' and cb.customers_basket_stores_id = '" . STORES_ID . "'");
          if (!tep_db_num_rows($product_query)) {
//rmh M-S_multi-stores edited next line
            tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added, customers_basket_stores_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "', '" . STORES_ID . "')");
            if (isset($this->contents[$products_id]['attributes'])) {
              reset($this->contents[$products_id]['attributes']);
              while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
//rmh M-S_multi-stores edited next line
                tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, customers_basket_stores_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . STORES_ID . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "')");
              }
            }
          } else {
//rmh M-S_multi-stores edited next line
            tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $qty . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
          }
        }
// ############ Added CCGV Contribution ##########
        if (tep_session_is_registered('gv_id')) {
          $gv_query = tep_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $gv_id . "', '" . (int)$customer_id . "', now(),'" . $REMOTE_ADDR . "')");
          $gv_update = tep_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $gv_id . "'");
          tep_gv_account_update($customer_id, $gv_id);
          tep_session_unregister('gv_id');
        }
// ############ End Added CCGV Contribution ##########
      }

// reset per-session cart contents, but not the database contents
      $this->reset(false);

//rmh M-S_multi-stores edited next line
      $products_query = tep_db_query("select cb.products_id, cb.customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " cb INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON cb.products_id = p2s.products_id AND cb.customers_basket_stores_id = p2s.stores_id where cb.customers_id = '" . (int)$customer_id . "' and cb.customers_basket_stores_id = '" . STORES_ID . "'");
      while ($products = tep_db_fetch_array($products_query)) {
        $this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity']);
// attributes
//rmh M-S_multi-stores edited next line
        $attributes_query = tep_db_query("select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
        while ($attributes = tep_db_fetch_array($attributes_query)) {
          $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id'];
        }
      }

      $this->cleanup();
    }

    function reset($reset_database = false) {
      global $customer_id;

      $this->contents = array();
      $this->total = 0;
      $this->weight = 0;
      $this->content_type = false;

      if (tep_session_is_registered('customer_id') && ($reset_database == true)) {
//rmh M-S_multi-stores edited next 2 lines
        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and customers_basket_stores_id = '" . STORES_ID . "'");
        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and customers_basket_stores_id = '" . STORES_ID . "'");
      }

      unset($this->cartID);
      if (tep_session_is_registered('cartID')) tep_session_unregister('cartID');
    }

    function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) {
      global $new_products_id_in_cart, $customer_id;


//rmh M-S_pricing begin

if (TYPE_SITE == 'pro') {

      $pf = new PriceFormatter;    
      $pf->loadProduct($products_id);
      $qty = $pf->adjustQty($qty);    }
//rmh M-S_pricing end
      $products_id_string = tep_get_uprid($products_id, $attributes);
      $products_id = tep_get_prid($products_id_string);

      if (is_numeric($products_id) && is_numeric($qty)) {
        $check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
        $check_product = tep_db_fetch_array($check_product_query);

        if (($check_product !== false) && ($check_product['products_status'] == '1')) {
          if ($notify == true) {
            $new_products_id_in_cart = $products_id;
            tep_session_register('new_products_id_in_cart');
          }

          if ($this->in_cart($products_id_string)) {
            $this->update_quantity($products_id_string, $qty, $attributes);
            
         } else {
            $this->contents[$products_id_string] = array('qty' => $qty);
// insert into database //rmh M-S_multi-stores edited next line
          
if (tep_session_is_registered('customer_id') && $customer_id>0) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added, customers_basket_stores_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "', '" . STORES_ID . "')");

               // if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added, customers_basket_stores_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "', '" . STORES_ID . "')");

            if (is_array($attributes)) {
              reset($attributes);
              while (list($option, $value) = each($attributes)) {
                $this->contents[$products_id_string]['attributes'][$option] = $value;
// insert into database //rmh M-S_multi-stores edited next line
if (tep_session_is_registered('customer_id') && $customer_id>0) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, customers_basket_stores_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . STORES_ID . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");

                 //if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, customers_basket_stores_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . STORES_ID . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')");
              }
            }
          }


            

     // produit 423 limitation de l'achat a 1 piece
     if (isset($this->contents[276])) {  
    $itgate = 'ok'; }
     if ($this->in_cart($products_id)) {
//quantité 1 pour maxi pour le produit 423
  if ($products_id == '423' and $itgate == 'ok') { $this->update_quantity(423, $quantity = '1', $attributes = '');
  }
  if ($products_id == '423' and $itgate != 'ok') { $this->update_quantity(423, $quantity =0, $attributes);
}
        }
//   produit 423 limitation de l'achat a 1 piece





          $this->cleanup();

// assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
          $this->cartID = $this->generate_cart_id();
        }
      }
    }

    function update_quantity($products_id, $quantity = '', $attributes = '') {
      global $customer_id;

      $products_id_string = tep_get_uprid($products_id, $attributes);
      $products_id = tep_get_prid($products_id_string);

      if (is_numeric($products_id) && isset($this->contents[$products_id_string]) && is_numeric($quantity)) {
        $this->contents[$products_id_string] = array('qty' => $quantity);
// update database
//rmh M-S_multi-stores edited next line
      //  if                 (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
        if (tep_session_is_registered('customer_id') && $customer_id>0) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . (int)$quantity . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
        if (is_array($attributes)) {
          reset($attributes);
          while (list($option, $value) = each($attributes)) {
            $this->contents[$products_id_string]['attributes'][$option] = $value;
// update database
//rmh M-S_multi-stores edited next line
          //                 if (tep_session_is_registered('customer_id')) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "' and customers_basket_stores_id = '" . STORES_ID . "'");
           if (tep_session_is_registered('customer_id') && $customer_id>0) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . (int)$value . "' where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id_string) . "' and products_options_id = '" . (int)$option . "' and customers_basket_stores_id = '" . STORES_ID . "'");

          }
        }
      }
    }

    function cleanup() {
      global $customer_id;

      reset($this->contents);
      while (list($key,) = each($this->contents)) {
        if ($this->contents[$key]['qty'] < 1) {
          unset($this->contents[$key]);
// remove from database                          
          if (tep_session_is_registered('customer_id')) {
//rmh M-S_multi-stores edited next 2 lines
            tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
            tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($key) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
          }
        }
      }
    }

    function count_contents() {  // get total number of items in cart
      $total_items = 0;
      if (is_array($this->contents)) {
        reset($this->contents);
        while (list($products_id, ) = each($this->contents)) {
          $total_items += $this->get_quantity($products_id);
        }
      }

      return $total_items;
    }

    function get_quantity($products_id) {
      if (isset($this->contents[$products_id])) {
        return $this->contents[$products_id]['qty'];
      } else {
        return 0;
      }
    }

    function in_cart($products_id) {
      if (isset($this->contents[$products_id])) {
        return true;
      } else {
        return false;
      }
    }

    function remove($products_id) {      
      global $customer_id;

      unset($this->contents[$products_id]);
// remove from database
      if (tep_session_is_registered('customer_id')) {
//rmh M-S_multi-stores edited next 2 lines
        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
        tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products_id) . "' and customers_basket_stores_id = '" . STORES_ID . "'");
    
      }


  // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
      $this->cartID = $this->generate_cart_id();

    }

    function remove_all() {
      $this->reset();
    }

    function get_product_id_list() {
      $product_id_list = '';
      if (is_array($this->contents)) {
        reset($this->contents);
        while (list($products_id, ) = each($this->contents)) {
          $product_id_list .= ', ' . $products_id;
        }
      }

      return substr($product_id_list, 2);
    }

    function calculate() {
      
       if (TYPE_SITE == 'pro') {   global $languages_id; }
      $this->total = 0;
      $this->weight = 0;
      if (!is_array($this->contents)) return 0;
      if (TYPE_SITE == 'pro') {
        
        // *********************** Ajout PRO prix special par client *********************************************
  global $customer_id;
$customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id =  '" . $customer_id . "'");
$customer_group_id = tep_db_fetch_array($customer_group_query);
  // *********************** FIN Ajout PRO prix special par client *********************************************


        $pf = new PriceFormatter; }


      reset($this->contents);
      while (list($products_id, ) = each($this->contents)) {
        $qty = $this->contents[$products_id]['qty'];

// products price

        if (TYPE_SITE == 'pro') {
                //  Prix site  pro
         if ($product = $pf->loadProduct($products_id, $languages_id)){
          $prid = $product['products_id'];
          $products_tax = tep_get_tax_rate($product['products_tax_class_id']);
         $products_price = $pf->computePrice($qty); }
          $products_weight = $product['products_weight'];

//******************** Ajout PRO Prix special par client **********************************
          if ($customer_group_id['customers_group_id']>$products_price){
  $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $products_id . "' and customers_group_id =  '" . $customer_group_id['customers_group_id'] . " and quant<=$qty'");
  if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
    $products_price = $customer_group_price['customers_group_price'];
  }
}
//******************** FIN Ajout PRO Prix special par client **********************************
          



        $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1' AND (stores_id LIKE '%[" . STORES_ID . "]%')");
        if (tep_db_num_rows ($specials_query)) {
        $specials = tep_db_fetch_array($specials_query);
        if ($specials['specials_new_products_price']&&$specials['specials_new_products_price']<$products_price)
        $products_price = $specials['specials_new_products_price'];
        }
        $special_price = tep_get_products_special_price($products_id);
        if ($special_price&&$special_price<$products_price) {
        $products_price = $special_price;
        }
        
          $this->total += tep_add_tax($products_price, $products_tax) * $qty;
          
          //debut modif by paddybl for ecotax
if (MODULE_ORDER_TOTAL_ECOTAX_STATUS=='true'){
        $shown_price_with_ecotax = tep_add_ecotax(tep_add_tax($products_price, $products_tax) * $qty, tep_get_ecotax_rate($products_ecotax), $products_ecotax, $qty);
               $this->total += $shown_price_with_ecotax;
        }else{
          $this->total += tep_add_tax($products_price, $products_tax) * $qty;
          }
//fin modif by paddybl for ecotax

          $this->weight += ($qty * $products_weight);
        
        } else {
        // fin Prix site pro

      
         //  Prix site non pro
         //ligne suivante modif by paddybl for ecotax
        $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, ecotax_rates_id, products_weight from " . TABLE_PRODUCTS . " where products_id='" . (int)tep_get_prid($products_id) . "'");
        if ($product = tep_db_fetch_array($product_query))    {
          $prid = $product['products_id'];
          $products_tax = tep_get_tax_rate($product['products_tax_class_id']);
          
      //debut modif by paddybl for ecotax
$product_info_ecotax=tep_get_ecotax_description($product['ecotax_rates_id']);
$ecotax_rates_id=($product['ecotax_rates_id']!=$product_info_ecotax[0]['ecotax_id_other']&&$product_info_ecotax[0]['ecotax_id_other']!="")?$product_info_ecotax[0]['ecotax_id_other']:$product['ecotax_rates_id'];
      
          $products_ecotax = $ecotax_rates_id;
//fin modif by paddybl for ecotax

           $products_price = $product['products_price'];
          $products_weight = $product['products_weight'];
global $customer_id;
$customer_group_query = tep_db_query("select customers_group_id from " . TABLE_CUSTOMERS . " where customers_id =  '" . $customer_id . "'");
$customer_group_id = tep_db_fetch_array($customer_group_query);
if ($customer_group_id['customers_group_id']>$products_price){
  $customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $products_id . "' and customers_group_id =  '" . $customer_group_id['customers_group_id'] . "'");
  if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
    $products_price = $customer_group_price['customers_group_price'];
  }
}
        

          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . (int)$prid . "' and status = '1' AND (stores_id LIKE '%[" . STORES_ID . "]%')");
          if (tep_db_num_rows ($specials_query)) {
            $specials = tep_db_fetch_array($specials_query);
            $products_price = $specials['specials_new_products_price'];
          }
$special_price = tep_get_products_special_price($products_id);
         if ($special_price) {
            $products_price = $special_price;
          }
          


          $this->total += tep_add_tax($products_price, $products_tax) * $qty;
          $this->weight += ($qty * $products_weight);
        }
        }
        // fin Prix site non pro

// attributes price
        if (isset($this->contents[$products_id]['attributes'])) {
          reset($this->contents[$products_id]['attributes']);
          while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
            $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
            $attribute_price = tep_db_fetch_array($attribute_price_query);
            if ($attribute_price['price_prefix'] == '+') {
              $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
            } else {
              $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax);
            }
       &nbs
paddybl
J'ai à nouveau retrouvé des erreurs d'arrondis sur les comandes et factures. je donc republier les correctifs sur osCommerce

blush.gif

alsaco68
Pour info... je viens de rafaire l'installation complete...
Voici la seule partie du code que je n'ai pas pu mettre...

CODE


--------------------------------
vers ligne 3324 trouvez
--------------------------------
        $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
--------------------------------  
remplacer par
--------------------------------
      //debut modif by paddybl for ecotax
        $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id, ecotax_rates_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
        //fin modif by paddybl for ecotax



--------------------------------
vers ligne 332 à 335 trouver
--------------------------------
          if (tep_db_num_rows($specials_query)) {
            $specials = tep_db_fetch_array($specials_query);
            $products_price = $specials['specials_new_products_price'];
          }
--------------------------------  
ajouter en dessous
--------------------------------
            //debut modif by paddybl
            $product_info_ecotax=tep_get_ecotax_description($products['ecotax_rates_id']);
$ecotax_rates_id=($products['ecotax_rates_id']!=$product_info_ecotax[0]['ecotax_id_other']&& $product_info_ecotax[0]['ecotax_id_other']!="")?$product_info_ecotax[0]['ecotax_id_other']:$products['ecotax_rates_id'];
            //fin modif by paddybl
            



La partie du code a modifier n'est pas gerée dans includes/classes/shopping_cart.php c'est commenté...

CODE

/* Handled in PriceFormatter
//rmh M-S_multi-stores edited next line
        $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id, p.distributors_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd INNER JOIN " . TABLE_PRODUCTS_TO_STORES . " p2s ON p.products_id = p2s.products_id where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'AND p2s.stores_id = '" . STORES_ID . "'");
        if ($products = tep_db_fetch_array($products_query)) {
          $prid = $products['products_id'];
          $products_price = $products['products_price'];

//rmh M-S_multi-stores edited next line
          $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " s where products_id = '" . (int)$prid . "' and status = '1' AND (s.stores_id = '" . STORES_ID . "')");
          if (tep_db_num_rows($specials_query)) {
            $specials = tep_db_fetch_array($specials_query);
            $products_price = $specials['specials_new_products_price'];
          }

  */



comme les commentaires l'indiquent, "Handled in PriceFormatter" j'en déduis que c'est geré par includes/classes/price_schedule.php qui fait sans doute partie de la contrib quantity Price breaks per product
http://www.oscommerce.com/community/contributions,1242 .

Le code correspond a ca un peu modifié...




paddybl
Ecotax est de plus en plus stable. Merci aux personnes me faisant divers retours sur les installations en productions.
De nouveaux modules compatibles ecotax arrivent en fonction des adaptations nécessaires. Vous trouverez dans la catégorie powerpack +, l'adaptation de Quantity Price Breaks Per Product v1.2.1, une version creload et osCommerce de edit order (en cours de compilation) permettant de modifier vos commandes, Order Check version 2.5.2 pour ECOTAX version 1.3.

Concernant la version 1.3 d'ECOTAX, j'ai ajouté la fonction permettant de positionner précisément le tableau récapitulatif des taux, sur la facture.

pldtm
Merci pour cette contribution, smile.gif
je sais pas si j'ai oublié une portion de code ou si c'est un bug mais quand j'enleve des categories d'ecotaxe dans la box lieux/taxes les taux restent toujours visible dans categorie sur une fiche article lorsque je veux attribuer un taux.


Merci encore beau travail utile et obligatoire



pldtm


paddybl
CITATION(pldtm @ 20 Jan 2007, 09:54) [snapback]217045[/snapback]
Merci pour cette contribution, smile.gif
je sais pas si j'ai oublié une portion de code ou si c'est un bug mais quand j'enleve des categories d'ecotaxe dans la box lieux/taxes les taux restent toujours visible dans categorie sur une fiche article lorsque je veux attribuer un taux.


salut et merci

Pour comprendre, tu as supprimé une catégorie d'écotax dans lieux/Taxes=>catégorie écotaxe, puis tu vas sur une fiche produit dans l'admin et les taux sont toujours là! c'est cà!

Si oui, il faut considérer la situation sous plusieurs angles:

on peut dire qu'il sagit d'un bug en effet, car la suppression d'une catégorie devrait supprimer, tous les taux correspondant. la je suis d'accord.

Le souci par contre c'est que la suppression d'une catégorie et des taux correspondant ne doit ètrre faite que si aucune, et je dis bien aucune commande et aucun produit n'as utilisé et n'utilise ces taux et catégorie ! sinon tu te retrouves avec des incohérences sur les factures....

Je note un autre souci, là plus dans ton utilisation d'écotax:cas où l'on voit tous les taux(et même ceux qui devraient avoir disparu...) montre que tu n'as pas au préalable affecté de catégorie d'ecotax à la catégorie où tu as placé ton produit!

en cliquant sur éditer catégorie(je précise qu'il doit sagir de la catégorie ascendante directement la plus proche du produit), tu trouves une liste déroulante des différentes catégories d'écotax qui peuvent ètre appliqués aux produits contenus dans cette catégorie(de produit). de plus à cette endroit, tu as une case à cocher te permettant de choisir un taux à appliquer à tous les produits contenu dans cette catégorie en une seul fois ! Le fait d'appliquer une catégorie d'écotax à une catégorie de produit ne te renvoi dans la fiche produit que les taux applicables (et pas les 176 taux francais où 265 taux belges). c'est tous de même plus simple d'utilisation et celà ne t'aurait pas affiché les taux de la catégorie effacé.

Je comprend aussi que beaucoup seront tenté d'effacé ces taux et catégories qu'ils n'utiliseront sans doute jamais, je vais donc faire un correctif pour effacer en cascade ces taux lorsque l'on supprime une catégorie.
paddybl
la modification pour supprimer les taux lorsque l'on supprime une catégorie d'écotax, est relativemement simple à faire:



dans admin/ecotax_classes.php trouver:

CODE
         tep_db_query("delete from " . TABLE_ECOTAX_CLASS . " where ecotax_class_id = '" . (int)$ecotax_class_id . "'");


ajouter en dessous:

CODE
  tep_db_query("delete from " . TABLE_ECOTAX_RATES . " where ecotax_class_id = '" . (int)$ecotax_class_id . "'");




sauvegarder et voilà



par contre si vous avez déjà supprimer une catégorie avant cette modif il va falloir le faire manuellement dans phpmyadmin=>table ecotax, trouver une ligne qui devrait ètre effacé, noté le numéro de la colonne ecotax_class_id.

et lancer grace à sql la commande suivante

CODE
delete from ecotax where ecotax_class_id = numéro de la catégorie




pldtm
Bonjour,

merci pour cette information.
Dans le cas de l'utilisation de l'ecotaxe, pour le domaine qui m'interesse, effectivement je n'utiliserai qu'une, voir 2 categories d'ecotaxe. Je n'ai encore attribué aucune categorie a aucune categorie produit.
Mais le fait de vouloir supprimer des classes d'ecotaxe a plusieurs interets: d'abord eviter de possibles erreurs lors de la creation d'articles. Ensuite lors de la creation de la boutique la BDD sera petite mais a l'utilisation dans 1 an ou 2 elle risque de commencer a grossir.Donc autant ne pas la surcharger des le debut d'autant que c'est la premiere année d'existence de cette taxe, donc elle risque d'evoluer dans le nombre de categories et dans les classes en fonction des produits et j'ai pas envie d'avoir a tout modifier si jamais ils changent quelque chose (je sais je suis faineant).


Dans la pratique:
De plus je me suis rendu compte dans une boutique traditionnelle, que chaque constructeur attribue une ecotaxe en fonction de l'organisme auquel il a souscrit. si je fais de l'import c'est encore une taxe differente.
Ex: pour un ecran informatique de 19" , selon le constructeur ou que je l'achete en france ou en import, je vais avoir une taxe differente.
De plus en discutant avec un comptable il s'avere que cette taxe ne s'applique pas a tout le monde selon que vous etes consideré comme un particulier ou un professionnel, et dans les professionnels, certain doivent s'acquitter de cette taxe et d'autres non, donc purement dans un soucis de simplifier la gestion administrative par la suite je prefere au debut avoir le moins de taux et categorie d'ecotaxe possible.C'est vraiment le binz cette taxe, et je crois que les impots vont se régaler.

A l'utilisation de la contribution:
J'avais effectivement pas vu qu'en attribuant une categ. ecotaxe a une categ. produit cela faisait disparaitre les autres categorie au niveau du produit. Ce n'est donc pas un bug mais plutot un confort a l'usage.

Merci pour la modif.


pldtm



paddybl
Bonjour, et merci de ces précisions.

Je trouve en effet que c'est le bazarre c'est eco-participation. Lors que j'ai pris l'idée de concevoir ecotaxe pour la communauté, j'avais quelques peu anticipé les futures difficultés pour pouvoir jouer au maximum sur les catégories et les taux. Mais plus le temps passe et plus je parle avec diverses personnes, plus je me rends compte que les infos qu'on leurs communiquent sont différente d'une personnes à l'autres. j'ai l'impression que personnes ne sais (surtout les huiles de l'administration) comment on doit appliquer cette "taxes" (a ne surtout pas appeler taxes d'après la DGCCRF).

et dire, que je n'en ai pas besoin...

concernant l'import et l'export, je n'ai trouvé aucune info fiable sur la procédure à appliqué. d'ailleur je ne suis pas sur qu'ils savent comment faire eux aussi...

c'est clairement pas clair blink.gif

ce que je sais c'est que depuis le 15 de l'année dernière celà devrait ètre en place, que la DGCCRF et conciliante pour l'instant, car eux non plus n'ont pas de consignes fiables, mais il finiront bien par ce réveiller. et comme à chaque fois, il faudra réagir à la derniére minute pour ce mettre en conformité....

je pense qu'ECOTAX permettre à chacun de s'adapter en ajoutant modifiant les taux et sous catégorie de taux pour leur cas particulier. le tous c'est que celà apparaisse sur la facture et dans la boutique.



paddybl
Bonjour à tous, pas mal occupé à concevoir de nouveaux modules compatibles ecotax, j'ai été informé à une ou deux reprises de souci dans dans l'intégration du fichier ecotax.sql

Le fichier ne contient pas d'erreur en lui même, mais retourne une erreur avec les versions de mysql ne gérant pas le choix des jeux de caractères.

j'ai publié une version pour mysql4 qui doit résoudre ce problème.

Ceci est une version "bas débit" de notre forum. Pour voir la version complète avec plus d'informations, la mise en page et les images, veuillez cliquer ici.
Invision Power Board © 2001-2013 Invision Power Services, Inc.