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 07-19-2013 06:48:06

moto
Member
From: UK
Registered: 01-30-2005
Posts: 174
Website

Two questions regarding mobile view.

Question 1 - Is it possible to disable a category to stop it displaying on the mobile menu?

Question 2 - Is it possible to stop the category description showing in mobile view?

Many thanks

Offline

 

#2 07-19-2013 09:42:21

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

Question 1 - Is it possible to disable a category to stop it displaying on the mobile menu?

Not without modding the software.

Question 2 - Is it possible to stop the category description showing in mobile view?

Put a blank space in the mobile category description and it will use that.


Nick Hendler

Offline

 

#3 10-01-2013 13:26:11

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

There no mobile category description field in the ecom_cat table.


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#4 10-02-2013 07:34:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

You're right!  I'll be sure that gets added in the next update.  I thought for sure it was there.


Nick Hendler

Offline

 

#5 10-02-2013 10:14:02

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

In the mean time, I have php enabled in my category descriptions.  Could you provide a code snippet I could utilize in the description to determine if the current session is a mobile one.  I'm thinking I could utilize it in an if/else expression to display a more appropriate description for the mobile view.


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#6 10-03-2013 08:08:01

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

The category descriptions by default don't use PHP in them, so you're better off just adding a new field to the table in Raw DB Admin for the mobile description, then present that field in the mobile category display, rather than the regular description field.


Nick Hendler

Offline

 

#7 10-03-2013 10:29:07

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

Yeah, that shouldn't be too hard, but I'm still interested in learning about identifying the session as mobile using php, if you've got a minute to spare.  There are probably a lot of other potential applications for such knowledge, and besides, since I've enabled php in the descriptions, why not use it?


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#8 10-03-2013 11:19:12

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Two questions regarding mobile view.

Correct me if I wrong as I don't use the mobile view, but isn't there a separate Category display that is only used for mobile sessions by default??
Location: System Dashboard > Store > Store Displays > Category Displays > Mobile

You could remove the print $catdesc; line to remove the description altogether, or you could add a new column in the category table and reassign the value of $catdesc in the Mobile only display


Rob

Offline

 

#9 10-08-2013 13:50:27

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

Yeah, zanart, that's the easy way.  I'd like know how to do it by identifying the session as a mobile session using php and then providing alternate content using an if/else expression.


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#10 10-08-2013 14:44:54

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1706

Re: Two questions regarding mobile view.

Try this
$this->globals('core.mobile_display');


Rob

Offline

 

#11 10-08-2013 15:59:14

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

like if $this = '1' then


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#12 10-09-2013 08:02:09

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

More like:

Code:

if ($this->globals('core.mobile_display')) {
     // Do mobile here
} else {
     // Do desktop here
}

Nick Hendler

Offline

 

#13 10-10-2013 08:25:49

JayCR48
Member
From: Ohio
Registered: 03-27-2008
Posts: 87
Website

Re: Two questions regarding mobile view.

Sweet!  Thanks!


We distribute high quality steel auto body panels for use in the rust repair industry.

Offline

 

#14 07-21-2014 16:47:01

franconero
Member
Registered: 11-03-2012
Posts: 31

Re: Two questions regarding mobile view.

How do i disable the mobile viewing mode?

Offline

 

#15 07-22-2014 09:28:08

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

Set Mobile Support Status to false here: System > Component > Settings > Mobile Support


Nick Hendler

Offline

 

#16 07-24-2014 14:09:24

franconero
Member
Registered: 11-03-2012
Posts: 31

Re: Two questions regarding mobile view.

thanks.

Offline

 

#17 08-01-2015 11:06:05

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Hello I tried deleting "print $catdesc;" from the mobile category display, but the description is still visible. Am I missing any additional steps?

Offline

 

#18 08-03-2015 06:47:28

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

I'm not sure what you're asking for here.  Please elaborate.


Nick Hendler

Offline

 

#19 08-03-2015 16:31:42

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

I wanted to remove the category description from the mobile view. So I deleted "print $catdesc;" from the mobile category view, but I'm still able to see the description in mobile view. Any suggestions?

Offline

 

#20 08-04-2015 06:46:59

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

Are you using the mobile view?  What are you editing?  The mobile category list display under Store > Store Displays > Category Displays > Mobile?


Nick Hendler

Offline

 

#21 08-04-2015 07:39:16

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Yes I'm editing the mobile category display that you mentioned. Thanks.

Offline

 

#22 08-05-2015 04:57:51

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

Are you looking at the site in mobile mode?  If you add a line of text to the display, do you see it printed to the screen?


Nick Hendler

Offline

 

#23 08-05-2015 09:35:59

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Hello:

Yes I'm viewing the site in mobile view on my desktop and cellphone. Here's my code below. You will notice that I'm commented out the "print $catdesc;" line of code. Also I have mobile support enabled. Here's one of the pages of the site I'm working on - http://hahntactical.com/index.php?app=e … el-Defense

<?php

// +--
// | Get variables we need to draw this display.
// +--

$eol      = $this->globals('core.eol');
$catdisp  = $this->globals('ecom.cat_catdisp');

// +--
// | Check the images.
// +--

$images = $this->check_images(array('category' => array('root' => 'PUBLIC', 'dir' => 'media/ecom/cat', 'list' => $catdisp['catimg'])));
$images = array();

// +--
// | Create the category name and link.
// +--

$catname  = $this->xhtml_encode($catdisp['name']);
$catlink  = $this->link_namespace('ecom','catshow',array('ref'=>$catdisp['id']),$catdisp['seourl']);

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

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

if ($desc_has_tags) {

     $catdesc  = $catdisp['description'];

} else {

     $catdesc  = '<p>' . $this->xhtml_encode($catdisp['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;

     $imgwidth = floor($imgwidth * .50);

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

} // End of if statement.

// +--
// | Print the display.
// +--

print '<table class="invisible"><tr><td class="invisible" style="';

if (!(empty($imgtag))) {print 'width: ' . $imgwidth . 'px; ';}

print 'padding: 0px 10px 10px 0px;">' . $eol;

if (!(empty($imgtag))) {

     print '<a href="' . $catlink . '" title="' . $catname . '">' . $imgtag . '</a>' . $eol;

     print '</td><td class="invisible" style="padding: 0px 10px 10px 0px;">' . $eol;

} // End of if statement.

print '<div class="catlistname">' . $eol;
print '<p><a href="' . $catlink . '" title="' . $catname . '"><strong>' . $catname . '</strong></a></p>' . $eol;
print '</div>' . $eol;

print '<div class="catlistdesc">' . $eol;
// print $catdesc;
print '</div>' . $eol;

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

?>

Last edited by btwebmedia (08-05-2015 09:37:44)

Offline

 

#24 08-07-2015 09:49:11

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Two questions regarding mobile view.

You're editing the category listing display, which can be seen here:

http://hahntactical.com/index.php?app=e … Gas-Blocks

What you really want to edit is {private}/apps/ecom/ECOM/includes/catshow.php and remove the description from there for the portion of the display that's applicable to mobile.


Nick Hendler

Offline

 

#25 08-07-2015 10:27:15

btwebmedia
Member
Registered: 08-25-2010
Posts: 150

Re: Two questions regarding mobile view.

Nick:

Which section of the code is for mobile display? I've commented out each description section individually and it removed the description from the mobile and desktop view. Thanks.

Offline

 

Board footer