Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trying to Change Links in the Right Column is driving me nuts


Editor12

Recommended Posts

This one is probably so simple I'm almost afraid to ask. Header, footer, left column are all easily edited with the ability to change images and links simply enough but not so with the right column. This seems to be heavily disguised in a lot of coding, or at least that's how it appear to this newbie. What I simply want to do is change some of the links in the right column and instead of them going to products I want them to go to some customized page URL's. It almost seems like an impossible task and I've spent some hours trying to figure this out before finally giving up and asking for help.

 

THANKS GUYS...

 

<?php

/*

$Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require(DIR_WS_BOXES . 'shopping_cart.php');

 

if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 

if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 

if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_session_is_registered('customer_id')) {

$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");

$check = tep_db_fetch_array($check_query);

if ($check['count'] > 0) {

include(DIR_WS_BOXES . 'best_sellers.php');

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

}

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

}

} else {

include(DIR_WS_BOXES . 'best_sellers.php');

}

 

if (isset($HTTP_GET_VARS['products_id'])) {

if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');

} else {

//include(DIR_WS_BOXES . 'statistics.php');

}

 

require(DIR_WS_BOXES . 'reviews.php');

 

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

include(DIR_WS_BOXES . 'languages.php');

include(DIR_WS_BOXES . 'currencies.php');

}

?>

Link to comment
Share on other sites

If you look all the infoboxs are called using require(DIR_WS_BOXES.'XXX.php');

 

Look in catalog/includes/boxes/ directory and you can see all the boxes that are called

 

Open one up and you can see info boxes are created using an array

 

Try opening catlog/includes/boxes/information.php and you can see how the links are created. Save this as another file e.g external_links.php

 

in the code you can see for example

 

<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>

 

if you know html then change the href code to the exernal link

 

then in the column_right.php put: require(DIR_WS_BOXES.'external_links.php'); in the position you want

Link to comment
Share on other sites

If you look all the infoboxs are called using require(DIR_WS_BOXES.'XXX.php');

 

Look in catalog/includes/boxes/ directory and you can see all the boxes that are called

 

Open one up and you can see info boxes are created using an array

 

Try opening catlog/includes/boxes/information.php and you can see how the links are created. Save this as another file e.g external_links.php

 

in the code you can see for example

 

<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>

 

if you know html then change the href code to the exernal link

 

then in the column_right.php put: require(DIR_WS_BOXES.'external_links.php'); in the position you want

 

Many thanks Simon, I'll give that a go. In the meantime for anyone else trying to figure this out I recreated the index.php page as a bog standard index.html intro page. Not ideal, I know, but hey it works, and at least it allows me to change that pesky right column.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...