Jump to content

Archived

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

lindsayanng

Oscommerce Road Map for the newbies

Recommended Posts

I have been thinking of adding a new post to my blog where I explain the easiest and best ways to install addons.. AND a post that also will list what I think are nessecary addons to have a successful web store


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
http://www.fengshuinetwork.net/catalog

 

is the link on this. I must have missed the email from your last post asking for this link. Thanks again...

 

Hey when I did the search for word in in all files and folders, I just typed "Nathan" (without the quotes) and figured if that was in there somewhere it would give me the file in which it was located. No Dice....so have no idea where they parked the text on the index page that reads Jodi and Nathan....etc.

 

 

Very NIce site. How do you edit your main page?

 

What if you wanted to get rid of a box, like if you wanted to get rid of the review box, how would you do that?

Share this post


Link to post
Share on other sites

you open the catalog/includes/column_left.php (or column_right.php if its on the right hand side) and find the code for the reviews box and remove it.. the reviews should look something like

 

<php? include(reviews.php);

?>


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
to me, working on the site is more fun.. I just create sites, i dont do the selling.. so its obvious i enjoy building the site over selling.

 

BUT YES.. just about everyone here has used winmerge or diffmerge to to contributions... its the absolutely EASIEST way, just dont do crazy just clicking MERGE MERGE MERGE MERGE, because you CAN merge most of it, but sometimes it will overwrite or change something that you really shouldnt change, and that is where good note keeping and a little knowledge of coding comes in.

 

 

Hi Lindsay, I have read through your stuff and your amazing. Thank You for doing this.

 

One question though... I have OScommerce 2.2 Does it matter what version I have, I want to get the book Designing OScommerce as you have suggested, but I would hate for it to be for a different version.

Share this post


Link to post
Share on other sites

How Do I get to the a page so I can view it in a Browser? Right now my site is bare

 

http://www.sportsteamgold.com

 

How do I get to a page that Shows me what my site will look like? Does it exist? Do I have to make it myself? Do I need to get a Template before I can see anything?

Share this post


Link to post
Share on other sites
How Do I get to the a page so I can view it in a Browser? Right now my site is bare

 

http://www.sportsteamgold.com

 

How do I get to a page that Shows me what my site will look like? Does it exist? Do I have to make it myself? Do I need to get a Template before I can see anything?

 

 

I figure once I get a grip on seeing the page on my site, I will have a better idea of how I get my Products on it and I know that I edit the .php files to get the looks and box customization I need.

Share this post


Link to post
Share on other sites

ummm you need to actually INSTALL oscommerce first.. if you think you installed it.. did you install it in sub directory like store, or shop?? Its definitely not in catalog because I tried that


A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Share this post


Link to post
Share on other sites
As a newbie to oscommerce AND php, i feel the need to contribute in some way. The ONE thing that I feel I can help with is OTHER newbies. I know EXACTLY what their confusion feels like, and the FIRST thing that you NEED to understand is the file structure of oscommerce, and it is one of the MOST confusing aspects to newbies like myself.

 

So here goes your road map to the oscommerce file structure.

 

When you install oscommerce to your server, you have almost TWO separate websites. You have your customer end, which is the part that everyone sees which is USUALLY called the Catalog, and you have the administration end, which is where you end up when you type www.mysite.com/catalog/admin. That is were the majority of your site configuration and administrations happen aside from actual coding.

 

Each section, both the catalog and the admin have individual files that make up the main part of that page. You have a header, footer, index, left colum, ect. in BOTH of these sections. The thing is, even though they have the same file name, they are ENTIRELY different. If they were the same, you would have a copy of your main website and no administration right? Believe it or not, this was one of the MOST confusing things to me. WHY were there TWO headers? Well, you need a heeader for the shopping cart that will show your shop banner and whatever else you choose to have, but you ALSO need a header in the admin section that shows the oscommerce banner and the header navigation. Those are two totally different things, but they are located in the same place of the page, therefor are called the header. Same with the other duplicate pages.

 

So WHY are there header, footer, right column, left column pages? Why aren't they just included in the index page like a typical HTML site? Well, there's not really a simple answer to this, and I couldnt tell you EVERYTHING about how it is set up, HOWEVER I can offer this explaination. You index page is the first page that your customer sees when they type in the url to your site. This index page has the code in it that calls for the HEADER.PHP, LEFT_COLUMN.PHP, RIGHT_COLUMN.PHP, and FOOTER.PHP. These when put together, make up the LOOK of the index page of your site and are under the INCLUDES folder. I like to remember which file they are in because they are INCLUDED in the index to make up the main page and they NEED to be INCLUDED in every page of your site. The header, footer, right and left column are ALWAYS shown on your site no matter which section of the site your are on.. much like a template.

 

The other files in the INCLUDES section of your catelog are the application_top.php, application_bottom.php, configure.php, filenames.php. The application top and bottom have the code in them that calls on certain functions of the top and bottom of your page. The application top is the page that has the code that checks for the SSL and other securities (if in place) and calls on the correct database file, set cookie use, check IP address, ec. It basically does most of the "behind the scenes" functions that your website performs every time someone visits. Same with the application_bottom.php file.

 

Then you have the FUNCTIONS folder. This folder contains files that, when called upon from your includes pages, will perform certain functions. For instance, the general.php function page will call on certain tables from your database, like the PRODUCT NAME. So instead of writing all of this code for a particular function on one page, you just refer it to the general functions page so it does not get cluttered. It will perform functios to check if stock is available for a certain item, calculate tax and more. This is another "behind the scene's type of file that will access certain data if it is called upon. This data can be called upon by the load of a page or clicking a button depending on the code that is entered.

 

The CLASSES folder contains files the control the look and functionality of certain parts of the site. So if you create a breadcrumb (which is the little navigation bar the shows you where you've been ie: home->main category->subcategory->product) then when you are writing that code in the header.php file, you can call on the breadcrumb CLASS to define how it is going to work. It tells the website to log and display the sections of the site the visitor has been to. The order.php, when called on will check that the fields were filled out correctly for the order being placed and copy them to the database for further use.

 

The MODULES folder contains the shipping, order total, payment, and other modules that come pre-installed on your oscommerce. This will grow as you add more modules to your site. many of code in these can be changed in your admin section. The Shipping Module will be installed through your admin, and the changes you make within the admin section on your website will show in the code. I have not done a lot of work with these so I can not explain too indepth about them.

 

The BOXES folder is probably the MOST used folder by myself when I was trying to make my site functional and good looking. The boxes folder contains an individual .php page for each information box on your page. And information box is either the boxes on the left and right column of your page, or any other box you find within your page. The code inside of these files tells the website how to display the information on the page, and what to display. You will see an HTML table with the <tr> and <tad> tags. It will contain the header information of the box (whether you want an image or text) and will call on a class from the style sheet for the LOOK of the box (ie: outline, size, ect.)

 

There is a LOT of information about customizing your boxes here: The Knowledge Base

 

 

 

Then you have the LANGUAGES FOLDER, which can be INSANELY confusing because.. wait, you now have ANOTHER index.php page?? Its not as confusing as you think though. Before you get to the other index.php file, you will see you have three language folders, and three language FILES. Since I speak english, I'm going to explain what that one does. The others to the same thing but in a different language. If you open the english.php file, you will see a LIST of DEFINES.

You will see something like this:

define('BOX_HEADING_CATEGORIES', 'Categories');

That is a VERY easy thing to explain. All it says is where you see the words BOX_HEADING_CATEGORIES, the website should display the word Categories. Simple. So the code says that it is DEFINING the words in caps to say whatever it says in that sections of code. It seems redundant if you are only making a website in one language, but it is NESSECARY if you are making a website that uses multiple languages because depending on which language the visitor has chosen, it will call on a different define for the word.

 

So now inside of the ENGLISH FOLDER you have a bunch of pages that are named the same as the ones in your main catalog, HOWEVER these pages do not carry the functionality or look. They just tell the site to display certain words in that particular language, much like the english.php file. This just organizes it more so you dont have a TON of defines in your english.php. If you open them, they will look A LOT like the english.php file. So see, the second index file is not all that complicated. It just says that if you are on the index page, in the english language, to display certain words in ENGLISH.

 

You also have an ENGLISH images folder where you will put all of your buttons because obviously, Add To Cart is not the same in all languages. You NEED to have these because if you are in the german language, you don't want the CONTINUE button to show, you want the german counterpart to show instead. This is NOT the image folder where any other website images should be stored unless you only want them to show up if they are in a certain language.

 

So thats it for the layout of the site.

 

now i didnt REALLY explain the ADMIN section. Theres a reason for this. It is exactly the same but different. WHAT?? Well, the file structure is the same, but instead of creating the look and functionality of your website, it creates the look and functionality of the admin part of your site. These files will not change the look of your website AT ALL, but it will change your administration. SO if you add a contribution that creates a new section in your admin, you will NEED to access those files, otherwise you will not.

 

 

 

So i hope this helped someone. ANYONE who reads this, please feel free to correct me or clarify if some things sound confusing to you to dont make any sense. I am in NO WAY a php expert, i'm not even advanced.. I'm HARDLY a beginner.. I learned all of this by just jumping in and reading books and some common sense. It took a while and when i first got here, i was SOO confused and SOOO scared to touch anything. The BEST thing i could have done, though, was installing my own contributions. I was scared to do it at first, but if you start with some simple install ones, you will learn the feel of oscommerce better than if you had someone like me telling you.

 

So get in there, do some searching and messing around. buy some oscommerce books (there are two i LOVE, one by Monika Mathis and the other by David Mercer) that have helped me a TON. Just remember to BACK UP YOUR FILES EVERY TIME YOU MAKE A CHANGE!

 

 

WOW! GREAT INFORMATION! THANK YOU SO MUCH,VERY HELPFUL!! BESIDES PRETTY,INTELLIGENT!! GREAT COMBINATION THIS DAYS!! THANKS AGAIN!!

Share this post


Link to post
Share on other sites
As a newbie to oscommerce AND php, i feel the need to contribute in some way. The ONE thing that I feel I can help with is OTHER newbies. I know EXACTLY what their confusion feels like, and the FIRST thing that you NEED to understand is the file structure of oscommerce, and it is one of the MOST confusing aspects to newbies like myself.

 

So here goes your road map to the oscommerce file structure.

 

When you install oscommerce to your server, you have almost TWO separate websites. You have your customer end, which is the part that everyone sees which is USUALLY called the Catalog, and you have the administration end, which is where you end up when you type www.mysite.com/catalog/admin. That is were the majority of your site configuration and administrations happen aside from actual coding.

 

Each section, both the catalog and the admin have individual files that make up the main part of that page. You have a header, footer, index, left colum, ect. in BOTH of these sections. The thing is, even though they have the same file name, they are ENTIRELY different. If they were the same, you would have a copy of your main website and no administration right? Believe it or not, this was one of the MOST confusing things to me. WHY were there TWO headers? Well, you need a heeader for the shopping cart that will show your shop banner and whatever else you choose to have, but you ALSO need a header in the admin section that shows the oscommerce banner and the header navigation. Those are two totally different things, but they are located in the same place of the page, therefor are called the header. Same with the other duplicate pages.

 

So WHY are there header, footer, right column, left column pages? Why aren't they just included in the index page like a typical HTML site? Well, there's not really a simple answer to this, and I couldnt tell you EVERYTHING about how it is set up, HOWEVER I can offer this explaination. You index page is the first page that your customer sees when they type in the url to your site. This index page has the code in it that calls for the HEADER.PHP, LEFT_COLUMN.PHP, RIGHT_COLUMN.PHP, and FOOTER.PHP. These when put together, make up the LOOK of the index page of your site and are under the INCLUDES folder. I like to remember which file they are in because they are INCLUDED in the index to make up the main page and they NEED to be INCLUDED in every page of your site. The header, footer, right and left column are ALWAYS shown on your site no matter which section of the site your are on.. much like a template.

 

The other files in the INCLUDES section of your catelog are the application_top.php, application_bottom.php, configure.php, filenames.php. The application top and bottom have the code in them that calls on certain functions of the top and bottom of your page. The application top is the page that has the code that checks for the SSL and other securities (if in place) and calls on the correct database file, set cookie use, check IP address, ec. It basically does most of the "behind the scenes" functions that your website performs every time someone visits. Same with the application_bottom.php file.

 

Then you have the FUNCTIONS folder. This folder contains files that, when called upon from your includes pages, will perform certain functions. For instance, the general.php function page will call on certain tables from your database, like the PRODUCT NAME. So instead of writing all of this code for a particular function on one page, you just refer it to the general functions page so it does not get cluttered. It will perform functios to check if stock is available for a certain item, calculate tax and more. This is another "behind the scene's type of file that will access certain data if it is called upon. This data can be called upon by the load of a page or clicking a button depending on the code that is entered.

 

The CLASSES folder contains files the control the look and functionality of certain parts of the site. So if you create a breadcrumb (which is the little navigation bar the shows you where you've been ie: home->main category->subcategory->product) then when you are writing that code in the header.php file, you can call on the breadcrumb CLASS to define how it is going to work. It tells the website to log and display the sections of the site the visitor has been to. The order.php, when called on will check that the fields were filled out correctly for the order being placed and copy them to the database for further use.

 

The MODULES folder contains the shipping, order total, payment, and other modules that come pre-installed on your oscommerce. This will grow as you add more modules to your site. many of code in these can be changed in your admin section. The Shipping Module will be installed through your admin, and the changes you make within the admin section on your website will show in the code. I have not done a lot of work with these so I can not explain too indepth about them.

 

The BOXES folder is probably the MOST used folder by myself when I was trying to make my site functional and good looking. The boxes folder contains an individual .php page for each information box on your page. And information box is either the boxes on the left and right column of your page, or any other box you find within your page. The code inside of these files tells the website how to display the information on the page, and what to display. You will see an HTML table with the <tr> and <tad> tags. It will contain the header information of the box (whether you want an image or text) and will call on a class from the style sheet for the LOOK of the box (ie: outline, size, ect.)

 

There is a LOT of information about customizing your boxes here: The Knowledge Base

 

 

 

Then you have the LANGUAGES FOLDER, which can be INSANELY confusing because.. wait, you now have ANOTHER index.php page?? Its not as confusing as you think though. Before you get to the other index.php file, you will see you have three language folders, and three language FILES. Since I speak english, I'm going to explain what that one does. The others to the same thing but in a different language. If you open the english.php file, you will see a LIST of DEFINES.

You will see something like this:

define('BOX_HEADING_CATEGORIES', 'Categories');

That is a VERY easy thing to explain. All it says is where you see the words BOX_HEADING_CATEGORIES, the website should display the word Categories. Simple. So the code says that it is DEFINING the words in caps to say whatever it says in that sections of code. It seems redundant if you are only making a website in one language, but it is NESSECARY if you are making a website that uses multiple languages because depending on which language the visitor has chosen, it will call on a different define for the word.

 

So now inside of the ENGLISH FOLDER you have a bunch of pages that are named the same as the ones in your main catalog, HOWEVER these pages do not carry the functionality or look. They just tell the site to display certain words in that particular language, much like the english.php file. This just organizes it more so you dont have a TON of defines in your english.php. If you open them, they will look A LOT like the english.php file. So see, the second index file is not all that complicated. It just says that if you are on the index page, in the english language, to display certain words in ENGLISH.

 

You also have an ENGLISH images folder where you will put all of your buttons because obviously, Add To Cart is not the same in all languages. You NEED to have these because if you are in the german language, you don't want the CONTINUE button to show, you want the german counterpart to show instead. This is NOT the image folder where any other website images should be stored unless you only want them to show up if they are in a certain language.

 

So thats it for the layout of the site.

 

now i didnt REALLY explain the ADMIN section. Theres a reason for this. It is exactly the same but different. WHAT?? Well, the file structure is the same, but instead of creating the look and functionality of your website, it creates the look and functionality of the admin part of your site. These files will not change the look of your website AT ALL, but it will change your administration. SO if you add a contribution that creates a new section in your admin, you will NEED to access those files, otherwise you will not.

 

 

 

So i hope this helped someone. ANYONE who reads this, please feel free to correct me or clarify if some things sound confusing to you to dont make any sense. I am in NO WAY a php expert, i'm not even advanced.. I'm HARDLY a beginner.. I learned all of this by just jumping in and reading books and some common sense. It took a while and when i first got here, i was SOO confused and SOOO scared to touch anything. The BEST thing i could have done, though, was installing my own contributions. I was scared to do it at first, but if you start with some simple install ones, you will learn the feel of oscommerce better than if you had someone like me telling you.

 

So get in there, do some searching and messing around. buy some oscommerce books (there are two i LOVE, one by Monika Mathis and the other by David Mercer) that have helped me a TON. Just remember to BACK UP YOUR FILES EVERY TIME YOU MAKE A CHANGE!

Share this post


Link to post
Share on other sites

THANK YOU!!!!!!!!! You posted this on my birthday two years ago. I never thought I'd be creating an e-commerce website because I am a digital immigrant and know next to NOTHING about php, and all of those other letters. I have a Ph.D. but not in any of this! THank you almost two years later!


thebrainychandler

Share this post


Link to post
Share on other sites

Thank you very much for the newbie post, it was very interesting and easy to follow. Thank you also to Geoffrey for adding this to his profile information.

Share this post


Link to post
Share on other sites

OK, I'm totally new to all of this, so be gentle -- I have searched for info on how to do this, and have found some of what I need..

I'm trying to enter more than 12 characters for my Product Model and anything I type in just drops during the save.

I know I need to change an input in the database, But I have NO CLUE where to find the database location

Please, any help would be appreciated, as I'm at a stand still on entering my products. Thank you.

Share this post


Link to post
Share on other sites

To find your database, sign in to your cPanel supplied by your host then once you have your cPanel open scroll down until you find databases and click on phpMyAdmin - this opens all your databases you need to access your osC database (click on name or select name) you'll find all your database tables listed on the left hand side click on the one you want


Currently...:

 

Working with osCommerce 2.3.1

Now working with Phoenix

Add-Ons so far Installed:

Not all of these installed yet on Phoenix - some are and the rest will be

 

Add date and order number to invoice and packing slip,

Products Cycle Slideshow,

Detailed Monthly Sales,

Holiday Settings,

Tracking Module for 2.3

Share this post


Link to post
Share on other sites

Confused! I get the difference between the site (what customers see), admin (where i can add products make changes), but because of my limited IT knowledge, what about the other bit, the back end with all the web 'language'.

 

only recently did i learn <br><p><p/> and <li>! to use with my product descriptions (bit proud of myself actually).

 

My question is how to access things i see on the site in the admin. for example the button that says 'read more' I want to put information that customers can read! but i dont know where to access it.

 

Yes i am afraid to break it or delete something thats going to cost me money to fix.

 

I found your post thru a google search beacuse i didnt know how to search the topic on the forum.

 

Cheers

Share this post


Link to post
Share on other sites

I started to re write this in an attempt to make sense of it. What confuses me is all the newbies who say they understand it. Maybe they're not the newbies they think they are...

 

Notice what happens along the way....

 

From

"Oscommerce Road Map for the newbies"

 

After OSCommerce is installed, think of it as having two separate websites (almost).

1. The customer end, is - the site (or side) everyone sees.

Files making up this end are USUALLY found in the Catalog directory.

 

2. The other end of your website is the administration end.

You end up at the Administration end when you access the web address: www.mysite.com/catalog/admin.

Aside from all the website code, this side is where the majority of your site configuration and administrations happens.

 

Both the ends of your site have similar files.

a header,

a footer,

an index,

a left colum, etc.

 

Even though the files names are the same, the files are entirely differnt. This can be one of the MOST confusing things to understand.

 

WHY TWO headers?

You need one header for the shopping cart and one header for the admin section.

 

The header for the shopping cart shows your shop banner and whatever else is there.

You ALSO need an admin header to show the oscommerce banner and the header navigation.

 

Again, these headers are totally different, altough located in the same place in the page.

 

There's also other duplicate pages with the same file name, but let's come back to that later.

 

WHY are there duplicate pages for header, footer, right column, left column?

Why aren't these files included just once in the index page like they are in a typical HTML site?

 

Well, there's not really a simple answer to this, and I couldnt tell you EVERYTHING about how it is set up,

There's no simple answer and I can't explain this set up completely.

However, the index page is what customers see first when your site URL is input.

The index page contains code for all these files.

The index page calls them all together from the database at the same time.

 

HEADER.PHP

LEFT_COLUMN.PHP

RIGHT_COLUMN.PHP

FOOTER.PHP.

 

All these files together make up the LOOK of the index page. They are found in the INCLUDES folder.

 

(Question: Is what's found in the INCLUDES folder include both sets of duplicate files or just one?)

(Question: Above it says: "Files making up this end are USUALLY found in the Catalog directory.")

 

So what is in the INCLUDES folder?

 

To remember which file they are in, remember they are INCLUDED in the index that makes up the main page

-- and --

they are also INCLUDED in every page of the site.

 

The header, footer, right and left column are ALWAYS shown on your site no matter which section of the site your are on.. much like a template.

 

("template?" Why is template being mentioned here? No discussion of templates has happened happened yet. Why confuse the reader by referring to it?)

 

The other files in the INCLUDES section of your catalog are:

application_top.php,

application_bottom.php,

configure.php,

filenames.php.

 

(just said above the files are in the INCLUDES directory - now they are in the CATALOG directory????)

 

The application top and bottom (??? huh? what are these? No explanation was a "top" or a "bottom" is) have the code in them that calls on certain functions of the top and bottom of your page.

 

(example how the expert is unable to describe this in concrete terms. Notice the abstraction - the top and bottom "calls on certain functions". What is this saying? )

 

The application top is the page that has the code that checks for the SSL and other securities (if in place) and calls on the correct database file, set cookie use, check IP address, ec.

 

(oh perfect. This sentence is a gem. "that has code that checks for the SSL and other securities... blah, blah, blah... writer is talking to herself. Does she care if anyone understands this? Did anyone proof it for comprehension?)

 

It basically does most of the "behind the scenes" functions that your website performs every time someone visits. Same with the application_bottom.php file.

 

(Gee so glad to know. Let's see so far what have we learned? Gibberish.)

 

And the abuse continues. Perfect example:

 

"Then you have the LANGUAGES FOLDER, which can be INSANELY confusing because.. wait, you now have ANOTHER index.php page??

Its not as confusing as you think though.

Before you get to the other index.php file, you will see you have three language folders, and three language FILES.

Since I speak english,"

 

Not the English I speak.

 

Followed by

"That is a VERY easy thing to explain."

 

What happened to insanely confusing?

 

That's one heck of a ride through serious techno babble. And this is for newbies?

Share this post


Link to post
Share on other sites

@@Learningviavideo

 

That's one heck of a ride through serious techno babble. And this is for newbies?

 

 

Actually, it makes perfect sense if you can see the files on your server and have 'basic' knowledge on how to edit them to suit your needs. However, I must point out that this Roadmap was written for v2.2 RC2a and not the current version 2.3.1.

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

×