Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

download.php


Guest

Recommended Posts

hello world?

 

I have a question, regarding my oSc. As I was checking and updating my .php files, I noticed that the download.php file in

(includes/languages/english/download.php) is blank. It has the correct <?php heading, but there are no contents in the body of this file.

 

So I went to check out download.php in the catalog directory, and I noticed That file is not blank, it has all of its contents. So what I want to know is: Does download.php (in the languages/english folder) suppose to be blank? if not, then will it effect the digital delivery of my digital files ( when a customer makes a purchase?)

 

can anyone explain to me or help me out on this one? I would like to learn about this file, so I can better understand its purpose and how to keep it up to date. All feedback is greatly appreciated.

thanks.

Rick

Link to comment
Share on other sites

can anyone explain to me or help me out on this one? I would like to learn about this file, so I can better understand its purpose and how to keep it up to date. All feedback is greatly appreciated.

 

my /includes/languages/.../download.php file isn't blank, but it doesn't have any code in it either...just the comment block like all other php files.

 

the files in the /includes/languages/... directories are used to define language-specific strings. these files are of the same name as the script in the /catalog folder. so, when running the /catalog/download.php script, it's text strings are defined in /catalog/includes/languages/<your language>/download.php. if the script you are running (in this case, download.php) does not have any language-specific strings, then the corresponding language file will be empty...since there are no strings to define. the file in /includes still needs to be there, since there's code that includes the language file whether there's something in there or not. this way, no matter what script is running, it's language strings get defined.

 

i hope that sheds a little light on things for you.

Link to comment
Share on other sites

Yes it is blank.

 

<?php

/*

$Id: download.php 1739 2007-12-20 00:52:16Z hpdl $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

?>

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

my /includes/languages/.../download.php file isn't blank, but it doesn't have any code in it either...just the comment block like all other php files.

 

the files in the /includes/languages/... directories are used to define language-specific strings. these files are of the same name as the script in the /catalog folder. so, when running the /catalog/download.php script, it's text strings are defined in /catalog/includes/languages/<your language>/download.php. if the script you are running (in this case, download.php) does not have any language-specific strings, then the corresponding language file will be empty...since there are no strings to define. the file in /includes still needs to be there, since there's code that includes the language file whether there's something in there or not. this way, no matter what script is running, it's language strings get defined.

 

i hope that sheds a little light on things for you.

 

Of course it does. And Thank you (both) for your expertise.

After further exploration of the files in (includes/languages/..) directory, I noticed that digital files can be downloaded from the checkout_success.php page. Perhaps the page is Blank for a reason. And neither am I willing to find out (Why) LOL.

 

But seriously, my download.php page looks alot like the illustration provided by Satish.

Link to comment
Share on other sites

oscommerce cheks for a language file for each file in catalog if not found PHP will give a warning.So to avoid warning this is done.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

oscommerce cheks for a language file for each file in catalog if not found PHP will give a warning.So to avoid warning this is done.

 

Satish

 

Meaning- If I alter a file in one language, be sure that I update the other languages to avoid such errors?

("is that what you are suggesting?")

 

If I don't know how to read other languages, I would have to get a ("native") coder to translate them for me.

Most updates done to my website are done in english and is not available in other languages. Would this cause those errors that you speak of?

Link to comment
Share on other sites

Meaning- If I alter a file in one language, be sure that I update the other languages to avoid such errors?

("is that what you are suggesting?")

 

If I don't know how to read other languages, I would have to get a ("native") coder to translate them for me.

Most updates done to my website are done in english and is not available in other languages. Would this cause those errors that you speak of?

 

Now that you have told me that, I realized that it would cause errors. Because I'm correcting quite a few; right now- (as I re-post)

I'm glad that you informed me of that because if you didn't There is no telling:- how long it would have took me to find out.

 

Kudos to Satish!..

Link to comment
Share on other sites

Meaning- If I alter a file in one language, be sure that I update the other languages to avoid such errors?

("is that what you are suggesting?")

 

yes, you should update the other language files. even if it's just to have an english version of the text. this is especially true if you're adding new defines. if those defines are used, but not set up in all languages, you get ugly error message. your code still basically works but any non-default languages chosen by users will look less than professional. but if you're only using english, you don't need to worry about the other languages.

 

If I don't know how to read other languages, I would have to get a ("native") coder to translate them for me.

Most updates done to my website are done in english and is not available in other languages. Would this cause those errors that you speak of?

 

as i said above, there can be errors. but if you disable all other languages and only support english, then you only need to update the english version files. (i sometimes just remove the infobox that allows you to select the language...) the main error is if your main script, /catalog/myscript.php for example, tries to include it's language file /includes/languages/english/myscript.php and it doesn't exist. as long as the file exists, the only other errors you'd get would be for the missing defines. to see what that might look like, just comment out one of your defines and run your script.

Link to comment
Share on other sites

yes, you should update the other language files. even if it's just to have an english version of the text. this is especially true if you're adding new defines. if those defines are used, but not set up in all languages, you get ugly error message. your code still basically works but any non-default languages chosen by users will look less than professional. but if you're only using english, you don't need to worry about the other languages.

 

 

 

as i said above, there can be errors. but if you disable all other languages and only support english, then you only need to update the english version files. (i sometimes just remove the infobox that allows you to select the language...) the main error is if your main script, /catalog/myscript.php for example, tries to include it's language file /includes/languages/english/myscript.php and it doesn't exist. as long as the file exists, the only other errors you'd get would be for the missing defines. to see what that might look like, just comment out one of your defines and run your script.

 

That would make sense. I once thought about making english my primary website language, but I never put it into action.

I guess I'll have to manually stroll through all of my pages, in all languages to see if I encounter any errors. If I do, I'll probably end up dropping that particular language.

thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...