Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BEST EDITING SOFTWARE


brett_anderson

Recommended Posts

I HAVE TRIED TO EDIT THIS INDEX.PHP IN DREAMWEAVER BUT I CAN'T EDIT IT PROPERLY. I AM NOT SURE ABOUT THE CODES. I TRIED TO FIND ('TEXT_MAIN', 'This is a default setup of the osCommerce project...'); CAN'T FIND N EDIT IT IN DREAMWEAVER AS I AM NOT MUCH OF A PROGRAMMER. CAN ANYONE SUGGEST ME HOW TO EDIT THESE PHP FILES OR IF U GUYS USE ANY SOFTWARE TO EDIT IT! :unsure: I DOWNLOADED IT USING FTP IN DREAMWEAVER. HAS IT GOT SOMETHING TO DO WITH THE TESTING SERVER ON DREAMWEAVER?

 

I NEED SOME HELP!

Link to comment
Share on other sites

i tried opening it in textpad but that's wat it comes up with where is define('TEXT_MAIN', ''); i don't knw how to edit this thing this is all code! it's the same problem in dreamweaver.

 

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 

*****************

Copyright © 2004 *******************

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$cateqories_products = tep_db_fetch_array($categories_products_query);

if ($cateqories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

Link to comment
Share on other sites

thanx for that u rock, i was looking it under oscommerce/index.php, is this index.php automatically edited when i edit language/english/index.php.

 

thanx again to all that helped!

I use DW2004MX and I'm still trying to figure out the code. Basically I make a change in the color or text, then upload it to see what changed. Not real productive but I'm able to understand the layout and how the code all comes together a little better than two days ago. :D i do know that if I change something in the public_html/index.php, DW will ask "Update dependent files" I just click yes and they seem to work. I'm by no means an expert but it's still going good for me. I don't know why DW won't read any of that in graphic form. Mine all shows up as boxes (frames I guess) with small PHP icons in them. DW is waste for this setup but I bought it so now I'm stuck :angry: The last site I did was easy to do because it didn't involve OSC. I had that site up in no time at all

Link to comment
Share on other sites

Hmm, am using Dreamweaver MX fine. I do admit that I rarely use the WYSIWYG side of it and nearly always look at the code. I'm not a whizz at PHP but can certainly see where the HTML-side of the code is, and spot error.

Link to comment
Share on other sites

I'm using Crimson Editor to edit the files - it's good in that it knows correct HTML terms, and highlights them in different colours if you've got them right or wrong.

- osCommerce is fun! -
Link to comment
Share on other sites

I use Dreamweaver and I am having no issues finding what I want whether I am in code only mode or code and design. I guess that makes me one of the weird ones as I certainly am not a whizz at PHP but I am not going to use that as some excuse to give up.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

dreamweaver is fine for editing, he was just looking at the wrong index file. Can be confusing at first. Especially if you upload a file to the wrong directory and break the whole site. B)

Link to comment
Share on other sites

just a quick question, i edited the index.php in dreamweaver then i uploaded it to languages/english/ directory. i couldn't c any change so deleted the previous index.php file but now i am getting the parse error on line 65, how do i fix it?

 

r u supposed to upload index.php in the language directory only or the upper directory as well. cos there r two index.php at two different locations!

Link to comment
Share on other sites

There are different index.php's.

 

There is one in the root directory (or just catalog/) which describes how the index page is structured.

 

There is another in includes/languages/english/ which describes the words on the page.

 

V. important that both are in the right place and correctly coded.

- osCommerce is fun! -
Link to comment
Share on other sites

thanx david, but can you please tell me which one should i edit and upload since it's hard to edit the root directory one i actually edited language/english/index.php, am i doing it right? if i do upload it i can't c any change on the index.php page?

 

thanx again for replying mate!

Link to comment
Share on other sites

What do you mean it's hard to edit the root index.php file?

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

All the files can be edited in exactly the same way. Edit and upload the one you want to change.

 

I don't know if the way you're using Dreamweaver is causing problems - I use a text editor called Crimson Editor.

- osCommerce is fun! -
Link to comment
Share on other sites

Did you assume that Dreamweaver will display PHP code in WYSIWYG format? You can't edit in WYSIWYG when you're dealing with anything other than HTML. But you can edit the code or text directly in DW just like any other editor.

Link to comment
Share on other sites

when u try and edit the root directory one it comes up with codes like require('includes/application_top.php'); and there is no place to edit text like it does in english directory one. the english directory comes up with define('TEXT_MAIN' so i am editing the text and then i uploaded it to the server through ftp but i didn't change any text in the root folder index.php, i thought it gets updated automatically when u change the text in the english folder.

 

and i can't c any change in the index.php when i access it through the web. i will try the text editor u's suggested me.

 

thanx for the replies again, much appreciated!

Link to comment
Share on other sites

actually crimson editor is a great software i have jst tried it for the first time and i am very impressed! it highlights all the html text in green and easy to recognize!

 

thanx for telling us about it! but i still have that index.php problem and i am not sure if i am doing it right? :(

Link to comment
Share on other sites

Bud, you need to get a book on php or something and understand the basic concepts of an array, includes, and constructing strings in php.

 

Then you need to read the wiki site and other osC docs and figure out the directory structure that osC uses to support multiple language formats and content from the db.

 

These people have told you your answer already, and it has nothing to do with the editor. It does not matter what editor you use, you can not visually edit php. Its not going to happen.

 

Forums are no substitute for reading the manual or an understanding of the code that runs your store.

My advice comes in two flavors- Pick the one that won't offend you.

 

Hard and Cynical: How to Make a Horrible osCommerce Site

 

Warm and Fuzzy: How to Make an Awesome osCommerce Site

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...