Jump to content

[SOLVED] PHP Help! Re-arranging PHP


wjr

Recommended Posts

Hi Guys,

 

Currently working on http://www.kitchen-surplus.co.uk/ccp6/index.php?app=gbu0&ns=catshow&ref=Jigs

 

I need to move the "khxc_cptbl_cat" (Where it says "Carpenters Jigs" and on the line below it ".", essentially the Category XHTML description, to below the list of products in that category. I have been unable as of now to complete this successfully. Does anybody know how i can achieve this?

 

Just to clarify, the item I need to move is the "khxc_cptbl_cat", between the "Location: Store Home  > Carpenters Jigs" and "Items" tab.

 

I have been told that I need to edit the Category Detail Display, which is in PHP, however I have not been able to do this successfully.

 

I have pasted the PHP code as below :

 

<?php 

$app     = $this->globals('khxc_display.app');
$eol     = $this->globals('khxc.eol');
$catshow = $this->globals('ecom.cat_catshow');

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

$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;

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;

} 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;

?>

 

Please help!!

 

Link to comment
https://forums.phpfreaks.com/topic/90199-solved-php-help-re-arranging-php/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.