Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

default oscommerce info boxes, how?


Guest

Recommended Posts

Posted

How do i remove an infobox header and border. for example Reviews has the awesome 3d rendered hand with pen (kidding), and it has text underneath it. It is in a box with border and has a header with title. How do i get rid of the Border, Title, Header bar and text and just leave the linked Gif image of the hand.

 

Any help is greatly appreciated!!!

 

Thanks

 

Matt

Posted

if you mean actual review page then its in there, if a side box then will be in catalog/includes/classes/boxes.php

Posted
if you mean actual review page then its in there, if a side box then will be in catalog/includes/classes/boxes.php

 

 

I am figuring it is in there too. Do you know what exact code though i need to take out or modify to remove the border, table header, and text?

 

Thanks

 

Matt

Posted

mostly you'll want to edit the contents of the php files in your shop's includes/boxes folder...

 

.................................

to get rid of box header:

 

example - for reviews....

edit includes/boxes/reviews.php (near top)

<!-- reviews //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

 new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS));

by removing...

  $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

 new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS));

that eliminates the box header...

 

.................................

to remove text if a product is displayed...

 

further down you'll see...

  if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);

$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>');

$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>');
 } elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box

to remove text if a product is displayed remove the part between "...SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>" and "');" so that it looks like this...

  if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);

$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>');

$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>');
 } elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box

 

.................................

the next part displays text ('write a review') when viewing a product...

 

to remove the text here change:

   } elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td></tr></table>');
 } else {
// display 'no reviews' box

to:

   } elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td></tr></table>');
 } else {
// display 'no reviews' box

 

.................................

 

you'll surely have to tweak the examples i give - but, i also see in another thread you basically ask the same question concerning the search - so i'll let you figure out the rest - only to add here.....

 

to get rid of the content box border - here's a "jeat-fix" (but it's a "jeat-border" so what the heck - huh?)...

 

edit includes/classes/boxes.php by removing:

	  $this->table_parameters = 'class="infoBox"';

note the above line appears twice - so you have to remove both of them...

Posted

Wow, thank you sooo much, i will go to work on that and let you know how i make out.

 

Cheers

 

Matt

Archived

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

×
×
  • Create New...