Jump to content



Latest News: (loading..)

* * * * * 5 votes

Oscommerce Road Map for the newbies


This topic has been archived. This means that you cannot reply to this topic.
117 replies to this topic

#61   donnirai

donnirai
  • Members
  • 40 posts

Posted 21 September 2008 - 03:36 AM

Great thank you.  And yes I'm going to try the local server thing. Or I'll wait couple of days and keep learning. This is like mastering a new video game or something. It's a look of fun, a lot to learn.

Thank you once again Lindsay!
Hope to see more post from you!

Donni Rai

#62   alex121

alex121
  • Members
  • 43 posts

Posted 21 September 2008 - 09:08 PM

This is a great thread!
Have been using osc for some time now and slowly changing things adding contributions etc, which all work fine.

I have been looking through various posts that come up in the searches and this is the closest one i can find, so i hope i am posting in
right thread

Now i have done a fresh install with the latest version, so i can create a whole new look, which is going well so far,
my main question is where do i find the file that sets the template for the catagories as it is the only part at the moment that
is spoiling the whole look.

Any help or hints are appreciated

TIA

#63   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 22 September 2008 - 01:55 AM

the categories box is defined in the
catalog/includes/boxes/categories.php

there are contributions that make it VERY VERY easy to change the look of that box.. theres a very nice css dynamic menu
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!!

#64   alex121

alex121
  • Members
  • 43 posts

Posted 22 September 2008 - 05:43 PM

Thanks for your reply, was not quite what i meant, but you made me think along a different line and have now
found where i was going wrong.

I needed to set out the index page slightly differently so it all works now!

Thanks again

#65   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 23 September 2008 - 02:36 AM

ohh.. you wanted to know how to change the way the cateogory headers to shown??
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!!

#66   nextgen

nextgen
  • Members
  • 18 posts

Posted 27 September 2008 - 07:04 PM

Lindsay that helped me ALOT !! thanks so much for the map, Made it so much easier knowing which files did what and now i have a grasp on what everything does and i can easily try and manipulate the site to what i want. Thanks so much.

#67   jdog

jdog
  • Members
  • 52 posts

Posted 06 October 2008 - 10:59 PM

Thanks so much for this information! This will get me started (of course, I will read it at least 10 more times)

As I'm still totally brand new to this, I'm hardly in a position to suggest any improvements, etc.

The explanation for why there is two headers, two of this, two of that, because of the ADMIN page structure probably spared me a lot of confusion.... thanks again

#68   sunshine4lb

sunshine4lb
  • Members
  • 18 posts

Posted 07 October 2008 - 06:08 PM

Good tutorial and well put!
I know for sure it help me a lot! B)

#69   winkphoto

winkphoto
  • Members
  • 17 posts

Posted 09 October 2008 - 08:44 PM

This is a great thread.

Here is a question related to it and I am sure I am not the only one who would like to see it.

I'd like to find a list of elements that can be "included" or "defined" as to show up in a PHP page or pages that are NOT attached or under the OSC install.

Example - I build a website that is all PHP, and on the pages I want to 'call' the mainpage.php code... or 'call' the featured products.

so I might have www.mydomainname.com/somepage.php  and in that code, I can pull the mainpage.php module from the install that exists at www.mydomainname.com/store

This way, I can build my own front end that is search engine friendly with modules included in that front end, but they can lead back to the store, etc.

#70   WEB DUDE

WEB DUDE
  • Members
  • 4 posts

Posted 12 October 2008 - 01:36 PM

IM STILL CONFUSED :blush:

#71   Coopco

Coopco
  • Members
  • 9,557 posts

Posted 12 October 2008 - 01:38 PM

View PostWEB DUDE, on Oct 12 2008, 11:36 PM, said:

IM STILL CONFUSED :blush:
I have exactly the same problem.
Where are you at, where would you like to be?


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#72   Coopco

Coopco
  • Members
  • 9,557 posts

Posted 12 October 2008 - 01:40 PM

View Postwinkphoto, on Oct 10 2008, 06:44 AM, said:

This is a great thread.

Here is a question related to it and I am sure I am not the only one who would like to see it.

I'd like to find a list of elements that can be "included" or "defined" as to show up in a PHP page or pages that are NOT attached or under the OSC install.

Example - I build a website that is all PHP, and on the pages I want to 'call' the mainpage.php code... or 'call' the featured products.

so I might have www.mydomainname.com/somepage.php  and in that code, I can pull the mainpage.php module from the install that exists at www.mydomainname.com/store

This way, I can build my own front end that is search engine friendly with modules included in that front end, but they can lead back to the store, etc.
Just install osc and add the contribution Ultimate SEO URLS v21d_UPDATED by fwr. Install osc into the root of your domain.


The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#73   WEB DUDE

WEB DUDE
  • Members
  • 4 posts

Posted 12 October 2008 - 01:44 PM

IM STILL TRYING TO EDIT THE FRONT PAGE

#74   Coopco

Coopco
  • Members
  • 9,557 posts

Posted 12 October 2008 - 01:50 PM

View PostWEB DUDE, on Oct 12 2008, 11:44 PM, said:

IM STILL TRYING TO EDIT THE FRONT PAGE
This is a very serious operation (it can be deadly if you stuff up). You need to have a copy of your website on your pc (at least as a back up). To edit the files, use a text editor (notepad for eg, not word).  Backup everything before making changes.

Check out the first two pinned posts at the start of the installation and configuration forum.

Post back if you have problems.

Edited by Coopco, 12 October 2008 - 01:50 PM.



The Coopco Underwear Shop



If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

#75   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 12 October 2008 - 04:44 PM

try printing out the roadmap and having it next to you as you click around through your file structure on your FTP or your host's file manager.. as you see things and read them, they will click..You can make notes and stuff on the paper.. that will help you rather than just reading. It is best to have them side by side
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!!

#76   hlee

hlee
  • Members
  • 16 posts

Posted 10 December 2008 - 10:39 AM

Hi Lindsay,

Can you help me for this problem?

I just changed osCommerce logo to my logo. It's done without problem, the image appear at the top left corner.
Now I want to add other image on the header next to the shop logo with the position on the center of the header, but I don't have idea how to add extra image centered on the header. I did try but it was appear on the right side not on the center.

Thanks for your time.

Regards,
Hlee

#77   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 15 December 2008 - 12:39 AM

You just need to make sure that your tables and HTML makes sense so that it is centered
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!!

#78   puphdadi

puphdadi
  • Members
  • 1 posts

Posted 02 January 2009 - 09:50 PM

great post.

very helpful.

#79   taytay46

taytay46
  • Members
  • 16 posts

Posted 24 January 2009 - 05:23 PM

View Postlindsayanng, on Jul 2 2008, 02:13 PM, said:

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!


I just wanted to drop you a line to say THANK YOU THANK YOU LINDSAY!!! For posting this thread for us newbies. So many of these forum folk are just plan rude when it comes to helping us 1st timers. Yet not you, thank God.

Chris

#80   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 24 January 2009 - 06:27 PM

haha thanks chris, but i too have been called rude by some newbies as well.. It depends on what newbies are expecting out of this forum i guess.. If you come here with a shopping list of issues, you arent going to get much help.. or come here EXPECTING instant, top notch free help, you also will not..
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!!