Scalable_sCents Posted June 18, 2008 Share Posted June 18, 2008 I'm ploughing through 'Building online stores with OsCommerce' by David Mercer and am using some of his guidance to make changes to the store layout but I can't seem to get round the catalog page disappearing when making simple changes to the Catalog/index.php file (or the header.php or footer.php files for that matter). I want to make the left and right infobox columns flush with the header: Here's how it's looking now I'm guessing that this is probably down to cell padding so have tried changing: <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> to.... <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="0"> but changing any values within the index, header or footer files makes the Catalog page disappear. Any ideas why this might be happening? Link to comment Share on other sites More sharing options...
♥FWR Media Posted June 18, 2008 Share Posted June 18, 2008 I'm ploughing through 'Building online stores with OsCommerce' by David Mercer and am using some of his guidance to make changes to the store layout but I can't seem to get round the catalog page disappearing when making simple changes to the Catalog/index.php file (or the header.php or footer.php files for that matter). I want to make the left and right infobox columns flush with the header: Here's how it's looking now I'm guessing that this is probably down to cell padding so have tried changing: <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> to.... <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="0"> but changing any values within the index, header or footer files makes the Catalog page disappear. Any ideas why this might be happening? Just set all tables to cellpadding="0" cellspacing="0" And use specific css properties for padding Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 If you're using the osC File Mangler File Manger to edit things, that's probably the problem. I'd use the editor in your site's Cpanel, or FTP to your PC, edit with Notepad, then FTP back to the same folder on the site. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 Just set all tables to cellpadding="0" cellspacing="0" And use specific css properties for padding FWR - thanks for the suggestion OK, I've tried setting all cell padding & cell spacing values to ="0" within index.php and the catalog page has gone again. Do I need to go ahead and do that for header and footer (and any other??) files as well? Not sure what you mean by specific css properties - do I need to set a global value for cell padding in stylesheet.css as well? Pretty new to this as (if you couldn't guess) :blink: Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 If you're using the osC File Mangler File Manger to edit things, that's probably the problem. I'd use the editor in your site's Cpanel, or FTP to your PC, edit with Notepad, then FTP back to the same folder on the site. Hi again Germ, I'm using Dreamweaver to edit and then FTP'ing to the web server. It seems that whenever I make a change to table widths, spacing, padding (columns, info boxes etc) in header.php, index.php or footer.php the catalog page does a runner. Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 I've set all cellpadding & cellspacing values to "0" and uploaded to the server and the Catalog page is not there. I've not made any changes to stylesheet.css. I'm stuck. Will search some more... Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 Maybe Dreamweaver is changing more than you think. Try a simple text editor. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 Germ, I've tried using Notepad to edit and the same problem persists. Can't shake it off. Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 When you FTP back to the server, are you FTP'ing it in TEXT or ASCII mode? :unsure: FTP programs also have BINARY mode transfer to use for binary files like images. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 I'm using SmartFTP and the transfer type is on auto. I have ASCII and binary as the options.... Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 Germ, I've just tried a few things and it looks like it may be Dreamweaver that's causing the problem. Let's say I amend the following in application_top.php: From // customization for the design layout define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125) to // customization for the design layout define('BOX_WIDTH', 150); // how wide the boxes should be in pixels (default: 125) then save and FTP across. This causes the catalog page to disappear. If I then change undo the changes back to: // customization for the design layout define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125) and FTP across the Catalog page is still invisible. If I then FTP the original, unedited application_top.php file and replace the amended/restored file - the Catalog page returns. I am assuming that this logically removes the FTP settings I'm using. So we are left with Dreamweaver as the culprit OR there's something else I should be amending possibly? What's frustrating is this appears to happen if I use notepad to edit the file too. I've double checked I'm not doing anything goofy like FTP'ing the wrong copy of the amended file etc... Can't see anything on the forums so far either (been searching for a couple of hours now) Any ideas???? Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 When you use Notepad, is the text all "run together", or is it "formatted" (i.e. on multiple lines fairly easy to read)? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 It's all run together Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 BINGO! Open it with Wordpad (not Word!) to keep the formatting. Then copy/paste the entire file into a blank Notepad window to make changes. It should still have the proper formatting after doing this. See if you have better results. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
♥FIMBLE Posted June 18, 2008 Share Posted June 18, 2008 Thats a bugger to find too! Had it earlier, can cause all kinds of problems! Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 The reason is how UNIX and Windows/DOS handle text files. UNIX uses a "linefeed" and Windows/DOS use "carriage-return/linefeed" at the end of each line. For some reason Wordpad doesn't care, but Notepad does. :huh: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 Germ, Tried all of that: 1) Opened application_top.php in Wordpad 2) Copied & Pasted to Notepad 3) Changed Box_width to '150' 4) Saved the file as application_top.txt (ANSI) 5) Renamed the file application_top.php 6) Uploaded (ASCII) Result was the blank Catalog page. :blink: Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 I'm quite surprised that I haven't found any other posts on this having searched for a while now - I would have thought it was quite common for people to come across this? Either that or I'm incredibly thick (which I can admit I am when it comes to this) :) Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 Thats a bugger to find too!Had it earlier, can cause all kinds of problems! Hi Fimble. You were having similar problems to this? ie. Catalog page disappearing when FTP'ing changed files? How did you get round it? Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 Hard to tell exactly what's the rub? How about if I PM an email address to you and you send me the the edited file? I'll peek at it and I'll probably be able to tell what's going on. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
♥FIMBLE Posted June 18, 2008 Share Posted June 18, 2008 Hi Fimble. You were having similar problems to this? ie. Catalog page disappearing when FTP'ing changed files? How did you get round it? I worked on it in WORDPAD not notepad, for some reason its great for keeping the formatting in place. Then opened the file on the server, deleted the contents, and simply pasted from wordpad, saved the file and it was fine. Have had that happen a few times. This time it was not notepad that was worng but Notepad ++ Happy days :-) Nic Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 That would be a great help. Thanks. Link to comment Share on other sites More sharing options...
germ Posted June 18, 2008 Share Posted June 18, 2008 I use Crimson editor, but sometimes I still have to copy/paste into Wordpad first. Not so much when opening files, but when I copy/paste from posts here on the forum. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
♥FIMBLE Posted June 18, 2008 Share Posted June 18, 2008 I use Crimson editor, but sometimes I still have to copy/paste into Wordpad first. Not so much when opening files, but when I copy/paste from posts here on the forum. Nice to think that Bill + Paul are helping open source eh? :-) Sometimes you're the dog and sometimes the lamp post [/url] My Contributions Link to comment Share on other sites More sharing options...
Scalable_sCents Posted June 18, 2008 Author Share Posted June 18, 2008 I worked on it in WORDPAD not notepad, for some reason its great for keeping the formatting in place.Then opened the file on the server, deleted the contents, and simply pasted from wordpad, saved the file and it was fine. Have had that happen a few times. This time it was not notepad that was worng but Notepad ++ Happy days :-) Nic Nic, Thanks for sharing your experience. :rolleyes: I'm using SmartFTP but am currently downloading files to edit them. Is there some way I can open them server side and just paste changes in then? I have a feeling that this is the 'missing link' with all this. Something seems to get lost in translation when I make changes locally and then FTP over. What Germ was saying earlier about UNIX / MS format conflicts makes a lot of sense. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.