Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

File Paths and Structure


trishaw

Recommended Posts

Posted

I currently have osCommerce installed in the root directory so my test site folders look like

Testsite

->admin

->images

->includes

etc.

 

My question is, I would like to create several new pages that I want to keep in one folder. I am creating a page with each of our branch locations contact information and want a folder called branchlocations and in it I want to put files like california.php, florida.php, nj.php etc.

 

I still want the top, left, right, and bottom included files to remain the same for each page. However, when I try to call these includes from california.php, I am getting a blank page.

 

I know I am probably missing something simple with a path definition or file name but I can't figure out what I'm doing wrong. Can anyone point me in the right direction? Is there any type of template available for new pages that won't be located in the root directory?

 

Thanks!

Posted

This might work.

 

If your directory structure is:

 

Testsite

->admin

->images

->includes

->branches

etc.

And you put your california.php in the branches folder, at the top of you california.php change this line:

 

  require('includes/application_top.php');

To

 

  chdir ('../'); // pop up one level for all the includes

 require('includes/application_top.php');

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 >

Posted

Thanks for your reply - that is what I thought I needed to do but it doesn't seem to work. I even changed the ones that are require(DIR_WS_INCLUDES . 'filename.php') to the correct directory but I'm still getting a blank page. I'm guessing there is something in those included files causing it to die. For example, when I call the application_top.php file, it requires the 'includes/configure.php' file. I think I would need to go up a directory in this file too so that the application_top.php file requires ../includes/configure.php instead of includes/configure.php. But then the rest of the site won't work.

 

Any other suggestions are greatly appreciated!

Archived

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

×
×
  • Create New...