OsCommerce Download Feature
#21
Posted 12 January 2007 - 04:11 AM
For that matter, what is the order of importance of product_info, sts_product_info and product_info.php.html?
--
my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...
#22
Posted 17 January 2007 - 02:36 PM
I am experiencing a similar problem as outlined in this thread ... no download link. I followed the instruction to the letter (so I think), and still nothing. Overall though, I've noticed two things that might be preventing this and was hoping I could get someone (Bill) to confirm if this is my issue:
1) Catalog Path
In your above example you have some like this:
define('DIR_FS_CATALOG', '/home/sounkel6/public_html/catalog/');
I've had several hosting accounts, all with different types of "paths". When I open up the root of my files in an FTP session I have a path of: /www/www/catalog/ in my Remote Site path. That is what I put in the above define statement, but now I have to question if that is the "exact" path.
2) PUB directory
In the same config file there is also:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
The issue I see here is I have no PUB directory. I created one, but there is not one that I can see and I'm using the "out of box" install of OSC (I've only changed the graphics).
Please advise. I can get everything else to work except this.
Thanks in advance for the help.
#23
Posted 17 January 2007 - 10:54 PM
EvilBeeker, on Jan 17 2007, 08:36 AM, said:
I am experiencing a similar problem as outlined in this thread ... no download link. I followed the instruction to the letter (so I think), and still nothing. Overall though, I've noticed two things that might be preventing this and was hoping I could get someone (Bill) to confirm if this is my issue:
1) Catalog Path
In your above example you have some like this:
define('DIR_FS_CATALOG', '/home/sounkel6/public_html/catalog/');
I've had several hosting accounts, all with different types of "paths". When I open up the root of my files in an FTP session I have a path of: /www/www/catalog/ in my Remote Site path. That is what I put in the above define statement, but now I have to question if that is the "exact" path.
2) PUB directory
In the same config file there is also:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
The issue I see here is I have no PUB directory. I created one, but there is not one that I can see and I'm using the "out of box" install of OSC (I've only changed the graphics).
Please advise. I can get everything else to work except this.
Thanks in advance for the help.
1) Your define('DIR_FS_CATALOG', '/home/username/public_html/catalog/'); should look very similar to this with your username in place of "username" and the name of your catalog directory in place of "catalog". If you have a cpanel hosting account, log into your file manager and click through starting with the public_html directory until you reach your store directory. This will be your catalog path.
2) You should have something very similar to the following:
define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
define('DIR_FS_CATALOG', '/home/username/public_html/catalog/'); (username and catalog will be replaced with what is appropriate for your store)
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
If not, which version of osCommerce did you install? The last two releases included a pub directory. The "pub" directory is the public download path where permissions should be set so that the public can access your downloads after the purchase. You may not have completed the install properly or you are using an older version of osC.
If you created you own pub directory, then you should add a .htaccess file inside of it. The .htaccess file should have at least one line of code:
Options +FollowSymLinks -Indexes
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#24
Posted 18 January 2007 - 12:55 PM
1) It turned out I had the right path for the catalog/download define. Thanks.
2) I am on the current version of OSC, and I had no errors or issues during installation. After I did the install I backed up everything under catalog, and I found out last night that I did have a PUB directory at that time. What has happened to is since then is a mystery. I copied over the directory and reset the file permissions on everything.
After doing this the link I had been testing with still did not work. Now I have a few more questions please:
-- In your setup instructions you mention creating item options for DOWNLOAD/YES for the item properties. Does that do anything that would effect the link, or is it just an identifer for the product? I was just wondering if there was something else that needed to be done with that to make the download work.
-- Would it be beneficial to delete the item I've been testing with and just start over from scratch with a new item to test? Or should the link "appear" under the test items if everything is all linked correctly.
I really don't want to have to start this process all over again with a new install of OSC, since everything is working properly *except* the download link.
Thanks for your help.
Kevin
#25
Posted 18 January 2007 - 11:42 PM
EvilBeeker, on Jan 18 2007, 06:55 AM, said:
-- Would it be beneficial to delete the item I've been testing with and just start over from scratch with a new item to test? Or should the link "appear" under the test items if everything is all linked correctly.
I really don't want to have to start this process all over again with a new install of OSC, since everything is working properly *except* the download link.
Thanks for your help.
Kevin
You do need the Download/Yes set in the Product Attributes page along with all of the other information in that part as well. You do not need to delete what you have done but I suggest that you go to the product attributes page, at the bottom of the page scroll through your products available to select the one you want to set for download. Click the "Edit" button on the right. Make the neccessary changes so that the "option name" is set to "download" and that the "option value" is set to "yes". Be sure the file name is correct and then click on the update button.
If you continue to have problems, osC has a "dummy" file download setup called unreal tournament (unreal.zip). Use this file as a template to go by and let me know if the link shows up for this file or not. If you have not changed your download folder, the unreal.zip should be in there.
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#26
Posted 22 January 2007 - 01:33 AM
bkellum, on Jan 18 2007, 05:42 PM, said:
You do need the Download/Yes set in the Product Attributes page along with all of the other information in that part as well. You do not need to delete what you have done but I suggest that you go to the product attributes page, at the bottom of the page scroll through your products available to select the one you want to set for download. Click the "Edit" button on the right. Make the neccessary changes so that the "option name" is set to "download" and that the "option value" is set to "yes". Be sure the file name is correct and then click on the update button.
If you continue to have problems, osC has a "dummy" file download setup called unreal tournament (unreal.zip). Use this file as a template to go by and let me know if the link shows up for this file or not. If you have not changed your download folder, the unreal.zip should be in there.
Starting over on the download items worked Bill. Thanks! Must be something about building them with the wrong setting that prevented it from working if the setting were corrected.
Thanks again!
Kevin
#27
Posted 23 January 2007 - 11:35 PM
EvilBeeker, on Jan 21 2007, 07:33 PM, said:
Thanks again!
Kevin
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#28
Posted 27 January 2007 - 09:08 AM
I'm wondering if someone on this thread can help me.
Every time I try to test the osCommerce download function, it appends the filename of the download file with ".HTML".
When I open the html file, it says this:
Warning: mkdir(/home/myusername/public_html/store/pub/.kwhwzujqfmmeqnmjgb) [function.mkdir]: Permission denied in /home/myusername/public_html/store/download.php on line 91 Warning: symlink() [function.symlink]: No such file or directory in /home/myusername/public_html/store/download.php on line 92 Warning: Cannot modify header information - headers already sent by (output started at /home/myusername/public_html/store/download.php:91) in /home/myusername/public_html/store/includes/functions/general.php on line 29
I really have no idea what this means... it's been years since I tinkered with osCommerce.
For what it's worth, in download.php on line 91 it says:
mkdir(DIR_FS_DOWNLOAD_PUBLIC . $tempdir, 0777);
and on line 92 it says:
symlink(DIR_FS_DOWNLOAD . $downloads['orders_products_filename'], DIR_FS_DOWNLOAD_PUBLIC . $tempdir . '/' . $downloads['orders_products_filename']);
and on general.php on line 29 it says:
header('Location: ' . $url);
Does anyone have any easy ideas?? Please??
Cheers.
OZ
#29
Posted 29 January 2007 - 02:05 PM
I posted this in a new thread, but haven't got any help, so now I try in this one:
We've just opened our new webshop and want to make use of the download feature. For a number of reasons we would prefer to store our mp3's on a different server. Is it possible to use the OSC dowload option if a different IP address is used instead of the default folder (catalog/downloads)? And if so, does it take a lot of php programming? Thanks in advance for any help on this,
Jens
#30
Posted 14 February 2007 - 07:32 PM
EvilBeeker, on Jan 21 2007, 08:33 PM, said:
Same here - I tried adjusting the Product Attributes on an existing item and it didn't work, but setting [Download|yes] on a new item worked great!
#31
Posted 14 February 2007 - 07:39 PM
travisseitler, on Feb 14 2007, 01:32 PM, said:
With my issue I was not able to get the download to work until I deleted all of the items out there that would not download properly. Once I did that and added a new item (with the new settings) it worked fine. It was like the system was treating all of the items the same as the first one I entered, even though when I did that the settings in the config were right for later items.
Hope this helps.
- Kevin
#32
Posted 14 February 2007 - 10:35 PM
oz16oz2, on Jan 27 2007, 03:08 AM, said:
I'm wondering if someone on this thread can help me.
Every time I try to test the osCommerce download function, it appends the filename of the download file with ".HTML".
Does anyone have any easy ideas?? Please??
Cheers.
OZ
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#33
Posted 14 February 2007 - 10:55 PM
jensbruunkofoed, on Jan 29 2007, 10:05 PM, said:
I posted this in a new thread, but haven't got any help, so now I try in this one:
We've just opened our new webshop and want to make use of the download feature. For a number of reasons we would prefer to store our mp3's on a different server. Is it possible to use the OSC dowload option if a different IP address is used instead of the default folder (catalog/downloads)? And if so, does it take a lot of php programming? Thanks in advance for any help on this,
Jens
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#34
Posted 15 February 2007 - 08:51 PM
#35
Posted 15 February 2007 - 09:11 PM
alancookie, on Feb 16 2007, 04:51 AM, said:
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#36
Posted 02 March 2007 - 02:57 PM
I managed to get the links to work but.... the downloaded file is only 1k. I checked and my zip files are properly uploaded.
Now, some mentioned the PUB folder. I have one but it's empty. I read that it should have an .htaccess file in it. Maybe that's my problem. How do I create this file and what should be in it? or can someone email it to me?
#37
Posted 02 March 2007 - 10:23 PM
kosmikkreeper, on Mar 2 2007, 08:57 AM, said:
I managed to get the links to work but.... the downloaded file is only 1k. I checked and my zip files are properly uploaded.
Now, some mentioned the PUB folder. I have one but it's empty. I read that it should have an .htaccess file in it. Maybe that's my problem. How do I create this file and what should be in it? or can someone email it to me?
Sounds Good Productions
STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
#38
Posted 03 March 2007 - 11:34 PM
bkellum, on Mar 2 2007, 05:23 PM, said:
My PUB and IMAGE folders are 777, and my download folder is 755 like in the instructions.
I still only get a 1k file. Can you help?
#39
Posted 03 March 2007 - 11:58 PM
kosmikkreeper, on Mar 4 2007, 07:34 AM, said:
I still only get a 1k file. Can you help?
What is the size of your download file? How long it takes to abort the download with 1k done? Did you enabled gzip compression in admin?
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#40
Posted 04 March 2007 - 12:17 AM
AlexStudio, on Mar 3 2007, 06:58 PM, said:
What is the size of your download file? How long it takes to abort the download with 1k done? Did you enabled gzip compression in admin?
Both Enable download and Download by redirect are at TRUE.
The files are between 2 and 3 MB. It takes about 1 second to download the file (hence the 1 k size). No, Gzip isn't enabled. I just tried it with enabled TRUE and that only got me a blank page, not even a download box. so I put it back to false.
What's next?









