JimBattle Posted January 27, 2009 Posted January 27, 2009 I have a serious problem with the download function. Clearly it is designed to allow the downloading of electronic products such as PDF and ZIP files, but I am unable to make it function in that manner. Surely other people must have dealt with the same issue. If I cannot get the download feature to work, there is no point in having my business web site because all my new products will be downloadable only. I have the following setup: - Under configuration, I have set the "Downloadables" switch to "true". - Also under configuration, I have verified that the "Download by redirect" is set to "false" - I have added a category containing a ZIP product in the catalog (the product has weight set to zero in case that matters) - I have moved the corresponding ZIP file to the store/catalog/download folder. Based on another instruction I found somewhere, I created a folder called store/catalogdownload and also moved the ZIP file there to see if that was the problem. - Under products attributes, I have added an entry corresponding to the product name, and listed the product's PDF file name in the "Filename" box Other information which may be of interest. - The only shipping module I have active is USPS (enabled for the production server) (I do have a valid USPS user ID) - The only payment module I have active is PayPal. (I do have a valid PayPal account) Further, in the osCommerce Knowledge Base, I found a file called "Download" and followed the following instructions: ---The products to be downloaded after purchase are put in the catalog/download folder. ---The catalog/download folder will be read from the "pub" folder. ---Make sure the /catalog/pub folder is 777 and /catalog/download folder is 755 and these lines in catalog/includes/configure.php have the forward slash: ---define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); ---define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); (I don't know what 777 and 755 permissions are in the Netfirms version of osCommerce, so I set the permissions to read, write and 'x'.) I have checked and re-checked, seeking to confirm that I have done everything required to make the download function work. But it doesn't. Given the obvious intent for the downloading function, it must have been tested and made to work successfully at some time by some means. Am I missing something? Is there some additional setting or data value that is needed to flag my product as downloadable? What do I need to do to make this function work? This is important to me. Your prompt and careful help would be most appreciated.
Guest Posted January 28, 2009 Posted January 28, 2009 I have a serious problem with the download function. Clearly it is designed to allow the downloading of electronic products such as PDF and ZIP files, but I am unable to make it function in that manner. Surely other people must have dealt with the same issue. If I cannot get the download feature to work, there is no point in having my business web site because all my new products will be downloadable only. I have the following setup: - Under configuration, I have set the "Downloadables" switch to "true". - Also under configuration, I have verified that the "Download by redirect" is set to "false" - I have added a category containing a ZIP product in the catalog (the product has weight set to zero in case that matters) - I have moved the corresponding ZIP file to the store/catalog/download folder. Based on another instruction I found somewhere, I created a folder called store/catalogdownload and also moved the ZIP file there to see if that was the problem. - Under products attributes, I have added an entry corresponding to the product name, and listed the product's PDF file name in the "Filename" box Other information which may be of interest. - The only shipping module I have active is USPS (enabled for the production server) (I do have a valid USPS user ID) - The only payment module I have active is PayPal. (I do have a valid PayPal account) Further, in the osCommerce Knowledge Base, I found a file called "Download" and followed the following instructions: ---The products to be downloaded after purchase are put in the catalog/download folder. ---The catalog/download folder will be read from the "pub" folder. ---Make sure the /catalog/pub folder is 777 and /catalog/download folder is 755 and these lines in catalog/includes/configure.php have the forward slash: ---define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); ---define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); (I don't know what 777 and 755 permissions are in the Netfirms version of osCommerce, so I set the permissions to read, write and 'x'.) I have checked and re-checked, seeking to confirm that I have done everything required to make the download function work. But it doesn't. Given the obvious intent for the downloading function, it must have been tested and made to work successfully at some time by some means. Am I missing something? Is there some additional setting or data value that is needed to flag my product as downloadable? What do I need to do to make this function work? This is important to me. Your prompt and careful help would be most appreciated. In your Products Attributes, at the top of the page: Create an option called DOWNLOAD; Create an option value called YES; Make sure you choose both of those at the bottom for each file you upload to your downloads folder. Remember that it does not like uppercase and lowercase mixed in your filename. Make sure you set your expiry and number of downloads allowed. Two is the least I have seen, so that if they lose their connection, they may try again. I give three days to download too. I think that three is sufficient, but some like to allow more time. You will see the download/yes option on your product page. Even though yes is the only option available, its ok for it to be there. Hope this helps. Good luck!
JimBattle Posted January 28, 2009 Author Posted January 28, 2009 In your Products Attributes, at the top of the page: Create an option called DOWNLOAD; Create an option value called YES; Make sure you choose both of those at the bottom for each file you upload to your downloads folder. Remember that it does not like uppercase and lowercase mixed in your filename. Make sure you set your expiry and number of downloads allowed. Two is the least I have seen, so that if they lose their connection, they may try again. I give three days to download too. I think that three is sufficient, but some like to allow more time. You will see the download/yes option on your product page. Even though yes is the only option available, its ok for it to be there. Hope this helps. Good luck!
JimBattle Posted January 28, 2009 Author Posted January 28, 2009 Chelle, That did it! I'm so grateful. I've spent hours on this. All the best, Jim
volau Posted February 10, 2009 Posted February 10, 2009 Michelle: I have followed your instructions to create the option (DOWNLOAD) and value (YES), and also have my admin set up with downloads enabled and url redirect to false; using Paypal Standard as payment method (works OK for non-digitally delivered items); testing using the Paypal sandbox: For ALL digital delivered items, either set as oscommerce came or as modified per your instructions, after hitting the PAYNOW Paypal button IN PAYPAL (everything looks good up til then), instead of returning to my web site properly as it does for non-download items, while still in the Paypal sandbox (user customized Paypal screens), the process of checking out and paying halts with the following Paypal error message in red: "We cannot process your payment at this time. Please retry your purchase with a different payment method. Contact PayPal Customer Service if you need further assistance." For non-download items, this error does not occur, and the buyer is returned to my web site as they should be. So far Paypal techies have not been able to resolve this issue, but since regular items work OK, and this only happens for the download items, it seems to be a problem with oscommerce. I am running on version osCommerce 2.2 Milestone 2 Update 051112 according to the docs that extracted from the oscommerce download/extract.
volau Posted February 18, 2009 Posted February 18, 2009 Michelle: I have followed your instructions to create the option (DOWNLOAD) and value (YES), and also have my admin set up with downloads enabled and url redirect to false; using Paypal Standard as payment method (works OK for non-digitally delivered items); testing using the Paypal sandbox: For ALL digital delivered items, either set as oscommerce came or as modified per your instructions, after hitting the PAYNOW Paypal button IN PAYPAL (everything looks good up til then), instead of returning to my web site properly as it does for non-download items, while still in the Paypal sandbox (user customized Paypal screens), the process of checking out and paying halts with the following Paypal error message in red: "We cannot process your payment at this time. Please retry your purchase with a different payment method. Contact PayPal Customer Service if you need further assistance." For non-download items, this error does not occur, and the buyer is returned to my web site as they should be. So far Paypal techies have not been able to resolve this issue, but since regular items work OK, and this only happens for the download items, it seems to be a problem with oscommerce. I am running on version osCommerce 2.2 Milestone 2 Update 051112 according to the docs that extracted from the oscommerce download/extract. I did a file to file compare of the source code (HTML) comparing the code for non-download items versus download items as it exists in Paypal right before the buyer hits the PAY NOW button; the only difference between the two tests were the difference in price of the items (which should have NO influence on the problem), and for the download item, no shipping address was submitted to Paypal Standard, which seems appropriate since that item is download item with weight equal to zero. I have Paypal set to NOT BLOCK transactions from buyers with non-verified shipping address. Does anyone know if oscommerce usually DOES or DOES NOT provide a shipping address to Paypal for download items, my version seems not to do so, and Paypal don't like it.
volau Posted February 18, 2009 Posted February 18, 2009 FYI for anyone experiencing the same problems, I have found the problem and fixed it with at least a temporary fix. My version of oscommerce that had this problem is osCommerce 2.2 Milestone 2 Update 051112 with SEVERAL contributions mods applied, NONE of which had ANYTHING to do with the problem. It seems that for orders consisting of EXCLUSIVELY of download items (orders with download AND non-download items were in fact working for the download items), the order content was being set to "virtual", and for said virtual orders, DELIVERY address processing during checkout was being bypassed (you couldn't even back up in the shopping cart to the first stage where delivery addresses can be selected and set), therefore, NO shipping address was being forwarded to Paypal and Paypal said, (in spite of the setting in Paypal to NOT require a confirmed delivery address), NO WAY, JOSE; the ultimate solution for this problem is to use the billing address for the delivery address, but as a quick and dirty fix, I commented out this check on virtual orders in two .php scripts - see .php modules and code changes required at the bottom of this post. I did a file to file compare of the source code (HTML) comparing the code for non-download items versus download items as it exists in Paypal right before the buyer hits the PAY NOW button; the only difference between the two tests were the difference in price of the items (which should have NO influence on the problem), and for the download item, no shipping address was submitted to Paypal Standard, which seems appropriate since that item is download item with weight equal to zero. I have Paypal set to NOT BLOCK transactions from buyers with non-verified shipping address. Does anyone know if oscommerce usually DOES or DOES NOT provide a shipping address to Paypal for download items, my version seems not to do so, and Paypal don't like it. FIRST .PHP SCRIPT TO MODIFY: checkout_shipping.php in catalog (or domain root if installed that way, (as I have it)) look for // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); $shipping = false; $sendto = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } and change to // ================================================================== // COMMENT OUT THIS BLOCK OF CODE TO GET DOWNLOAD ONLY ORDERS TO WORK // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed // if ($order->content_type == 'virtual') { // if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); // $shipping = false; // $sendto = false; // tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); // } // ================================================================= SECOND .PHP SCRIPT TO MODIFY: checkout_shipping_address.php in catalog (or domain root if installed that way, (as I have it)) look for // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK $shipping = true; if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK $sendto = true; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } and change to // ==================================================================== // COMMENT OUT THIS BLOCK OF CODE TO GET DOWNLOAD ONLY ORDERS TO WORK // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed // if ($order->content_type == 'virtual') { // if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); // CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK // $shipping = true; // if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); // CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK // $sendto = true; // tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); // } // ====================================================================
volau Posted February 18, 2009 Posted February 18, 2009 SECOND .PHP SCRIPT TO MODIFY: checkout_shipping_address.php in catalog (or domain root if installed that way, (as I have it))look for // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK $shipping = true; if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK $sendto = true; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } and change to // ==================================================================== // COMMENT OUT THIS BLOCK OF CODE TO GET DOWNLOAD ONLY ORDERS TO WORK // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed // if ($order->content_type == 'virtual') { // if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); // CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK // $shipping = true; // if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); // CHANGED FOLLOWING VARIABLE TO TRUE TO GET DOWNLOAD ONLY ORDERS TO WORK // $sendto = true; // tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); // } // ==================================================================== code snippets for second .php module were in error in previous post, here are correct code blocks for SECOND .PHP SCRIPT TO MODIFY: checkout_shipping_address.php in catalog (or domain root if installed that way, (as I have it)): look for // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed if ($order->content_type == 'virtual') { if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); $shipping = false; if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); $sendto = false; tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); } change to // ==================================================================== // if the order contains only virtual products, forward the customer to the billing page as // a shipping address is not needed // if ($order->content_type == 'virtual') { // if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); // $shipping = false; // if (!tep_session_is_registered('sendto')) tep_session_register('sendto'); // $sendto = false; // tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); // } // ====================================================================
rickftcco Posted March 27, 2009 Posted March 27, 2009 Having probs too. Have read this post and another earlier one and another later one that detailed various fixes. The problem with my site is that the server expects download files to be in a certain directory under htdocs, rather than under htdocs/[site name]/downloads, which is what the File Mangler utility gives access to. In other words, I can only create folders under htdocs/[site name] in File Manager. Now, I found the file (I think it was Includes/configuration.php) that would allow me to change the directory where my files are stored, but that will cause a huge mess. What seems to be needed, is to find the error generating function that happens at startup upon visiting the store, and change where IT (and presumably also the download functionality) expects the downloads to be. Having a hard time finding that (don't have access to GREP). So, the message I see when visiting the store is, "Warning: The downloadable products directory does not exist: [blah blah]/htdocs/marketdownload/. Downloadable products will not work until this directory is valid." <==Note that market is the site name and then download is appended to it; I cannot create this folder under htdocs, as File Mangler only gives me access to htdocs/market directory. Thanks for any help on this. I have a serious problem with the download function. Clearly it is designed to allow the downloading of electronic products such as PDF and ZIP files, but I am unable to make it function in that manner. Surely other people must have dealt with the same issue. If I cannot get the download feature to work, there is no point in having my business web site because all my new products will be downloadable only. I have the following setup: - Under configuration, I have set the "Downloadables" switch to "true". - Also under configuration, I have verified that the "Download by redirect" is set to "false" - I have added a category containing a ZIP product in the catalog (the product has weight set to zero in case that matters) - I have moved the corresponding ZIP file to the store/catalog/download folder. Based on another instruction I found somewhere, I created a folder called store/catalogdownload and also moved the ZIP file there to see if that was the problem. - Under products attributes, I have added an entry corresponding to the product name, and listed the product's PDF file name in the "Filename" box Other information which may be of interest. - The only shipping module I have active is USPS (enabled for the production server) (I do have a valid USPS user ID) - The only payment module I have active is PayPal. (I do have a valid PayPal account) Further, in the osCommerce Knowledge Base, I found a file called "Download" and followed the following instructions: ---The products to be downloaded after purchase are put in the catalog/download folder. ---The catalog/download folder will be read from the "pub" folder. ---Make sure the /catalog/pub folder is 777 and /catalog/download folder is 755 and these lines in catalog/includes/configure.php have the forward slash: ---define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); ---define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); (I don't know what 777 and 755 permissions are in the Netfirms version of osCommerce, so I set the permissions to read, write and 'x'.) I have checked and re-checked, seeking to confirm that I have done everything required to make the download function work. But it doesn't. Given the obvious intent for the downloading function, it must have been tested and made to work successfully at some time by some means. Am I missing something? Is there some additional setting or data value that is needed to flag my product as downloadable? What do I need to do to make this function work? This is important to me. Your prompt and careful help would be most appreciated.
rickftcco Posted March 27, 2009 Posted March 27, 2009 Ok, think got around other problem. Found a file under Includes/Language/English that had the define for the download variable, and added a backslash so that marketdownload turns into market/download. Error message went away. Believe I did all the other steps as described in this thread of posts. Have download option turned on, have a .zip file uploaded to download directory, added a DOWNLOAD and YES and inserted a line which specifies and associates the .zip file to the catalog item. Another post said there was an issue with PayPal if you are doing electronic downloads ONLY in the order, but too early to tell if that is a problem. What I am now seeing is that the order goes through, using PayPal's credit card processing option. I get a receipt from PayPal about the order... But how do I do the download? Was expecting to be returned to the site and see a download button... Seems like paypal processed the order, since my credit card was dinged and I got the receipt. I went back manually to the site and looked at my order history. Zero. No record of an order being placed. Any help on sorting this out, is appreciated. Having probs too. Have read this post and another earlier one and another later one that detailed various fixes. The problem with my site is that the server expects download files to be in a certain directory under htdocs, rather than under htdocs/[site name]/downloads, which is what the File Mangler utility gives access to. In other words, I can only create folders under htdocs/[site name] in File Manager. Now, I found the file (I think it was Includes/configuration.php) that would allow me to change the directory where my files are stored, but that will cause a huge mess. What seems to be needed, is to find the error generating function that happens at startup upon visiting the store, and change where IT (and presumably also the download functionality) expects the downloads to be. Having a hard time finding that (don't have access to GREP). So, the message I see when visiting the store is, "Warning: The downloadable products directory does not exist: [blah blah]/htdocs/marketdownload/. Downloadable products will not work until this directory is valid." <==Note that market is the site name and then download is appended to it; I cannot create this folder under htdocs, as File Mangler only gives me access to htdocs/market directory. Thanks for any help on this.
rickftcco Posted March 28, 2009 Posted March 28, 2009 Still having issues completing a download order using credit card option of PayPal. When I select the downloadable item, I see the DOWNLOAD option, and YES is selected. The order is processed, my card is charged, and I get a receipt and an email. There is a link to click on to return to the store. When I return, I am logged out and have to log back in. When I log in, I see the item is still in my shopping card, and when I look at "My Orders", it remains empty. The issue seems to be actually enabling the download functionality and mapping it to specific products. One post said to add this DOWNLOAD and YES option, and another said it didn't really matter what you enter for these two. From a programming perspective, one would expect that a specific option and value have to be entered and that these activate a built-in downloadable functionality for a given product. So, perhaps I have the wrong option and value literals entered for my build. ?? Clearly, what one expects to happen is that after payment is processed, you are returned to the storefront and given a download button to click on in order to get the blessed file. Things go great except there is no way to actually download said blessed file. This is also a critical component of my store, and help is appreciated. Rick Ok, think got around other problem. Found a file under Includes/Language/English that had the define for the download variable, and added a backslash so that marketdownload turns into market/download. Error message went away. Believe I did all the other steps as described in this thread of posts. Have download option turned on, have a .zip file uploaded to download directory, added a DOWNLOAD and YES and inserted a line which specifies and associates the .zip file to the catalog item. Another post said there was an issue with PayPal if you are doing electronic downloads ONLY in the order, but too early to tell if that is a problem. What I am now seeing is that the order goes through, using PayPal's credit card processing option. I get a receipt from PayPal about the order... But how do I do the download? Was expecting to be returned to the site and see a download button... Seems like paypal processed the order, since my credit card was dinged and I got the receipt. I went back manually to the site and looked at my order history. Zero. No record of an order being placed. Any help on sorting this out, is appreciated.
dxer Posted April 6, 2009 Posted April 6, 2009 Hi to all I have maybe related problem. The thing is that order is in processing but download link is already available for buyer. This is when buyer select paying by invoice and after he pays I need to change status of this order, then download link should appear. But now, download link appeared before paying is applied/status is processed. How to fix this ?
alexseif Posted April 8, 2009 Posted April 8, 2009 Hi all, I have a somewhat relating problem.. How do I remove the shipping cost when the product is to be downloaded?
rickftcco Posted May 2, 2009 Posted May 2, 2009 Lawdy, lawdy, I now be an expert in the "download" functionality. Well, except for the fact that it still is not fixed..but it almost is... Here is what I have learned: I did everything in this thread, plus one additional thing I found in an older thread...set the order status to "delivered" rather than "default" or "processing" after payment has been made. All the other tweaks have been done, checked, and rechecked a bunch. I instrumented a bunch of files with a bunch of fwrite() statements into a log file. The general logic flow of relevant systems is shown below: checkout_shipping.php //"Delivery Information" checkout_payment.php //"Payment Information" checkout_confirmation.php //"Confirmation" includes/classes/payment.php includes/modules/payment/paypal.php => PayPal with arguments for their "Return to [store]" button (link, plus session ID) And this all works great. PayPal correctly processes the order for the downloadable file, and has the correction link (to checkout_process.php) and osCsid. This is what the remaining process flow is supposed to be like: checkout_process.php includes/classes/payment.php checkout_success.php includes/modules/downloads.php download.php //Here it looks like you finally get a blessed link to do the download. The problem is, that when PayPal goes to checkout_process.php it appears that the user is logged out and the session id is not valid. So, it sends the user to the login page and then to checkout_payment.php. Checkout_payment.php then detects they are logged in, and that something is in their cart, but that no shipping method has been specified, and so sends them to checkout_shipping.php. In other words, back to the beginning. Clearly, the next hurdle to cross is to figure out why the session is being dropped, and I don't know enough about session stuff to do that yet. I tried "forcing cookies" and the OSCommerce mistakenly claims that my IE has cookies disabled, even though they are 100% enabled for all cookies (yes, restarted IE). Don't really want to have to debug the logic for the cookie handling, so went back to "forcing cookies" = "false" and sticking to the original session handling issue. There's a reasonable chance that if I can figger out how to keep the session from dropping, that the user will then not have to relog-in upon returning from PayPal and the rest of the logic will work. (Now, there is another issue lurking...but will worry about that later...if it turns out the status truly has to be set to "elivered", that won't work for the non-downloadable products...but don't worry about that now.) Any hints or clues as to what is going on with the session dropping will be greatly appreciated.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.