X-Cart File too large for egoods download

I have been working on xcart and even thought I really like it there is a huge problem with their egoods downloads.

The site I was working on distributes large videos, up to 500 MB, but I was running on the problem that x-cart eGoods would only download 24.5 MB maximum. After browsing the interwebs i came across a piece of code in the php manual website. (thanks to chrisbloom7 ) I took a small part of his code, modified it and replaced it in the download.php in the xcart root diretory.

Here is what needs to be replaced. this applies to x-Cart 4.4.1

Open the download.php file located in the xcart root directory

find  this:
while (
&& connection_status() == 0
) {

print(fread($fd, 8192));




and replace with this:
$buffer = '';
$chunksize = 1 * (1024 * 1024);
while (!feof($fd)) {
$buffer = fread($fd, $chunksize);
echo $buffer;


  1. Carlos Roque, regards. Is possible for you to change the addon X-AFFILIATE of X-CART and to change the type of affiliate programs, like BINARY, MULTILEVEL, FORCED MATRIX AND OTHERS FEATURES? too change % and $ commision by % products( Percentage by Products) , this is very important for me business model, Please send me reply to rseales@yahoo.com


    1. can you elaborate more on what you need?


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.