papoola Posted February 20, 2005 Share Posted February 20, 2005 Hi, I just edited the product-info page.php to add a back button to my product description pages but now the product image doesn't appear on that page. I copied and pasted the edited portion and was careful to delete the appropriate code so not sure what happened. Any ideas? Also, two simple questions: Does all code editing have to be done by downloading to an FTP, using Notepad, etc and then uploading the edited file? Can simple changes like the one above be done directly at my Admin panel cuz that's how I did this one. And......I have backed up my files but if I make a mistake and want to restore to default file, will any or all of any other editing I've done be "erased" and those files be back to "original" state, too? I'm REAL new at this, so please bear with me. Once I figure out the basics, I KNOW I'll be able to make the changes I want. Thanks, Katie "Princess Papoola" :blush: Link to comment Share on other sites More sharing options...
wheeloftime Posted February 20, 2005 Share Posted February 20, 2005 Hi,I just edited the product-info page.php to add a back button to my product description pages but now the product image doesn't appear on that page. I copied and pasted the edited portion and was careful to delete the appropriate code so not sure what happened. Any ideas? Also, two simple questions: Does all code editing have to be done by downloading to an FTP, using Notepad, etc and then uploading the edited file? Can simple changes like the one above be done directly at my Admin panel cuz that's how I did this one. And......I have backed up my files but if I make a mistake and want to restore to default file, will any or all of any other editing I've done be "erased" and those files be back to "original" state, too? I'm REAL new at this, so please bear with me. Once I figure out the basics, I KNOW I'll be able to make the changes I want. Thanks, Katie "Princess Papoola" :blush: <{POST_SNAPBACK}> Hello Princess, I never used the Admin file manager as it isn't very stable when it comes to editing files. A good editor instead of notepad for making changes could be Textpad but there are others which can handle PHP files better as notepad. If you made a backup first, which you always should do before making changes, you can FTP that back and everything should be okay again. Only restore the file you edited and you will only loose the changes you made in there but as they didn't work anyway it should be no loss. Before restoring you should check if you didn't make any mistake and try again. If it takes too long to find the error put the backup file back and make the changes again with even more care until you have it right. You will become more handy soon in this after applying more and more contribs. As it is hard to say what the Admin file manager screwed up you better start over with this one using a good editor. HTH and much fun with osC ! Link to comment Share on other sites More sharing options...
papoola Posted February 20, 2005 Author Share Posted February 20, 2005 Hello Princess, I never used the Admin file manager as it isn't very stable when it comes to editing files. A good editor instead of notepad for making changes could be Textpad but there are others which can handle PHP files better as notepad. If you made a backup first, which you always should do before making changes, you can FTP that back and everything should be okay again. Only restore the file you edited and you will only loose the changes you made in there but as they didn't work anyway it should be no loss. Before restoring you should check if you didn't make any mistake and try again. If it takes too long to find the error put the backup file back and make the changes again with even more care until you have it right. You will become more handy soon in this after applying more and more contribs. As it is hard to say what the Admin file manager screwed up you better start over with this one using a good editor. HTH and much fun with osC ! <{POST_SNAPBACK}> Hi Howard, Thanks for your reply. Seeing as how I didn't use an FTP to edit and edited from the File Manger script, I don't know how to restore to the original script. This is the only change I've made to my site so if I go to the backup files.sql and click on restore will it restore to the orginal script? That won't erase all the products I've added, wil it?!? I'll use an FTP, etc to do any further editing. Not sure where I download the file I want to make a change to.......from file manager page, yes? When you say "make a backup file" first, do I make a copy to download or a copy to save in file manager and that's the "backup file", yes? I'm trying to learn! Thanks for your help, Katie "Princess Papoola" :rolleyes: Link to comment Share on other sites More sharing options...
wheeloftime Posted February 21, 2005 Share Posted February 21, 2005 Hi Howard,Thanks for your reply. Seeing as how I didn't use an FTP to edit and edited from the File Manger script, I don't know how to restore to the original script. This is the only change I've made to my site so if I go to the backup files.sql and click on restore will it restore to the orginal script? That won't erase all the products I've added, wil it?!? I'll use an FTP, etc to do any further editing. Not sure where I download the file I want to make a change to.......from file manager page, yes? When you say "make a backup file" first, do I make a copy to download or a copy to save in file manager and that's the "backup file", yes? I'm trying to learn! Thanks for your help, Katie "Princess Papoola" :rolleyes: <{POST_SNAPBACK}> Hello Princess, Best is to forget about the File Manager page you have within your Admin. Don't use it at all and find yourself a decent FTP program. I myself use Total Commander and Textpad which have both all I need to FTP, manage, edit etc. the osC files and everything else I need. Total Commander is a special breed of file manager which has so many more options it might be daunting for someone just starting so probably it would be best if you look for WSftp or Smartftp or some other decent FTP program. Instead of Textpad you simply could use the Windows Notepad for a start but it might be better to start from the beginning with a good PHP/HTML/text editor. Don't use Word or anything like that, you need a programmers/text editor. There is many of those, some freeware, others like Textpad you can try before you buy but that's a choice you have to make. In essence you will have to use a FTP program to download the file you are going to edit to your local hard disk. Create a special map on your local hard disk for downloading and editing the osC files you are going to change and keep yourself to that place when downloading files from your server to your local hard disk. Advisable would be to keep a copy of the osCommerce install files on your local hard disk also from which you can always copy a virgin file to your server when mucho goes wrong. Second, do not use the backup.sql to restore files as you won't restore files but only overwrite your database thereby loosing all products and changes to your database you did between your last backup and the restore !!! Your osC files and your database are two different things so be careful what you do with which ! Again speaking for myself I have a copy of all osC files on the server on my local hard disk (besides the virgin osC install files) which I keep synchronized with every change I do in my shop on the server. Not always easy as one tends to forget to copy small changes to files on the server side to the local hard drive but absolutely neccessary (I think) to do anyway. If you change server, the server crashes or whatever unfortunate happens on the server side you will always have the latest files with all their changes on your local hard disk. Backup frequently your database (best everytime after making changes through the Admin) and you almost can't go wrong when you need to restore anything related to your shop. A long story and I could tell a lot more but you will have to find out most of it yourself by just doing and trying it, keeping in mind all the safetly features you have to build in for yourself. In short: 1) Do not use the osC file manager but use an FTP program to download the file you are going to edit to your local hard drive. Before you are going to edit the downloaded file make a safety copy of it in case you mess things up. After you have finished editing the file you will have to upload it back to the same place on your server as where you took it (ie. if you are going to edit the catalog/product_info.php you will have to upload, and overwrite, that same file after you are done editing). 2) The SQL file is what is in your database and you should never use that to restore files ! In fact you should (almost) never have to use the SQL file for restoring things in your database but you will have to make backups frequently as explained before. Just ask when you are stuck or need more information, there is a large community here who will help you to get a better understanding of how to setup, manage etc. your shop ! HTH Howard Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.