soccermeister Posted December 3, 2009 Share Posted December 3, 2009 I'm new to osCommerce but i was able to setup everything last night including MySQL, PHP and Apache. Everything works great so far, thanks for a great product. Now, I need to do some customization of the front page with new logos, titles, etc. I've been using Dreamweaver 8 for all my prior projects but this is the first time I've tackled PHP. I have read that DW8 is not the greatest PHP editor. However, I'm a visual type of guy so I prefer to work in split view in DW. I have everything setup to use the local server as the test server in DW8. When I go to click on Live View, I get a 404 not found http://localhost/catalog/index9dkw04983. Well, of course it's not going to find that file. Why are all the extra characters being appended when I'm trying to edit the catalog/index.php file? Link to comment Share on other sites More sharing options...
Ben Nevis Posted December 4, 2009 Share Posted December 4, 2009 I don't know about your extra characters and I don't use dreamweaver either, but I very much doubt it will be of much use to you in customising the appearance of osC. The pages in osC are dynamically generated by the php scripts, so unless dreamweaver has some kind of built in webserver capable of executing php scripts I wouldn't have thought it could give you the page impressions that the scripts generate and allow you to edit them in ways that will still work when you put the pages back up on your webserver. I could be wrong, but it sounds like 'what you've read' reflects that... www.jyoshna.com. Currently using OsC with STS, Super Download Store, Categories Descriptons, Manufacturers Description, Individual Item Status, Infopages unlimited, Product Sort, Osplayer with flashmp3player, Product Tabs 2.1 with WebFx Tabpane and other bits and pieces including some I made myself. Many thanks to all whose contributions I have used! Link to comment Share on other sites More sharing options...
Terminum Posted December 4, 2009 Share Posted December 4, 2009 As BN said, php is for dynamically generating pages so there aren't any great visual editors that are designed for it. In fact, I don't know of any editors that will render php pages properly. Those of us who are visually inclined are up the creek here :( The advantage that editors like DW provide is keyword recognition and styling the type so that it's easy to read (includes, variables, comments, etc). In my experience, DW does that pretty well. But the best way to view php pages is just upload them to your server continuously, or set up php to run in your local environment and view the pages locally in your web browser. Link to comment Share on other sites More sharing options...
jhande Posted December 4, 2009 Share Posted December 4, 2009 Hey Claus, I have my localhost system setup using Dreamweaver 8 and XAMPP. I've been used to working in Dreamweaver since version 4 but find it not the best for working with PHP. I don't receive any errors or get extra characters appended to my files. Here's how I work in Dreamweaver - Split View and Live Data off. I edit the code in the top code view window, whether it's HTML or PHP. Then I turn on Live Data for a quick preview, it's not totally accurate but it lets me see if I screwed anything up. If it looks ok, then I Preview in Browser. I'm not real happy with the Live Data view because it does not show how my page really will display. Example = ALL of the infoboxes are missing the header background images. The background of ALL the tables take on the color of the body text tag from the stylesheet. Along with a few other minor glitches. But it does offer a guick preview. All I can recommend is double check that you have your localhost setup correctly including within Dreamweaver and don't edit with Live Data active. - :: Jim :: - - My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 - Link to comment Share on other sites More sharing options...
MrPhil Posted December 4, 2009 Share Posted December 4, 2009 In fact, I don't know of any editors that will render php pages properly. The advantage that editors like DW provide is keyword recognition and styling the type so that it's easy to read (includes, variables, comments, etc). Try a real programmer's editor such as ViM. It color codes everything in a PHP file. I'm sure there are other editors (Notepad++ is also well-loved) that will do the same. They won't "pretty print" (fiddle with the layout) because that's not the job of an editor, although it will indent for you. I generally recommend staying away from WYSIWYG page layout editors such as DW, simply because it's too easy to be in the wrong mode and end up inserting HTML or PHP code as text to be displayed (happens all the time to newbies: "I added this code, and it just shows up as text on the page!"). DW and its cousins were designed to do static layout of static HTML pages, and anything else is a kludge. As a server is needed anyway, to properly interpret the code, a WYSIWYG editor is a complete waste of money if you buy it just to do PHP code. Any code edits need to be uploaded to your server to be run and viewed -- I wouldn't trust DW to properly interpret PHP itself and display the results (if that's what you meant by "render"). It might be useful if you use it to lay out a page in HTML, and then edit the generated HTML and CSS code to add your PHP logic, but other than that there's no point to having it. Link to comment Share on other sites More sharing options...
soccermeister Posted December 4, 2009 Author Share Posted December 4, 2009 Thanks for all the insight, it was very informative. Oh well, guess I'll be working in code again and previewing in my browser as I go along. I do like osCommerce so having to edit PHP in code is just a minor bump in the road B) Thanks! Link to comment Share on other sites More sharing options...
Jax2 Posted December 6, 2009 Share Posted December 6, 2009 You know, I'm not really sure what some of the others are talking about to be honest ... I have been programming in PHP for years and years, and since day one, I have been using Macromedia's Homesite ... it highlights php correctly, doesn't add any extra chars and has no problem displaying php the way it was meant to be displayed ... check it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.