Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Oscommerce Road Map for the newbies


lindsayanng

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

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!!

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
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

Link to comment
Share on other sites

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!!

Link to comment
Share on other sites

I also appreciate this post; it helped me better grasp what's going on under the hood. I will have to get one of those osCommerce books you mentioned.

 

Is there a post on tips for installing contributions?

 

I don't mean the actual install instructions that are "usually" provided with a contribution but guidance for a Noob on what to watch out for, which contribs won't effect others, what ones to avoid, etc? I know the documentation sometimes covers this but in my fumbling around I installed a contrib that altered files in another one I installed previously. I didn't see anything in the documentation that said this would occur. Maybe if I wasn't a Noob I would have known this but....I didn't.

 

Thank goodness for backups eh???

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
Share on other sites

well, heres the thing.. Understand the file structure for oscommerce is NOT common sense and theres nothing about it that would make you figure it out without LOTS of playing around or reading this.

 

 

HOWEVER< when you are installing a contribution, think about it with your common sense...

 

You already installed your first contribution. Say with was something for product attributes.. So you KNOW that you definitely changed the code in the product_attributes.php page, categories.php and maybe even product_info.php among others. now again, just assuming..

 

So then say that you want to add a "remove buy now button" contribution. Now oyu KNOW that the particular contribution will edit the product_info pages.. The instructions tell you to install the files OR do it manually.. So NOW is where the thinking comes in.

 

If you dont really entirely know that you changed the product_info.php page, you can go back and look at the contributions you already installed and check and see if that is in the instructions. Almost ALL contributions have a list at the begining of new files and changed files..

 

So now, your NEW contribution also changes the product_info.php page.. So what are you going to do??? Are you going to just replace the file and upload it to your site because you dont want to do a manual install?? Well, you shouldnt. You shuld think about it with some sense and realize that you already made atleast one change to that file, and there would be no way possible that ALL contributions that you install will assume that everyone already has your code in there.. Instad, you have to merge the two files or insert the code manually.

 

Its really common sense. USUALLY i dont say too much about oscommerce is common sense, but this really is. You changed the file, then you are going to replace that file forma contribution that could not POSSIBLE have the changes you made inside of the new file??

 

The tip here is, keep a list of ALL of the contributions you installed. I usually save the zip files for each in a "usercontributions" folder on my site.. i have another "wantedcontributions" folder.. but the thing is, once youve installed your first contribution, chances are you will NEVER be able to REPLACE files again.. or atleast not the ENTIRE package..

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!!

Link to comment
Share on other sites

Your coaching fired a couple dormant neurons here. It just occurred to me that I could use my winmerge utility to compare a current php current file with the php file to be installed for a particular contribution. That way I could glean out what each file has/doesn't have and make some logical choices. I may not know exactly how the code works but probably could figure it out with some pondering. That makes sense I think. This is interesting stuff. I don't what's more fun, working on a site or selling stuff from the site. Thanks much.

I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can.

I remember what it was like when I first started with osC. It can be overwhelming.

However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc.

There are several good pros here on osCommerce. Look around, you'll figure out who they are.

Link to comment
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.

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!!

Link to comment
Share on other sites

I just found another great book for teaching yourself how to really get in there and change the look of oscommerce. I always prefer books because i find stuff on the net, do it once and then when i need to go back and do it again its another 1/2 hour search to find that same thread or website.. I have a few books, some by monika mathe and david mercer.. They have been a great help, but when you are talking about changing the look, i have found that this book is the best - and its created by someone who is well known in the osc industry.

Changing the Look of OSC book

 

A lot of people have actually asked me to refer a book to them, which is why i am posting this publically along with responding to those who email me.. Basically, if you are here looking at this thread learning about osc for the first time, you can REALLY use this book..

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!!

Link to comment
Share on other sites

  • 3 weeks later...

I just wanted to request that people who need help with oscommerce stuff PLEASE don't PM me.. I havent had a lot of chances to get on here and respond, HOWEVER i have been spending a lot of time on blog, where you can ask questions and get answers.. See my profile for a link to my blog.. I dont THINK i am allowed to actually post it here.. But visit my profile and click VISIT SITE and send me an email through that site and I will do my best to answer your questions

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!!

Link to comment
Share on other sites

I just wanted to request that people who need help with oscommerce stuff PLEASE don't PM me.. I havent had a lot of chances to get on here and respond, HOWEVER i have been spending a lot of time on blog, where you can ask questions and get answers.. See my profile for a link to my blog.. I dont THINK i am allowed to actually post it here.. But visit my profile and click VISIT SITE and send me an email through that site and I will do my best to answer your questions

If people are rude enough to PM you, just block them so they can't.

Link to comment
Share on other sites

yea, but that doesnt stop them from first flooding me.. THats why i ask.. I can only take so many questions and help with so many problem.. hence the creation of my blog. its easier to filter because there are solutions on there already... I'm just hoping people get it. I'm not mean or rude.. just really busy

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!!

Link to comment
Share on other sites

yea, but that doesnt stop them from first flooding me.. THats why i ask.. I can only take so many questions and help with so many problem.. hence the creation of my blog. its easier to filter because there are solutions on there already... I'm just hoping people get it. I'm not mean or rude.. just really busy

If they flood you, then they are spamming, so report them to a moderator.

 

We are all busy and should not tolerate attempts to enslave us.

Link to comment
Share on other sites

Hi Lindsay,

 

Many months ago (I'm sure you don't remember), but you advised me to install an Apache server, and not just rely on working on my oscomm. site that is maintained on my commercial server.... I agreed, because I like to work the bugs out of something before going live with it.,...

 

But I was so overwhelmed with everything, I just gave up for awhile. I had bought a book (Oscommerce: Professional Edition by Mercer) but just didn't want to mess with this thing... I purchased a template based cookie cutter e-commerce site, and started working on that..... well, I didn't like that, plus, I like the idea of having a copy of the site on my home machine; so I got that thing canceled a refunded (GoDaddy's cool about all that), and returned to the original plan: learn oscommerce: make a cool site.

 

Long story short: I installed everything using xammp, as the installation of php, mysql and apache described in the book does not work. So, starting today, I'm actually going to work on an oscommerce site..... I think.....

Link to comment
Share on other sites

Than k you so very much for this!

i just started with php and was completely lost.

I was about to walk away from the entire project when i came across this post....now it all starting to make some sense .

thank you so much.

I give you my newb salute.

oh....

that kinda sounded dirty didnt it?

Link to comment
Share on other sites

hey jdpg, i rememebr that convertsation about XAMPP and listen.. If you need help installing XAMPP, let me know.. I am thinking I am going to write a tutorial on it. its is actually a LOT LOT LOT easier than those websites make it out to be!! TRUST ME!

 

Let me know if you need help. I offer support to osc forums members.. Just email me through my website (there s a link in my portfolio)

 

Leviathan.. I'm glad that I was able to help!! Theres a lot more of information out there too!! The oscommerce knowledge base is a GREAT thing!

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!!

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...

Lindsay, I wanted to say thank you for your hard work. I have read your post and it really helped me to understand. I was really struggling and now it makes since. I have a long way to go, but you helped to decifer some of the code.

Thanks a bunch.

 

Dawn

Link to comment
Share on other sites

Thank you so much Lindsay!! In the first few lines I'd learned something that has made a huge difference!! This little newbie will be reading the whole thing (but then I do have a sadistic streak for figuring things out myself ha ha)

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

I just came across this great post. This really helps the beginners.

 

If you need help installing XAMPP, let me know.. I am thinking I am going to write a tutorial on it.....

 

Actually the following website has complete video tutorials for installing osCommerce on XAMPP:

 

From our forum rules:

Commercial postings and linking to external sites providing osCommerce related products and services are not allowed on the osCommerce Community Support Forums.

 

Best regards

Link to comment
Share on other sites

  • 2 weeks later...

A very well-structured explanation for beginners. It should be on the main page along with other similar explanations - visible to everyone that is visiting for the first time!!

I've now been working with the customization of my shop for a week - it would have been a great help had I found your roadmap on my first visit.

 

If you have the time, I suggest you make other explanatory texts on other subjects of general interest in osC - it would be a great help to many. Of course, many of the necessary explanations can be found around the site, but as a beginner it is VERY difficult to separate the essential from the more specific information.

 

Waiting to read more from your pen!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...