par
badibad » 15 avr. 2009, 12:55
Bonjour tout le monde
J'ai installer une contrib (fpdf) sur mon site oscommerce ms2 et
j'essaye d'inséré dans ma facture pdf le numéro du client (cID) et la date de commande (date_purchar)dans l'entête .
Après beaucoup d'essai je ni arrive pas voici mon code
Code : Tout sélectionner
<?php
/*
$Id: create_pdf,v 1.2 2009/04/08
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
modif badier
Copyright (c) 2005 osCommerce
Released under the GNU General Public License
*/
define('FPDF_FONTPATH','fpdf/font/');
require('fpdf/fpdf.php');
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ORDERS_INVOICE);
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
include(DIR_WS_CLASSES . 'order.php');
class PDF extends FPDF
{
//Page header
function Header()
{
//tep_db_query("select customers_id, date_purchased from " . TABLE_ORDERS . " where orders_id ,customers_id = '" . (int)$oID .(int)$customers_id . "'");
global $oID,$cID;
$date = strftime(' %d/%m/%Y');
$datecom = tep_date_short($order->info['date_purchased']);
//Logo
$this->Image('images/invoice_logo.jpg',3,20,90);
// Invoice Number and date
$this->SetFont('Arial','B',10);
$this->SetTextColor(0,102,153);
$this->SetY(36);
$this->SetX(117);
$this->MultiCell(80,3,"FACTURE N°: " . tep_db_input($oID) . " Du " . $date ."\n". "\n"."COMMANDE N°: " . $oID . " Du " . $datecom,0,'C');
$this->SetY(49);
$this->SetX(117);
tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$cID . "'");
$this->MultiCell(39,3, "CLIENT N°: " . tep_db_input($cID) ,0,'C');
}
Pourriez vous m'aider merci.

Bonjour tout le monde
J'ai installer une contrib (fpdf) sur mon site oscommerce ms2 et
j'essaye d'inséré dans ma facture pdf le numéro du client (cID) et la date de commande (date_purchar)dans l'entête .
Après beaucoup d'essai je ni arrive pas voici mon code
[code]<?php
/*
$Id: create_pdf,v 1.2 2009/04/08
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
modif badier
Copyright (c) 2005 osCommerce
Released under the GNU General Public License
*/
define('FPDF_FONTPATH','fpdf/font/');
require('fpdf/fpdf.php');
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ORDERS_INVOICE);
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
include(DIR_WS_CLASSES . 'order.php');
class PDF extends FPDF
{
//Page header
function Header()
{
//tep_db_query("select customers_id, date_purchased from " . TABLE_ORDERS . " where orders_id ,customers_id = '" . (int)$oID .(int)$customers_id . "'");
global $oID,$cID;
$date = strftime(' %d/%m/%Y');
$datecom = tep_date_short($order->info['date_purchased']);
//Logo
$this->Image('images/invoice_logo.jpg',3,20,90);
// Invoice Number and date
$this->SetFont('Arial','B',10);
$this->SetTextColor(0,102,153);
$this->SetY(36);
$this->SetX(117);
$this->MultiCell(80,3,"FACTURE N°: " . tep_db_input($oID) . " Du " . $date ."\n". "\n"."COMMANDE N°: " . $oID . " Du " . $datecom,0,'C');
$this->SetY(49);
$this->SetX(117);
tep_db_query("select customers_id from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$cID . "'");
$this->MultiCell(39,3, "CLIENT N°: " . tep_db_input($cID) ,0,'C');
}[/code]
Pourriez vous m'aider merci. :oops: