Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Creating my homepage


kitchenlittle

Recommended Posts

Hi All,

I am trying to create my main web page and I would like to include some of the php files from oscommerce so that the homepage resembles the rest of my store. Here is the code I used to include the php but it does not work. I am very new to php so I am not sure if this is even the correct method.

 

<?php require('mystore/nfoscomm/catalog/includes/column_left.php'); ?>

 

or do I need to somehow define DIR_WS_INCLUDES and keep the original code:

 

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

 

If so how do I define DIR_WS_INCLUDES?

 

Thank you for your help.

 

Steve

Link to comment
Share on other sites

When I try the first way it loads the php file but then I get fatal errors on all of the php files that the column_left file calls:

 

Warning: Failed opening 'DIR_WS_BOXEScategories.php' for inclusion (include_path='.:/usr/local/nf/lib/php') in /mnt/web_i/d18/s05/b01f14b2/www/mystore/nfoscomm/catalog/includes/column_left.php on line 16

 

Warning: Failed opening 'DIR_WS_BOXESmanufacturers.php' for inclusion (include_path='.:/usr/local/nf/lib/php') in /mnt/web_i/d18/s05/b01f14b2/www/mystore/nfoscomm/catalog/includes/column_left.php on line 22

 

Fatal error: Failed opening required 'DIR_WS_BOXESwhats_new.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/web_i/d18/s05/b01f14b2/www/mystore/nfoscomm/catalog/includes/column_left.php on line 25

 

It looks like I would have to recreate the entire set of files in the homepage folder. If I leave it the second way I get this fatal error:

 

Fatal error: Failed opening required 'DIR_WS_INCLUDEScolumn_left.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/web_i/d18/s05/b01f14b2/www/devindex.php on line 38

 

I was thinking that once I got into the directory with the column_left php all other files being called would work but it does not appear that way.

 

Please let me know if you have any ideas.

 

Thanks,

Steve

Link to comment
Share on other sites

I don't think your can insert php bits into an html page. (I could be wrong here)

 

 

I did it the other way round.....I migrated my original site into the store files.

Link to comment
Share on other sites

You didn't define DIR_WS_BOXES .

 

So try defining that with a statement like the configure files do.

 

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

 

could be:

 

define('DIR_WS_BOXES', 'catalog/incudes/boxes/');

 

Or make it real simple and do this :D

 

require('/catalog/includes/configure.php');

 

And your paths will be defined for you just like in the main store.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...