Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jchasick I need you help again please!!


beachboy

Recommended Posts

try this - create a file called index.html and insert the following code:

 

<?php

 

header("location:http://whateveryourstorepathis/default.php");

 

?>

 

 

you can replace /default.php with any other page you want to go to

Link to comment
Share on other sites

That didn't work either..What I'm truing to do is chane the link on my headers "TOP" button to link to my oscommerce default page instead of my website...If someones on a product page and clicks "TOP" it will take them back to my default page..

Link to comment
Share on other sites

I can go to any of my pages and view/source and it comes up as html in notepad and I can see where the TOP button is linked to my website. When I look in header.php or application top.php I can't find it..

Link to comment
Share on other sites

you just lost me....

 

when you click on the TOP link in the navigation, you do or do not want to go to your store main page? :?

Link to comment
Share on other sites

by 'your website', you mean it is going someplace other than your store?

 

if thats the case then you have something incorrectly setup in your /includes/configure.php file

Link to comment
Share on other sites

ok, post the top part of your catalog/includes/configure.php file (REMOVE passwords, logins, etc) - dont need the bottom db part of the file

Link to comment
Share on other sites

Like I said, I can view/ source on my default or any other page and view it in notepad in html form and see where the "TOP" button links to my website..I can't find that in any of the .php files.

Defaul.php, header.php or application_top.php so I can change the link to my stores front page.

Link to comment
Share on other sites

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.beachboysdiscounttools.com'); // eg, http://localhost - should not be NULL for productive servers

define('HTTPS_SERVER', 'http://www.beachboysdiscounttools.com'); // eg, https://localhost -

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/'); // If "URL fopen wrappers" are enabled in PHP (which they are in the default configuration), this can be a URL instead of a local pathname

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

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');

define('DIR_FS_DOCUMENT_ROOT', '/home/beachboy/public_html/');

define('DIR_FS_CATALOG', '/home/beachboy/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

my web page is:

'http://www.beachboysdiscounttools.com'

 

My store is:

http://www.beachboysdiscounttools.com/cata...log/default.php

Link to comment
Share on other sites

Jeff,

 

Excuse me while I butt-in..... :D

 

Beachboy,

 

If all you want to do is remove the link to the "other part" of your web site you can comment out a section of this part of catalog/includes/application_top.php, approx. line 444 :

 

// include the breadcrumb class and start the breadcrumb trail

 require(DIR_WS_CLASSES . 'breadcrumb.php');

 $breadcrumb = new breadcrumb;



 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

Like this:

// include the breadcrumb class and start the breadcrumb trail

 require(DIR_WS_CLASSES . 'breadcrumb.php');

 $breadcrumb = new breadcrumb;



 //$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

You then need to change a couple of things in catalog/includes/languages/english.php

 

Old code:

// header text in includes/header.php

define('HEADER_TITLE_CREATE_ACCOUNT', 'Create an Account');

define('HEADER_TITLE_MY_ACCOUNT', 'My Account');

define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents');

define('HEADER_TITLE_CHECKOUT', 'Checkout');

define('HEADER_TITLE_TOP', 'Top');

define('HEADER_TITLE_CATALOG', 'Catalog');

define('HEADER_TITLE_LOGOFF', 'Log Off');

define('HEADER_TITLE_LOGIN', 'Log In');

 

Change to:

// header text in includes/header.php

define('HEADER_TITLE_CREATE_ACCOUNT', 'Create an Account');

define('HEADER_TITLE_MY_ACCOUNT', 'My Account');

define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents');

define('HEADER_TITLE_CHECKOUT', 'Checkout');

define('HEADER_TITLE_TOP', '');//remove Top and just leave that blank

define('HEADER_TITLE_CATALOG', 'Home');//or you can call this what ever you want

define('HEADER_TITLE_LOGOFF', 'Log Off');

define('HEADER_TITLE_LOGIN', 'Log In');

Link to comment
Share on other sites

Kim..I tried part of that before..When I did this:

//$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

My page would show error message on line 41 and fatal error on same line.

When I changed:

define('HEADER_TITLE_TOP', '');//remove Top and just leave that blank

Where the top button was it showed:

"HEADER_TITLE_TOP" where the top button was and you could still click it!!

Link to comment
Share on other sites

Rick,

 

Have you made any changes to you catalog/includes/header.php file?

 

If you have, please post the header.php file

Link to comment
Share on other sites

The only change I made was add a banner to my header..

 

<?php

/*

$Id: header.php,v 1.2 2003/01/15 20:16:19 wilt Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2001 osCommerce

 

Released under the GNU General Public License

*/

 

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

tep_output_warning(WARNING_INSTALL_DIRECTORY_EXISTS);

}

}

 

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

tep_output_warning(WARNING_CONFIG_FILE_WRITEABLE);

}

}

 

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NON_EXISTENT);

} elseif (!is_writeable(tep_session_save_path())) {

tep_output_warning(WARNING_SESSION_DIRECTORY_NOT_WRITEABLE);

}

}

}

 

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

tep_output_warning(WARNING_SESSION_AUTO_START);

}

}

 

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

tep_output_warning(WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT);

}

}

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . ' ' . tep_image(DIR_WS_IMAGES . 'oscommerce3.jpg', 'beachboystoolshack'); ?> </td>

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="http://www.chrismyden.com" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

</tr>

</table>

<?php

if ($HTTP_GET_VARS['error_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo urldecode($HTTP_GET_VARS['error_message']); ?></td>

</tr>

</table>

<?php

}

 

if ($HTTP_GET_VARS['info_message'] != '') {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo $HTTP_GET_VARS['info_message']; ?></td>

</tr>

</table>

<?php

}

?>

Link to comment
Share on other sites

the configure.php file looks fine, so somewhere else that is getting trapped.... :? :twisted:

 

oh wait.... you are nesting this all inside another another folder, so....

 

define('HTTP_SERVER', 'http://www.beachboysdiscounttools.com'); // eg, http://localhost - should not be NULL for productive servers

define('HTTPS_SERVER', 'http://www.beachboysdiscounttools.com'); // eg, https://localhost -

 

are pointing to your main site and so you are returning to the main site when clicking Top

 

what you need is something along the lines of

 

define('HTTP_SERVER', 'http://www.beachboysdiscounttools.com/catalog');

 

to cause the redirect at the top level, but then I forget what to change

 

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

 

to in order to keep the structure in place....

 

:?

Link to comment
Share on other sites

I think I see what your getting at..Where it says:

define('DIR_WS_CATALOG', define('DIR_WS_CATALOG', '/catalog/'); // absolute path required '); // absolute path required

 

where the "'/catalog/" is I need to put the path to my catalog folder also, am I correct?

Link to comment
Share on other sites

Rick,

 

Humor me, ok? Try this for me.....follow the instructions to the letter and then us know when it is done so I can go look, ok?

 

 

Comment out a section of this part of catalog/includes/application_top.php, approx. line 444 :

 

Code:

// include the breadcrumb class and start the breadcrumb trail

require(DIR_WS_CLASSES . 'breadcrumb.php');

$breadcrumb = new breadcrumb;

 

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

 

Like this: Be carefull, don't leave any spaces after the //

Code:

// include the breadcrumb class and start the breadcrumb trail

require(DIR_WS_CLASSES . 'breadcrumb.php');

$breadcrumb = new breadcrumb;

 

//$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

Link to comment
Share on other sites

yes, you need to change

 

define('HTTP_SERVER', 'http://www.beachboysdiscounttools.com'); //

 

to

 

define('HTTP_SERVER', 'http://www.beachboysdiscounttools.com/catalog');

 

 

but then I forget what you need to change

 

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

 

to :? :? :? :?

Link to comment
Share on other sites

jchasick,

I guess this may have turned into somewhat of a crosspost, Someone posted on the dead thread and told me to change my english.php file to this:

Code:

define('HEADER_TITLE_TOP', 'Top');

to this

define('HEADER_TITLE_TOP', '');

Be sure to leave the single quotes in place.

 

It got rid of the top button but now I'm going to put it back and try to chane the link per your instructions..

 

I've been posting on that old thread 2 or 3 days w/out an answer!!

Link to comment
Share on other sites

Actually from any page you can click on "catalog" and it takes you to the home page..I think I'll try to rename that to "Home" and leave it at that..Your still the genius and thanks again!!

Link to comment
Share on other sites

well you have enough ammunition now so you can do it either way that works for you..

 

we all started at the bottom of the hill and crawled and scraped our way up 8)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...