Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Basic Template Structure v0.9


salvatore3

Recommended Posts

as soon as i add this code:

 

Add the following code anywhere in catalog/includes/application_top.php:

// include the list of template namesatenames

require(DIR_WS_INCLUDES . 'templatenames.php');

*note: must be added after the following code:

// include server parameters

require('includes/configure.php');

 

 

 

i get this error when trying to access my default.php page:

 

Warning: main(DIR_WS_TEMPLATESTEMPLATENAME_MAINPAGE) [function.main]: failed to create stream: No such file or directory in /home/xxxxxxxx/public_html/cart/catalog/default.php on line 161

 

Fatal error: main() [function.main]: Failed opening required 'DIR_WS_TEMPLATESTEMPLATENAME_MAINPAGE' (include_path='.:/usr/local/lib/php:/usr/lib/php') in /home/xxxxxxxx/public_html/cart/catalog/default.php on line 161

 

 

any help would be greatly appreciated, thank you

SEEN!

Link to comment
Share on other sites

Have you added that file, and why all the wording, that would be just the require line, you need to read how to edit files and what you can do

read more at the bottom links

Link to comment
Share on other sites

can someone help me here, why am i getting this error, i am trying to follow these simple instructions, thanks

 

 

INSTALLATION OF BASIC TEMPLATE STRUCTURE Ver 0.9

Contribution author: Brenden Vickery ([email protected]).

 

If you like this contribution please donate to the osCommerce core team at

http://www.oscommerce.com/about/team.

 

This template structure is based off of a 05/18/2003 snapshot of osCommerce.

 

Please backup all files in the catalog/ directory.

Please backup catalog/includes/configure.php and catalog/includes/application_top.php.

 

Add the following code to catalog/includes/configure.php:

define('DIR_WS_TEMPLATES', 'templates/');

define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/');

*note: must be added after the following code:

define('DIR_WS_INCLUDES', 'includes/');

 

Add the following code anywhere in catalog/includes/application_top.php:

// include the list of template namesatenames

require(DIR_WS_INCLUDES . 'templatenames.php');

*note: must be added after the following code:

// include server parameters

require('includes/configure.php');

SEEN!

Link to comment
Share on other sites

this is what i added to the application_top.php file and i get the error:

 

// include the list of template namesatenames

require(DIR_WS_INCLUDES . 'templatenames.php');

 

 

i did the first similar modification without any problems.

SEEN!

Link to comment
Share on other sites

try keeping the names the same

require('DIR_WS_INCLUDES', 'includes.php');

require('DIR_WS_TEMPLATESNAMES', 'templatesnames.php');

Link to comment
Share on other sites

I'm still hung over, and boy does it show, are you using the quotes' '

('DIR_WS_BLA', you posted without quotes 'and they need to be there'

Link to comment
Share on other sites

now i get this error when going to the mainpage.tpl.php page:

 

Warning: main(DIR_WS_TEMPLATESTEMPLATENAME_WARNINGS) [function.main]: failed to create stream: No such file or directory in /home/xxxxxxxx/public_html/cart/catalog/templates/mainpage.tpl.php on line 11

 

Fatal error: main() [function.main]: Failed opening required 'DIR_WS_TEMPLATESTEMPLATENAME_WARNINGS' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxxxxxxx/public_html/cart/catalog/templates/mainpage.tpl.php on line 11

 

 

i changed it as you suggested to:

 

// include the list of template namesatenames

require('DIR_WS_INCLUDES' . 'templatenames.php');

 

but i still get the error. thank you

SEEN!

Link to comment
Share on other sites

okay, thank you

i am trying to make these simple modifications. granted i dont no jack about php but i do know how to cut and paste. should work unless the directions are useless. thanks

 

INSTALLATION OF BASIC TEMPLATE STRUCTURE Ver 0.9

Contribution author: Brenden Vickery ([email protected]).

 

If you like this contribution please donate to the osCommerce core team at

http://www.oscommerce.com/about/team.

 

This template structure is based off of a 05/18/2003 snapshot of osCommerce.

 

Please backup all files in the catalog/ directory.

Please backup catalog/includes/configure.php and catalog/includes/application_top.php.

 

Add the following code to catalog/includes/configure.php:

define('DIR_WS_TEMPLATES', 'templates/');

define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/');

*note: must be added after the following code:

define('DIR_WS_INCLUDES', 'includes/');

 

Add the following code anywhere in catalog/includes/application_top.php:

// include the list of template namesatenames

require(DIR_WS_INCLUDES . 'templatenames.php');

*note: must be added after the following code:

// include server parameters

require('includes/configure.php');

 

Put the following files into catalog/includes/:

templatenames.php

 

Create the directory catalog/includes/javascript/.

Put the following files(*.js.php) into catalog/includes/javascript/:

address_book_process.js.php

advanced_search.js.php

checkout_payment.js.php

checkout_payment_address.js.php

checkout_shipping.js.php

checkout_shipping_address.js.php

form_check.js.php

general.js

login.js.php

product_info.js.php

product_reviews_info.js.php

product_reviews_write.js.php

 

Put the following files into the catalog/ directory overwriting if nessisary:

account.php

account_edit.php

account_edit_process.php

account_history.php

account_history_info.php

address_book.php

address_book_process.php

advanced_search.php

advanced_search_result.php

also_purchased_products.php

checkout_confirmation.php

checkout_payment.php

checkout_payment_address.php

checkout_shipping.php

checkout_shipping_address.php

checkout_success.php

contact_us.php

conditions.php

cookie_usage.php

create_account.php

create_account_process.php

create_account_success.php

default.php

default_nested.php

default_products.php

login.php

logoff.php

mainpage.php

new_products.php

password_forgotten.php

privacy.php

product_info.php

product_listing.php

product_notifications.php

product_reviews.php

product_reviews_info.php

product_reviews_write.php

products_new.php

reviews.php

shipping.php

shopping_cart.php

specials.php

ssl_check.php

tell_a_friend.php

 

Create the directory catalog/templates/.

Put the following files(*.tpl.php) into the catalog/templates/ directory:

account.tpl.php

account_edit.tpl.php

account_edit_process.tpl.php

account_history.tpl.php

account_history_info.tpl.php

address_book.tpl.php

address_book_process.tpl.php

advanced_search.tpl.php

advanced_search_result.tpl.php

also_purchased_products.tpl.php

checkout_confirmation.tpl.php

checkout_payment.tpl.php

checkout_payment_address.tpl.php

checkout_shipping.tpl.php

checkout_shipping_address.tpl.php

checkout_success.tpl.php

contact_us.tpl.php

conditions.tpl.php

cookie_usage.tpl.php

create_account.tpl.php

create_account_process.tpl.php

create_account_success.tpl.php

default.tpl.php

default_nested.tpl.php

default_products.tpl.php

login.tpl.php

logoff.tpl.php

mainpage.tpl.php

new_products.tpl.php

password_forgotten.tpl.php

privacy.tpl.php

product_info.tpl.php

product_listing.tpl.php

product_notifications.tpl.php

product_reviews.tpl.php

product_reviews_info.tpl.php

product_reviews_write.tpl.php

products_new.tpl.php

reviews.tpl.php

shipping.tpl.php

shopping_cart.tpl.php

specials.tpl.php

ssl_check.tpl.php

tell_a_friend.tpl.php

warnings.tpl.php

 

Use your store as you normally would. Please use the forums located at

http://www.oscommerce.com/forums to report bugs.

 

The main template is called mainpage.tpl.php and is located in the catalog/templates/ directory.

Modifying mainpage.tpl.php will change the way all pages are displayed.

If you dont find any bugs you can delete the following files as they are now redundant.

catalog/includes/form_check.js

catalog/includes/general.js

catalog/includes/header.php

catalog/includes/footer.php

SEEN!

Link to comment
Share on other sites

i get this error when trying to access my default.php page:

 

Warning: main(DIR_WS_TEMPLATESTEMPLATENAME_MAINPAGE) [function.main]: failed to create stream: No such file or directory in /home/xxxxxxxx/public_html/cart/catalog/default.php on line 161

 

Firstly, I am no php expert....just an experienced amateur. :)

 

What that error indicates to me is that somewhere (probably in templatenames.php) you are calling on variable names that have not been defined yet. Namely DIR_WS_TEMPLATES and TEMPLATENAME_MAINPAGE.

 

Is there something in the instructions that tells you to edit FILENAMES.PHP or CONFIGURE.PHP (both located in CATALOG/INCLUDES)? Somewhere, I think, those variables need to be defined.

 

Hope this helps,

 

Phil

Link to comment
Share on other sites

First, cut and paste will create white space and errors, use a text editor,

ftp files, edit and ftp back or save file after ftp out and load back after editing, secound way is my favorite, it keeps a copy there (on you computure ) for you to edit if you have to

looking at your error,

did you create the three defines in includes/configure.php ?

Link to comment
Share on other sites

i dont know what the 3 defines even means. sorry , think i got in way over my head here. thought it would be a simple modification, but some products are only designed for programmers, and this is one of them.

SEEN!

Link to comment
Share on other sites

this is not a si,ple add , but the 3 defines are as follows;

in includes/configure.php

define('DIR_WS_TEMPLATES', 'templates');

define('DIR_WS_JAVASCRIPT', 'DIR_WS_INCLUDES', 'javascript');

define('DIR_WS_INCLUDES', 'includes');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...