Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

rename default.php


Guest

Recommended Posts

I think the main catalog page, now called default.php should be renamed to index.php. Today, if someone tries the URL

 

http://mystore.com/

 

He will not be taken by default to the default.php page. If this page was called index.php, then some that tried the URL

 

http://mystore.com/

 

would automatically be taken to

 

http://mystore.com/index.php

 

since the current default settings of apache include index.php as a default start page.

Link to comment
Share on other sites

Using an .htaccess file in your root can fix this issue among others on naming conventions in addition to helping with missing files.

 

Check first thru your Cpanel if you have one, if there is already an .htaccess in your root directory, some FTP programs may not show this.

 

Then, either add to it or create one:

 

DiRectoryindex index.shtml index.html index.htm default.php index.php /missing.html

AddHandler server-parsed .shtml

AddHandler server-parsed .html

AddHandler server-parsed .htm

 

Add to your root a missing.html file that has a link or links to get the user back to your site should they hit a missing page.

 

Now, your address will know to look for what file in the order that the DiRectoryindex line is written in.

Link to comment
Share on other sites

If I had an index.php setup on my site and loaded this into the root, I sure would be sad to have my original index.php wiped out ... :shock:

Link to comment
Share on other sites

Oh please! That is the silliest excuse I've seen yet for this. The core team has done nothing but make silly excuses in regards to this issue without once giving a valid reason for not just changing it and being done with it. It would sure clear up a lot of questions from newbies trying to set it up. Honestly, how many times have newbs asked how to make it work over the last year? 100? 500? more? :shock:

 

Anyone from the core team care to come up with a good reason for this?

Link to comment
Share on other sites

Anyone from the core team care to come up with a good reason for this?
I don't get this or the inability to remove the "this isn't a real store" message from the admin, which seems like it would be more valuable than many things that are in the admin. These two simple changes would open osCommerce to the world of non-php editing people.

 

I know these are both trivial edits, etc, etc and I know how to do them, but that's not the point.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Those two changes alone would eliminate TONS of newbie questions from the forums. The default.php change has been suggested for two years now though so I don't expect it to change any time soon. :shock:

Link to comment
Share on other sites

Oh please! That is the silliest excuse I've seen yet for this. The core team has done nothing but make silly excuses in regards to this issue without once giving a valid reason for not just changing it and being done with it. It would sure clear up a lot of questions from newbies trying to set it up. Honestly, how many times have newbs asked how to make it work over the last year? 100? 500? more? :shock:

 

Anyone from the core team care to come up with a good reason for this?

 

That is my *personal* opinion of why *I* would not name a file index.php because to *me* it is pretty lame to wipe out someone's existing index.php because *I* am incapible of thinking ahead to the possibility that someone actually runs other software than osCommerce.

Link to comment
Share on other sites

Well, that is still not an answer on my question :D

 

Why did they choose default.php instead of index.php?

No reason, fine, but just tell me so i know 8)

It's easier to remember, then to forget

Link to comment
Share on other sites

I personally don't see a problem here...

 

The osc comes with default.php and it doesn't work on my server.

 

I renamed the default.php to index.php where necessary and it took a few minutes...

 

The reason given by Linda, it is correct. If one has more script running in the same directory that must start before the catalog it is better leave the catalog default.php otherwise as I said, 5 minutes to change it..

 

If I am not mistaken things to change.

 

default.php to index.php (main directory, languages, application_top.php)

That all.

Link to comment
Share on other sites

Anyone from the core team care to come up with a good reason for this?

 

Not really, but any host should be able to amend his httpd.conf file to suit. If a host refuses, then you (as the customer) now know that he won't do 30 seconds work for you...nice host.

 

Most developers would prefer to have default.php, why ?

 

- I can create a site on a live URL (with index.php saying "coming soon")

- Once the shop is ready to go live, I can just remove the index.php

 

Makes life easier for me...

Link to comment
Share on other sites

Most developers would prefer to have default.php
I believe that, I just wish osCommerce was tailored more for its customers (shop owners) instead of for its developers. I would rather let developers deal with changing index.php to default.php than have newbies trying to figure out how to change default.php to index.php.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Well said Paul. Obviously the developers are too short-sighted to understand this concept though. :shock:

 

The point has never been how easy it is to change it yourself. The point has always been how difficult it is for a newbie to understand why their shiny new shop isn't working. The overwriting the existing index.php excuse just made me laugh though. That is about as absurd an excuse as I can imagine. :wink:

Link to comment
Share on other sites

Obviously the developers are too short-sighted to understand this concept though. :shock:

 

But, the point remains unanswered, that any host with even a basic understanding of their own server(s) would be able to get a default.php page up and running with about 30 seconds work...

 

or if the host is not able or willing...

 

I believe anyone (even the greenest newbie) should be able to change 1 setting in application_top.php and rename 2 files. Shouldn't they ?

Link to comment
Share on other sites

I don't necessarily disagree with you Burt. Of course I've also been working with OSC since the TEP days. :wink:

 

The point remains that someone that has no idea about PHP/mySQL/etc. shouldn't have this one extra possible complication in the way of opening their shop. Why not put the burden on the experienced rather than the newbs?

Link to comment
Share on other sites

I don't necessarily disagree with you Burt.

 

OMG :shock: :lol:

 

The point remains that someone that has no idea about PHP/mySQL/etc. shouldn't have this one extra possible complication in the way of opening their shop. Why not put the burden on the experienced rather than the newbs?

 

It's a good way for a newbie to learn though, in at teh deep end and all that... And it keeps us all busy answering questions, what would I do with my time otherwise :wink:

 

But seriously, I'm thinking that Oscommerce is too easy to set up and get running. Theres very little about Osc that the newbie needs to get their hands dirty, I believe if it was a little more intricate, perhaps harder to set up initially there would be less questions as people wanting to use it would (hopefully) take time to read up and do their homework. It's just too easy I think to FTP it up, set a few permissions and hit /install/

 

What do you think ?

Link to comment
Share on other sites

You want to make it harder to install? :shock:

 

Nobody would be able to keep up with the forums at all then (it's already hard enough). :roll:

 

It's hard sometimes to put ourselves in a newbs shoes. Most of them just want a real, live, working shop without having to learn much of anything. I can understand and respect that. Lots of them have real businesses to run in addition to trying to set this up and it just takes too much time to learn.

 

This is why the *nukes. are so successful. Everything is literally plug-and-play. Want a new feature? Just drop this module in your modules directory and initialise it from your admin panel and you're ready to go. No PHP knowledge required.

 

IMHO the only thing a newb should have to know is:

 

1) their path information

2) their database information

 

That's it. Everything else should be done via the admin (including templates, modules, text, everything).

 

If the nukes can do it I know OSC can. The developers just aren't committed to making it easy IMHO.

Link to comment
Share on other sites

Harder was the wrong word. Perhaps some homework before installation maybe ?

 

Understand your point about people running businesses - a lot of my normal "day job" is spent Admin'ing a variety of Osc stores (I'm upto about 40 now, ranging from high value low quantity like cars, to low value high quality stuff like Videos and CDs - and loads of stuff in between) - to take the onus off of the business owner (who rightly should be looking after what they do best - running their business)...

 

However, I'm a firm believer in taking a little time to know your store so that when somethign does break, the person can have a go at finding the error themselves.

 

The most annoying thing (for me personally) is those people who install Osc via the Host control panel, and then come here for support - surely this should be down to the host to sort out ? Whats your thoughts on that ?

 

Interesting conversation BTW. :)

Link to comment
Share on other sites

Well, In a perfect world (as in no bugs) nothing would break and there wouldn't be anything to fix. Ummmm, of course we do live in the real world and I realize there will always be problems that crop up from time to time (although a stable release should be just that IMHO although 2.1 and MS! both proved that theory wrong).

 

The host issue is a tough call. I can understand a host wanting to include as much "stuff" as they can in the CP just to complete with all the others out there. I can also understand the fact that it would be tough for them to be an expert on every script that they provided. If OSC had proper documentation that could be included in the users control panel (everything from setup to using the admin) then this would be a non-issue. Seems there's more interest in documenting the addition of bells and whistles rather than the everyday boring administration of an OSC site though. Just look at wiki. Is there a tutorial on adding a product? Nope. How about adding attributes? Nope. What seems trivial to most of us should still be documented IMHO.

 

Example: Have you looked at a book on HTML lately. Knowing what we know, try reading the first 10 chapters. It would be so trivial it would make you want to scream but to a total newb would be excellent information that they'd need to know before they could get into more advanced stuff. Why is OSC any different? We take for granted that anyone should be able to stumble through the admin and figure out what everything does.

Link to comment
Share on other sites

But seriously, I'm thinking that Oscommerce is too easy to set up and get running.
There's no such thing!
Harder was the wrong word. Perhaps some homework before installation maybe ?
I guess I just don't get it. osCommerce has a chance to do something that's extremely easy and might increase their market share (at least a little) and would reduce the customer support load. I would think any software company would jump at an opportunity like that. I like osCommerce, but I continue to be mentally blocked about the purpose of open source software. I can get past the financial and intellectual property part of it (barely), but if market share and ease of maintenance aren't goals either, what's left?

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

Why would Osc want to increase its market share ?

 

How many Osc shops do you see where people simply have the default grey/blue theme with a new logo ? Loads I see. The reason for this is one of;

 

1) Too lazy to learn how to make changes

2) Too busy to learn how to make changes

3) Osc is so easy to set up and good looking that it's highly functional already out of the box.

 

By making it "harder" to set up, people have to learn more about the scripts - meaning better shops all round, more people scripting and contributing and more people knowing how to do things when their shop goes wrong. Which further means less time spent on supporting people here and by PM/Email. Winners all round.

Link to comment
Share on other sites

Why would Osc want to increase its market share ?
I don't know since I can't figure out what osCommerce's goals are.

 

It seems to be a very nice environment for self-motivated, self-taught people.

In olden times the men were made of iron and the ships were made of wood; now it's the other way around. :wink:

Link to comment
Share on other sites

"Build OSC so that users have to learn the internal workings of an application"

 

Yeah, auto manufactorers should build cars that don't start so consumers can learn a bit about auto mechanics.

 

"Use 'default.php' instead of 'index.php' so that users don't destroy other 'index' pages already in use."

 

What if 'default' is already in use as well? Wouldn't that get destroyed?

Link to comment
Share on other sites

well the store is commonly in the /catalog/ directory so it should be index.php. it has nothing to do with the public_html/index.php by default.

i mean tell me if I'm wrong, but thats in the install.

Link to comment
Share on other sites

Maybe this is just too simple, but couldn't you just make an index page (if your web server doesn't see default.php as an index) and on that index page just do an include with nothing else?

<?PHP include('default.php');?>

It's a lazy way to do it, but it would work in a pinch.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...