PDA

View Full Version : Supertracker v3.1a



michael_s
03-01-2010, 06:02 PM
Short bug fix for Supertracker 3.4.1 if you are also using PDF Customer Invoice 1.1 (12 March 2008).

Using both of these contributions breaks PDF Customer Invoice. You will see an error message like below when a customer attempts to view their PDF invoice:

FPDF error: Some data has already been output, can't send PDF file

Simple fix. Took me some time to narrow it down, so hoping to save others the aggravation. :)

The problem is that Supertracker inserts data into the HTML stream before the PDF completes, which basically interrupts the PDF, causing it to abort. If you use any sort of FPDF application, I suspect you may run into this problem. The solution is to skip use of Supertracker when user is viewing a PHP account related form.

-----------

open /includes/application_top.php

from:

// Supertracker
require(DIR_WS_CLASSES . 'supertracker.php');
$tracker = new supertracker;
$tracker->update();
}


TO:


// Supertracker
if (strpos(basename($PHP_SELF),'account') !== false) {
require(DIR_WS_CLASSES . 'supertracker.php');
$tracker = new supertracker;
$tracker->update();
}


More... (http://addons.oscommerce.com/info/3924)