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.

  • Index
  •  » ClickCartPro 6
  •  » Removing Category Images in Cat Detail Display - removing "Sort by"

#1 08-11-2007 23:48:44

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

Removing Category Images in Cat Detail Display - removing "Sort by"

I've been looking over this thread:  https://forum.kryptronic.com/viewtopic.php?id=15988  but it doesn't do quite what I need it to.  I'd like to keep the category descriptions, but remove the category image on the Category Detail Display.

I like the category images showing on the Store Home page, but not at the top of the category pages.

This page, for example:  http://www.verybaby.com/ccp0-catshow/cl … abric.html

I would like to remove that category image at the top, remove the table holding the image and description (if I'm only showing a description, it doesn't need to be in a table, does it? 
Then, I would like to sort out how to apply some CSS to the category name - right now, "Cloth Diaper Fabric" is just bolded.  I'd like to style this.

Finally, under the description, there is "Categories" which is fine, but when you click on one of the sub categories:  http://www.verybaby.com/ccp0-catshow/birdseye.html

It reads "Items" with "Sort by: Default | Name [+] [-] | Price [+] [-] Current: Name [-]" under that.  How can I remove the "Items" text without removing the "Categories" text from main category pages?  I'd also like to remove that Sort by information.  It's neat, but it doesn't really apply to my inventory.

Thank you!

Edit:  figured out how to remove the sort by function here it is in case anyone needs it:
Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes > Product List Display

Remove:

Code:

  $sortinfo  = $this->globals('khxc_session.prodsort');

     $link_default = $this->link_namespace($app,$ns,array('ref' => $ref,'prodsort' => 'DEFAULT'));
     $link_nameup  = $this->link_namespace($app,$ns,array('ref' => $ref,'prodsort' => 'NAMEUP'));
     $link_namedn  = $this->link_namespace($app,$ns,array('ref' => $ref,'prodsort' => 'NAMEDN'));
     $link_priceup = $this->link_namespace($app,$ns,array('ref' => $ref,'prodsort' => 'PRICEUP'));
     $link_pricedn = $this->link_namespace($app,$ns,array('ref' => $ref,'prodsort' => 'PRICEDN'));

     print '<div class="khxc_storelink">' . $eol . $eol;

     print '<p><strong>Sort by</strong>: ';

     print '<a href="' . $link_default . '" title="DEFAULT">Default</a> | ';
     print 'Name <a href="' . $link_nameup  . '" title="NAMEUP">[+]</a> ';
     print '<a href="' . $link_namedn  . '" title="NAMEDN">[-]</a> | ';
     print 'Price <a href="' . $link_priceup . '" title="PRICEUP">[+]</a> ';
     print '<a href="' . $link_pricedn . '" title="PRICEDN">[-]</a>';


     if     ($sortinfo == 'NAMEUP')  {print ' <strong>Current</strong>: Name [+]';}
     elseif ($sortinfo == 'NAMEDN')  {print ' <strong>Current</strong>: Name [-]';}
     elseif ($sortinfo == 'PRICEUP') {print ' <strong>Current</strong>: Price [+]';}
     elseif ($sortinfo == 'PRICEDN') {print ' <strong>Current</strong>: Price [-]';}
     else                            {print ' <strong>Current</strong>: Default';}

     print '</p>' . $eol;
     print '</div>' . $eol;

Not sure if that's even right, but it appears to be working. 

Still need answers to the other Q's.

Last edited by kiwimum (08-12-2007 00:18:53)


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#2 08-12-2007 03:04:09

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

I belive what you are looking for you will have to use a terminal window and edit your private_dir/khxc/apps/{app}/CCP/includes in the file catshow.php or go to Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes > Category Detail Display. Look at this part of the code

Code:

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

print '<table id="khxc--cptbl--' . $random . '" class="khxc_cptbl_cat">' . $eol . $eol;

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

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

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

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

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

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

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

     print $imgtag . $eol . $eol;

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

     print '<p class="strong">' . $catname . '</p>' . $eol . $eol;

     print $catdesc . $eol . $eol;

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

John

Last edited by dh783 (08-12-2007 03:08:14)

Offline

 

#3 08-13-2007 15:25:55

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

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

Hi John,

I've been looking at that part of the code, but everything I've tried results in a php error.  I need a bit more hand holding- anyone?


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#4 08-13-2007 17:32:58

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

The way I see what you want it can be done by like:

Code:

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

print '<table id="khxc--cptbl--' . $random . '" class="khxc_cptbl_cat">' . $eol . $eol;

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

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

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

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

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

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

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

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

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

     print '<p class="strong">' . $catname . '</p>' . $eol . $eol;

     print $catdesc . $eol . $eol;

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

John

Offline

 

#5 08-14-2007 10:56:49

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

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

Hmmm- that's close, but it still leaves the table there which is totally unnecessary and I'm unable to style the category title.  There's got to be a way to edit this?  I need the table completely removed (anal retentive, I am) and some way to place an <h2> </h2> tag around the category title.


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#6 08-14-2007 13:42:50

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

I know that it wasn't quite what you wanted but it was the general idea, right ?

Here is a rough idea of what I think you want ( I left the original code in so you could compair ):

Code:

<?php 

$app     = $this->globals('khxc_display.app');
$eol     = $this->globals('khxc.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.
// +--

if ($catshow['deschastags']) {

     $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="khxc--cptbl--' . $random . '" class="khxc_cptbl_cat">' . $eol . $eol;

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

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

print '<div>' . $eol . $eol;

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

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

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

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

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

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

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

  //   print '<p class="strong">' . $catname . '</p>' . $eol . $eol;

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

     print $catdesc . $eol . $eol;

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

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

} else {

     print '<p class="strong">' . $catname . '</p>' . $eol . $eol;

     print $catdesc . $eol . $eol;

} // End of if statement.

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

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

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

?>

John

Offline

 

#7 08-14-2007 15:48:34

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

Re: Removing Category Images in Cat Detail Display - removing "Sort by"

Hooray!!  Thank you SO very much wink  I've just got to do a bit of CSS tweaking to get the spacing right.  You're a life saver, thanks!


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 
  • Index
  •  » ClickCartPro 6
  •  » Removing Category Images in Cat Detail Display - removing "Sort by"

Board footer