PDA

View Full Version : Taking out right column boxes



fateimport
03-03-2005, 12:41 AM
I don't know how to take out some of the boxes (sorry, don't know what they're called) on the right column. These are the categories I want to delete:

-manufacture info
-currencies
-languages
-tell a friend
-review

I looked everywhere, but still don't know. Also, is there a way to take out the "click to enlarge" option? I can't get it to work, so I'm putting the images in the HTML.

Any help would be appreciated. Thanks

red_fraggle
03-03-2005, 09:12 AM
open file /includes/column_right.php and comment the boxes you dont want out using the standard php comment tag of "//" before any require statements for the boxes you want gone.

Open product_info.php and edit the code to remove the hyperlink for the "click to enlarge".

fateimport
03-04-2005, 01:51 AM
Thanks, I really appreciate it. I was going crazy.

fateimport
03-04-2005, 02:02 AM
Ok, I looked at it and I just want to make sure that I understood what you explained.

So when it says "manufacture_info" I'll replace it with "//" right?

Also, for the click to enlarge issue, how do I edit the code to remove the hyperlink? I was thinking I just had to erase something and then I read your sentence again.

Thanks for the help.

scobob
03-04-2005, 07:33 AM
Place the slashes after <?php and before the include directive:

<?php //include(DIR_WS_BOXES . 'manufacturers.php'); ?>

fateimport
03-05-2005, 04:35 PM
How do you edit the code for the "enlarge image" to get rid of it? I received this reply:

Open product_info.php and edit the code to remove the hyperlink for the "click to enlarge".

I don't know how to edit the code.

Thanks

red_fraggle
03-05-2005, 09:48 PM
Easy Way:

/catalog/includes/languages/english/product_info.php find code:


define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');

and change it to this:


define('TEXT_CLICK_TO_ENLARGE', '');

this will only remove the text "click here to enlarge" the image remains a link to the popup.

Harder Way:
if using MAX 1.7 open /templates/templatename/product_info.tpl.php and look for this code around line 86



<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>

Change it to this


<script language="javascript"><!--
document.write('<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?>');
//--></script>
<noscript>
<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?>
</noscript>


This will remove the text from the screen and prevent the image from being a link itself as well.

fateimport
03-07-2005, 01:41 AM
I tried to follow the instructions given to me, but maybe I'm doing something wrong. Don't know anything about php, so I need all the help I can get. This is what's in the include/column_right.php section:

<?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 (c) 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 . 'specials.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');
}
?>

So where do I place the "//"?

red_fraggle
03-07-2005, 09:30 AM
the standard characters to "comment" out code in php is // this means for any boxes you want removed you will need to add a "//" before them above. An example would be if you wanted to remove the "languages" info box from the right_column of your store, above you would change the line:



include(DIR_WS_BOXES . 'languages.php');


to:



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


Now that your using a shopping cart system written in PHP, it might be wise to get a book on PHP and mysql :) Anyway hope this helps.