3
hi'
I'm sorry, my code is wrong (google translate grrr).
Real code is :
le="color: #000000"><?php 01. $fileContent = file_get_contents($file); 02. // Plugins ************* 03. $plugins = oledrion_plugins::getInstance(); 04. $parameters = new oledrion_parameters(array('fileContent' => $fileContent, 'product' => $product, 'order' => $order, 'fullFilename' => $file)); 05. $parameters = $plugins->fireFilter(oledrion_plugins::EVENT_ON_PRODUCT_DOWNLOAD, $parameters); 06. if(trim($parameters['fileContent']) != '') { $fileContent = $parameters['fileContent']; 07. } 08. // ******** 09. // Et affichage du fichier avec le type mime qui va bien 10. header("Content-Type: ".oledrion_utils::getMimeType($file)); 11. header('Content-disposition: inline; filename="'.basename($file).'"'); 12. echo $fileContent;
So I tried
le="color: #000000"><?php header("Content-Type: application/pdf");
Exactly same trouble : page is loading, but finally it is a blank one.
So I have look for
Oledrion 2.2 and replace download.php file. Diff :
• lines 1 to 7 do not exist
• instructions to display file is readfile
le="color: #000000"><?php // ****** // Et affichage du fichier avec le type mime qui va bien header("Content-Type: ".oledrion_utils::getMimeType($file)); header('Content-disposition: inline; filename="'.basename($file).'"'); readfile($file); ?>
If I use download.php file from Oledrion 2.2, it works : pdf is displayed

If I add lines 1 to 7 with readfile($file); or with readfile($fileContent); instruction : blank page.
I will keep download.php from 2.2 because it works. But I hope it will be a better solution with
the next release
Still learning CSS and... english