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.
I think you want to edit catshow.php. In there you will need to add an if statement like:
if ($this->globals('core.mobile_display')) { print '<div class="catshowdesc">' . $eol; print $catdesc . $eol . $eol; print '</div>' . $eol; }
Offline
I added the suggested code to catshow.php without any luck. The code is below. Where did I go wrong? Thanks.
<?php
$eol = $this->globals('core.eol');
$catshow = $this->globals('ecom.cat_catshow');
$random = 'x' . $this->random_key(8);
$catname = $this->xhtml_encode($catshow['name']);
// +--
// | Check the images.
// +--
$images = $this->check_images(array('category' => array('root' => 'PUBLIC', 'dir' => 'media/ecom/cat', 'list' => $catshow['catimg'])));
// +--
// | 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.
// +--
// | Create the image tag.
// +--
$imgtag = '';
$imgwidth = 0;
if (!(empty($images['category']))) {
$imglist = $this->make_list($images['category']);
$imgname = $imglist[0];
$imgwidth = $this->globals('core_settings.ecom.imgsizecat');
$imgurl = 'media/ecom/cat/' . $imgname;
$imgtag = '<img src="' . $imgurl . '" ';
if ($imgwidth) {$imgtag .= 'width="' . $imgwidth . '" ';}
$imgtag .= 'alt="' . $catname . '" />';
} // End of if statement.
// +--
// | Print the display for this category.
// +--
print '<div class="ecom_catshow">' . $eol;
print '<table class="invisible"><tr><td class="invisible" style="';
if (!(empty($imgtag))) {print 'width: ' . $imgwidth . 'px; ';}
print 'padding: 0px 10px 10px 0px;">' . $eol . $eol;
if (!(empty($imgtag))) {
print $imgtag . $eol . $eol;
print '</td><td class="invisible" style="padding: 0px 10px 0px 0px;">' . $eol . $eol;
}
if ($this->globals('core.mobile_display')) {
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
}
// End of if statement.
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
print '</td></tr></table>' . $eol . $eol;
print '</div>' . $eol . $eol;
?>
Offline
Hello: I tried the suggested steps without success. Link to site is "www.hahntactical.com". Thanks.
Offline
I am accessing your site using the mobile skin at:
http://hahntactical.com/index.php?app=e … hts-Optics
I see a category description. I then switch to the desktop version and access the same page and see no category description. It's working as you asked for it to work. I'm looking at the top box with optic in it, no description next to it on desktop, description shows on mobile.
Offline
Hello Nick:
Thanks for responding. I believe my code modifications are backwards. I wanted the category description to be removed from the "mobile" version, but I would like for the descriptions to be visible on the desktop version. How would the IF STATEMENT need to be modified? Thanks.
if ($this->globals('core.mobile_display')) {
print '<div class="catshowdesc">' . $eol;
print $catdesc . $eol . $eol;
print '</div>' . $eol;
}
Offline
Thanks Nick. I was trying to get the same modification to work, but I was putting the NOT code in wrong part of the code. Nevertheless your modification is working according to my request. Thanks for your help.
Offline