Download-Problem mit InternetExplorer 8

10.06.2012 14:58
#1
mh8
Joomshopping forum user no avatar
Name: mh8
10.06.2012
Posts: 4
Quote
Download-Problem mit InternetExplorer 8

Hallo,
ich habe das Problem, das downloadbare Artikel(ZIP) im IE8 nicht korrekt heruntergeladen werden,
und deshalb beim entpacken eine Fehlermeldung kommt.

Es sieht so aus als ob der Download vorzeitig abgebrochen wird.

Mit Firefox und IE9 funktioniert es problemlos.

Wäre klasse wenn ihr mir weiterhelfen könntet.
Im voraus vielen Dank.


Joomla: 1.5.25
JoomShopping: Version 2.9.7
PHP: 5.2.13
MySQL: 5.1.60
 
10.06.2012 15:19
#2
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25919
Quote
Aw: Download-Problem mit InternetExplorer 8

fixed in 3.7.0

See

contoroller/product.php

function getfile

.....

if ($rl==1){
//fix for IE
$newurl = JURI::root()."index.php?option=com_jshopping&controller=product&task=getfile&oid=".$oid."&id=".$id."&hash=".$hash;
print "<script type='text/javascript'>location.href='".$newurl."';</script>";
die();
}

+ change (add &rl=1)

templates\default\checkout\orderemail.php

row

<div><?php print $file->file_descr?> <a href="<?php print JURI::root()?>index.php?option=com_jshopping&controller=product&task=getfile&oid=<?php print $this->order->order_id?>&id=<?php print $file->id?>&hash=<?php print $this->order->file_hash?>&rl=1"><?php print _JSHOP_DOWNLOAD?></a></div>


Letzte Änderung: 10.06.2012 15:20
 
10.06.2012 16:04
#3
mh8
Joomshopping forum user no avatar
Name: mh8
10.06.2012
Posts: 4
Quote
Aw: Download-Problem mit InternetExplorer 8

@webdesigner

Vielen Dank für deine schnelle Antwort. ;-))

Ich werde das ausprobieren.

 
12.06.2012 20:46
#4
mh8
Joomshopping forum user no avatar
Name: mh8
10.06.2012
Posts: 4
Quote
Aw: Download-Problem mit InternetExplorer 8

@webdesigner

Kannst du mir bitte zeigen an welche Stelle der Code genau hin muss.


function getfile(){

$jshopConfig = &JSFactory::getConfig();
$db = &JFactory::getDBO();

$id = JRequest::getInt('id');
$oid = JRequest::getInt('oid');
$hash = JRequest::getVar('hash');

$order = &JTable::getInstance('order', 'jshop');
$order->load($oid);
if ($order->file_hash!=$hash){
JError::raiseError(500, "Error download file");
return 0;
}

if (!in_array($order->order_status, $jshopConfig->payment_status_enable_download_sale_file)){
JError::raiseWarning(500, _JSHOP_FOR_DOWNLOAD_ORDER_MUST_BE_PAID);
return 0;
}

$items = $order->getAllItems();
$filesid = array();
foreach($items as $item){
$arrayfiles = unserialize($item->files);
foreach($arrayfiles as $_file){
$filesid[] = $_file->id;
}
}

if (!in_array($id, $filesid)){
JError::raiseError(500, "Error download file");
return 0;
}

$stat_download = $order->getFilesStatDownloads();

if ($stat_download[$id] >= $jshopConfig->max_number_download_sale_file){
JError::raiseWarning(500, _JSHOP_NUMBER_DOWNLOADS_FILE_RESTRICTED);
return 0;
}

$file = &JTable::getInstance('productFiles', 'jshop');
$file->load($id);
$downloadFile = $file->file;
if ($downloadFile==""){
JError::raiseWarning('', "Error download file");
return 0;
}
$file_name = $jshopConfig->files_product_path."/".$downloadFile;
if (!file_exists($file_name)){
JError::raiseWarning('', "Error. File not exist");
return 0;
}

$stat_download[$id] = intval($stat_download[$id]) + 1;
$order->setFilesStatDownloads($stat_download);
$order->store();

ob_end_clean();
@set_time_limit(0);
$fp = fopen($file_name, "rb");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: application/octet-stream");
header("Content-Length: " . (string)(filesize($file_name)));
header('Content-Disposition: attachment; filename="' . basename($file_name) . '"');
header("Content-Transfer-Encoding: binary");

while( (!feof($fp)) && (connection_status()==0) ){
print(fread($fp, 1024*8));
flush();
}
fclose($fp);
die();
}

 
14.06.2012 19:11
#5
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25919
Quote
Aw: Download-Problem mit InternetExplorer 8

Unzip and replace

contoroller/product.php
templates\default\checkout\orderemail.php

fix_download.zip


Letzte Änderung: 14.06.2012 19:12
 
14.06.2012 21:54
#6
mh8
Joomshopping forum user no avatar
Name: mh8
10.06.2012
Posts: 4
Quote
Aw: Download-Problem mit InternetExplorer 8

Very Cool.

Many Thanks!

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.