Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 02-19-2010 04:05:35

kiwimum
Member
Registered: 03-30-2004
Posts: 305
Website

Removing category image from category detail display

We didn't like how the category description at the top of each category was placed in a table along with the category parent image.  Here's what we did in CCP6 to get rid of it:  https://forum.kryptronic.com/viewtopic.php?id=17982  (thanks John!)

It was easy enough to do in CCP7 if anyone is interested:

System > Displays > Display Includes > Category Detail Display

change what's there to the following code.  It'll remove the table & the image while leaving the category description if you have that turned on.

Code:

<?php 

$eol     = $this->globals('core.eol');
$catshow = $this->globals('ecom.cat_catshow');

$random  = 'x' . $this->random_key(8);

$catname = $this->xhtml_encode($catshow['name']);

// +--
// | Handle the description based on whether it has 
// | XHTML tags in it or not.
// +--

$has_tags = $this->has_tags($catshow['description']);

if (!(empty($has_tags))) {

     $catdesc  = $catshow['description'];

} else {

     $catdesc  = '<p>' . $this->xhtml_encode($catshow['description']) . '</p>';

} // End of if statement.

// +--
// | Print the display for this category.
// +--

// print '<table id="core--cptbl--' . $random . '" class="cptbl_cat">' . $eol . $eol;

// print '<tr class="cptbl_cat">' . $eol . $eol;

// print '<td class="cptbl_cat">' . $eol . $eol;

if (($catshow['catimg']) && ($catshow['catimg'] != 'none.png')) {

     $imgname  = $catshow['catimg'];
     if (empty($imgname)) {$imgname = 'none.png';}

     $imgwidth = $this->globals('core_settings.ecom.imgsizecat');
     $imgurl   = 'media/ecom/cat/' . $imgname;

     $imgtag   = '<img src="' . $imgurl . '" ';
     if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
     $imgtag  .= 'alt="' . $catname . '" />';

  //   print '<table class="ghost"><tr><td class="ghost" style="width: ' . $imgwidth . 'px">' . $eol . $eol;

 //    print $imgtag . $eol . $eol;

 //    print '</td><td class="ghost">' . $eol . $eol;

    print '<h3>' . $catname . '</h3>' . $eol . $eol;

    print $catdesc . $eol . $eol;

  //   print '</td></tr></table>' . $eol . $eol;

} else {

     print '<h3>' . $catname . '</h3>' . $eol . $eol;

     print $catdesc . $eol . $eol;

} // End of if statement.

// print '</td>' . $eol . $eol;

// print '</tr>' . $eol . $eol;

// print '</table>' . $eol . $eol;

?>

Note!  I removed the plain bolding around the category name and put <h3> tags around it.  If that doesn't work with your design, just change the line that says

Code:

print '<h3>' . $catname . '</h3>' . $eol . $eol;

back to

Code:

     print '<strong>' . $catname . '</strong>' . $eol . $eol;

Last edited by kiwimum (02-19-2010 04:10:42)


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

Board footer