Jump to content



Photo
* * * * * 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

#41   germ

germ
  • Members
  • 13,921 posts

Posted 31 August 2008 - 17:09

"includes" is a FOLDER, not a file.

And you'd probably find it in the File Manager (which I suggest you DON'T use) not under Catalog.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#42   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 31 August 2008 - 19:17

you should get an FTP program, print out the main part of this thread, and then read it while you look at the files.. what you are looking in is the admin section, which is just a website - its like the customer version of your website but for the employees.. You need to actually go look at the files themselves.. and yes, as germ has said, includes is a folder.

So re-read the above and look at the actual files and folders.
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!!

#43   tigerpaw

tigerpaw
  • Members
  • 11 posts

Posted 01 September 2008 - 04:55

Hey Lindsay thanks for the thread, it is really very informative and helpful. I did have a question though, I would like to change the url (and delete for some) that is assigned to some of the images on various locations. For instance I have a gif file in the header, but when I goto header.php or top.php I don't see a url associated with the image file. Where could I find this at thanks. I have found answers to everything else in your column, thanks.

#44   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 02 September 2008 - 02:11

glad to hear that the thread helped you.

as for changing the url (or location) of your file, you will need to change the directory. I am NOT very good at this, but i will try to explain.. Basically the php way of linking is using the tep_image (DIR_WS_IMAGES logo.gif . STORE_NAME) which says that the logo.gif file is located in the main Images folder, the file name is logo.gif, and the alt. text is the STORE_NAME which is called from the english file.

now an image that is in a different location looks like this:
tep_image_buttons (logo.gif . STORE_NAME) which says that the file is located in the images/buttons folder which are in the languages folders. Now ask me HOW oscomemrce knows its in the languages image folder and not the main images folder, i have NO IDEA other than the fact that there is no folder called buttons in the main images folder.

I wish i had the answer, but i am still learning how to really create all php links using the tep_ref and tep_image. Its all new to me, as i have only been doing php for a few months.
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!!

#45   carie

carie
  • Members
  • 70 posts

Posted 08 September 2008 - 00:15

It took me hours to figure out all the files were under tools. Then i noticed where it is mentioned in the default text on the main page and felt like a fool. Something I have not seen mentioned is how many files of the same name this program has and to be very careful when editing to make sure you are in the correct path.

now a question what is the reset button for in the file manager

#46   germ

germ
  • Members
  • 13,921 posts

Posted 08 September 2008 - 00:20

Oh that...

It launches all the world's nuclear missiles and resets humanity back to the stone age...
/ohmy.gif' class='bbc_emoticon' alt=':o' />

But seriously, you shouldn't use the osc File Mangler Manager.

It's a security risk, and can be unreliable, and is best removed. (IMHO).
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#47   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 08 September 2008 - 15:11

really? i think i might push that big red button (or whatever color it is) Humanity NEEDS a reset at this time.. Really, i just heard a story about how a mom microwaved her baby to death> really, humanity NEEDS that buttoN!
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!!

#48   themysticlink

themysticlink
  • Members
  • 5 posts

Posted 09 September 2008 - 02:49

Thank you so much for the road map! Its so overwhelming at first, and so many places to gather information, its great to have this explained so well!
Can anyone tell me how to add a box for the customer's account creation page so they can add "organization" or "company" to their information?
Lynne

#49   ZeroDegreez

ZeroDegreez
  • Members
  • 38 posts

Posted 09 September 2008 - 12:32

Thanks, that was helpful.

Alis

#50   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 10 September 2008 - 02:23

themysticlink, please start a new thread in the general topics for asking for help. Your post is off topic.
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!!

#51   surya

surya
  • Members
  • 7 posts

Posted 13 September 2008 - 04:45

Say, Lindsay, this is terrific. And, I'll be you will be able to help me; hope so!

Its been awhile since I've done any kind of coding (but I used to be able to modify a perl-scripted commerce site many years ago, so I feel like I can tackle this).

My situation is that I really need to get my shopping cart functional, but the folks I paid to install the site aren't going to be available to help me for several days, so I'm hoping I can just jump right in. I've figured out a lot, but want to just get it finished this weekend.

I sell classes, for the most part, and they don't need a shipping charge added, obviously. But, when I test run the cart, it keeps adding $7 shipping. I don't know where to go to fix this. I've looked into everything in the admin backend, and just can't find it.

Also, there are images at the top of the site (must be in that header file!), and I want the images to link back to the home page of the whole site. (I also want to change the phone number that appears at the top of every page of the store). And I've looked into so many files, but simply cannot find that code.

My store is: http://www.threetrusts.com/store

Any ideas?

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.



#52   geoffreywalton

geoffreywalton

    Available for Hire

  • Community Sponsor
  • 8,206 posts

Posted 13 September 2008 - 06:49

Set the tare wt in admin to 0.

/includes/header.php is my bet for the phone no.

Start another thread if you still have problems as this is off topic.

Edit: See you have

http://forums.oscomm...o...=314770&hl=

Edited by geoffreywalton, 13 September 2008 - 06:50.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#53   DrGNU

DrGNU
  • Members
  • 2 posts

Posted 17 September 2008 - 01:45

Brand spank'n noobile guy here.

THANK YOU!!

This is an awesome road map.

So before I try to use osc I'm totally going to map out what is happening in the code based on this tutorial.

One thing I want to do is to use plain old HTML for the user experience as much as possible.
Also to get rid of the annoying login/registration (except at credit-card entry time which will be via SSL).
The site I'm reworking was hosted and used OSC and when I first looked at the inside of it all of the files
and structure was really ridiculous to me I had no idea what was happening.
I had no clue where to begin to try to recode redirects etc.
OSC is very overwhelming!

So very big thank you for this post!

-scm

#54   SynternetStrategies

SynternetStrategies
  • Members
  • 8 posts

Posted 17 September 2008 - 03:39

14 views and no suggestions or input?


VERY well done. This is especially valuable to me as I just spent the last three weeks making my MIVA shopping cart do what I wanted it to do, and even though it's now reasonably functional (check it out and tell me what you think: www.ecopax.com / mm5 / merchant.mvc?), now I realize that the same amount of time spent on OS Commerce would have produced much better returns.

As you probably know, MIVA is a compiled language so everything you want to do revolves around "black box" modules that you can't edit without becoming one of their partners to the tune of several hundred dollars in order to learn the language. So in the MIVA forums virtually every time you ask for help someone tries to sell you a module LOL. This is my first foray into open source, and I'm liking it. :-)

Douglas Gibbens
Synternet Strategies

Edited by Jan Zonjee, 17 September 2008 - 07:06.


#55   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 17 September 2008 - 05:37

Brand spank'n noobile guy here.

THANK YOU!!

This is an awesome road map.

So before I try to use osc I'm totally going to map out what is happening in the code based on this tutorial.

One thing I want to do is to use plain old HTML for the user experience as much as possible.
Also to get rid of the annoying login/registration (except at credit-card entry time which will be via SSL).
The site I'm reworking was hosted and used OSC and when I first looked at the inside of it all of the files
and structure was really ridiculous to me I had no idea what was happening.
I had no clue where to begin to try to recode redirects etc.
OSC is very overwhelming!

So very big thank you for this post!

-scm


just so you know, do not use TOO much plain html.. You need to se tep_href style links and other php coding to keep the session id there. you NEED that to keep the contents in the customer's cart.

If you want them to be able to purchase without creating an account, there is a contribution called PWA check it out. I am installing that one sometime this week
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!!

#56   arsenal51

arsenal51
  • Members
  • 16 posts

Posted 18 September 2008 - 19:47

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!



Thanks for this. I have been struggling with osC for 4 days and can't seem to find a way to get my Checkout to work, or my login to work. So when I read what you went through, and the note about you wanting to do something else as another contribution, I am real anxious to read that. Maybe it will help me since bioth topics are causing me a lot of problems. Keep up the study...I hope someday to be where you are!

arsenal51

#57   Vger

Vger
  • Members
  • 16,978 posts

Posted 19 September 2008 - 13:52

It's a good post and will help lots of "newbies", but I first looked at it because you called it "osCommerce Roadmap" and the osCommerce Roadmap is something else entirely.

However, people will find this more useful than the actual osCommerce Roadmap!

Vger

#58   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 19 September 2008 - 15:00

yea.. i JUST came across the real roadmap when i was looking through all the info and documentation.. that was more of a company road map with where the software has been and where it's going..

I just called it a roadmap because in my mind, as i was explaining it, it seemed a flow of streets and avenues.
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!!

#59   donnirai

donnirai
  • Members
  • 40 posts

Posted 21 September 2008 - 03:07

Lindsay,

Thank you! I'm new to osComm by a few days and this is the most informative post for me yet!.
You have just saved me hours. I'm saving this post to my favorites in Safari.

Thank you ever so much.

Hey, I need local server like Apache on my labtop to view those PHP page huh?

Thank you
Donni Rai

#60   lindsayanng

lindsayanng
  • Members
  • 4,258 posts

Posted 21 September 2008 - 03:28

you dont need that to VIEW those types of pages.. you can view the code in those pages on any text editor or code editor.. if you want to see the design part and view your changes before you upload it, then yes.. you need a local server.
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!!