Zen Cart Logo

Border removal!

Locked

Views: 1,423

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
13 Feb 2008, 3:54 PM
#1
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Border removal!

im trying to remove the border around the "centerBoxHeading" heading wrapper, due to the content box and header box both being in the same div i cant get rid of the border around the head shown here https://www.orcharddirect.co.uk/store, i would like to keep the border around the content but not the header. What php file do i have to edit to split these into 2 divs? Or can someone suggest an easier way i can go about achieving this. Many thanks.

13 Feb 2008, 6:06 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Border removal!

It does require a file edit. You want to be very careful editing tpl_columnar_display.php since it is used by many other files. The following will add a .contentWrapper div in cases where there is a title for the output. Hopefully this will not impact negatively on any other displays.

<?php
/**
 * Common Template - tpl_columnar_display.php
 *
 * This file is used for generating tabular output where needed, based on the supplied array of table-cell contents.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_columnar_display.php 3157 2006-03-10 23:24:22Z drbyte $  added contentWrapper gjh42  2008-02-13
 */

?>
<?php
  if ($title) {
  ?>
<?php echo $title . '<div class="contentWrapper">'; //contentWrapper 2008-02-13 ?>
<?php
 }
 ?>
<?php
if (is_array($list_box_contents) > 0 ) {
 for($row=0;$row<sizeof($list_box_contents);$row++) {
    $params = "";
    //if (isset($list_box_contents[$row]['params'])) $params .= ' ' . $list_box_contents[$row]['params'];
?>

<?php
    for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
      $r_params = "";
      if (isset($list_box_contents[$row][$col]['params'])) $r_params .= ' ' . (string)$list_box_contents[$row][$col]['params'];
     if (isset($list_box_contents[$row][$col]['text'])) {
?>
    <?php echo '<div' . $r_params . '>' . $list_box_contents[$row][$col]['text'] .  '</div>' . "\n"; ?>
<?php
      }
    }
?>
<br class="clearBoth" />
<?php
  }
}
$title? echo '</div>':''; //contentWrapper 2008-02-13
?> 

Save as /includes/templates/your_template/common/tpl_columnar_display.php.

1 Mar 2008, 5:08 PM
#3
orchard_direct avatar

orchard_direct

Zen Follower

Join Date:
Aug 2007
Location:
Brighton, UK
Posts:
204
Plugin Contributions:
0

Re: Border removal!

Unfortunately that code doesn't work, it just completely deleted the whole section. Any other ideas.

Cheers

2 Mar 2008, 4:12 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Border removal!

For some arcane PHP reason, it doesn't like the "echo" at the end.
Replace this line:

$title? echo '</div>':''; //contentWrapper 2008-02-13

with this:```php
if ($title) { //contentWrapper 2008-02-13 ?>

</div> <?php } ```and it works.
2 Mar 2008, 4:33 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Border removal!

The echo just needs to be outside the ternary operator to work correctly. Replace the original line:```php
$title? echo '</div>':''; //contentWrapper 2008-02-13

with this:```php
echo $title? '</div>':''; //contentWrapper 2008-03-02