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.
Pages: 1
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:
$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)
Offline
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
// +-- // | 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
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?
Offline
The way I see what you want it can be done by like:
// +-- // | 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
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.
Offline
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 ):
<?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
Hooray!! Thank you SO very much I've just got to do a bit of CSS tweaking to get the spacing right. You're a life saver, thanks!
Offline
Pages: 1