Forums / Addon Templates / goMobile Support Thread

goMobile Support Thread

Started by steveyork136 on 20 Jul 2011, 8:04 PM · Views: 22,078

Results 1 to 20 of 30
20 Jul 2011, 8:04 PM
#1
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

goMobile Support Thread

Hi everyone, this is my first module contributed to zen so please be gentle.

goMobile is a very simple alteration to the init templates file.

It checks to see if the user is visiting the site using a mobile browser, if they are the site displays using a second (mobile specific) template.

The module also includes details on offering a link to the full site if a user doesn't want to goMobile.

This is a bit of a brute force method, you have to create a second template and all the extra files this incurs, but for me, I couldn't achieve the look I wanted for my site by just using media queries.

Its live on my site now (motorcycleheaven.co.uk) and your welcome to have a look.

This is the first version of the module and I have plans for future version including a bundled mobile template, improved template override and I'd like to clean up the extra images page my site uses, but if anyone has any other suggests please shout.

goMobile in the downloads

Enjoy
Steve

20 Jul 2011, 10:09 PM
#2
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: goMobile Support Thread

Hi,

Download link didn't work for me and I don't know what to make of your mobile sheet, looking at site in Firefox view css by handheld device.

However, I am very impressed with your sites - templates and drop down menus.

Where did you get them?

SPH
(Steve)
https://www.prommart.com - main site
www.-prom-mart.com - test site

PS: Just wondering, are mobile sheets/sites necessary any more? I don't have a mobile device, but yesterday sister said sites look good, normal in hers. She has something larger than her old phone, though.

Steve
prommart.com

21 Jul 2011, 8:06 AM
#3
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: goMobile Support Thread

sorry SPH

heres the corrected link
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_53&products_id=1965

its in the templates section if this doesn't work.

The style sheet is a mess but I had a bit of confusion with them, this is the second site I have used this goMobile switch on, the first one looked for the mobile style sheet in the mobile template package but my site uses the normal style sheet in the mobile template.

I would recommend anyone who wants to use this module, don't use my css as its very specific for my site (and a bit messy), I am working on adding a default template to the module.

Heres a couple of screen grabs to show what it should look like

Mobile site

Full site

If anyone's building or testing a mobile site I suggest you use firefox with the user agent switcher plugin

http://chrispederick.com/work/user-agent-switcher/

it lets you switch your browser to emulate a mobile device.

SPH, Thanks for the kind comments about my site, its all done by me!
If I get some time I 'll try and bundle up the dropdown menu, took ages but I'm pleased with the effect.
It really just code I found around the web adapted to suit my needs.

22 Jul 2011, 4:54 AM
#4
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: goMobile Support Thread

Your mobile site jpg looks like our Apple Zen templates in Firefox's view css by handheld device tool: all aligned down the left side. I think this Apple Zen template is already handheld optimized somewhat (and supposedly is specially SEO optimized, we'll see). Clyde's zencartzen template is also handheld optimized, coming with a handheld stylesheet which moves everything in a long column down the left, viewed in Firefox css handheld tool.

Yes, your sites are very impressive! Probably the most "tricked-out" zencarts I've seen, and done very professionally. Very nice work.

Everything seems to make the sites a little slow compared with my site, but then mine is (or should be) lightening fast because there really isn't much on it yet.

One of the reasons why testing Apple Zen is that we are hightly interested in a drop-down menu for some, if not all, of our sites. Your menus are very impressive and (assuming no issues) I would think a hit if offered as a mod...or even a commercial mod.

You also have serious template design talent.

sph
https://www.prommart.com

Steve
prommart.com

22 Jul 2011, 5:05 AM
#5
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: goMobile Support Thread

PS: I do think that my custom tpl product info display may disrupt any Apple Zen handheld optimization on the products, using a table to place everything to right of main pic:

prommart.com/index.php?main_page=product_info&cPath=115_14&products_id=3501

If I could do it with divs it would be better.

sph

Steve
prommart.com

19 Aug 2011, 7:43 PM
#6
shortysclimbin avatar

shortysclimbin

New Zenner

Join Date:
Oct 2010
Location:
San Juan Puerto Rico
Posts:
62
Plugin Contributions:
0

Re: goMobile Support Thread

Steve,

I am just starting to dig into this... Can you post up a copy of your CSS and mobile layout for me to screw around with? I am confused on how many files I need to edit to get this to work. My site displays in English, Spanish, Italian, and German so I was thinking of using symbols for a majority of things and a really basic product description.

I am still a newbie at web work.. normal coding for me is very old school plc and assembly stuff! Thanks again for getting us all started, I will do what I can to help contribute!

1 Sep 2011, 11:41 AM
#7
doggyjumper avatar

doggyjumper

New Zenner

Join Date:
Jun 2009
Posts:
9
Plugin Contributions:
0

Re: goMobile Support Thread

I like this !

currently adjusting for a mobile template myself.
interesting in fact how different one has to look at the functional/pratical differences making it practical for the mobile user as a quick ordering tool. a just to the point order and buy site ; no extra stuff like on the regular site.

a basic mobile template would be handy ;-)

Guy

19 Jan 2012, 8:24 PM
#8
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: goMobile Support Thread

I am very interested in having my site mobile compatible. I noticed that there were no css stylesheets in the download area with gomobile.

What files do I add to the new mobile template file? Just the one file? And where to start with a css stylesheet?

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

9 Aug 2012, 11:47 AM
#9
damiantaylor avatar

damiantaylor

Zen Follower

Join Date:
Aug 2009
Posts:
244
Plugin Contributions:
0

Re: goMobile Support Thread

Thanks for the goMobile mod! It's very useful when creating a mobile site.
I may have found a slight problem, although I haven't tested it yet as I'm still busy building my mobile website.....

It's to do with the 'switch to full site' button. I see it uses cookies, but if the user's browser doesn't support cookies or the user has them disabled, the site will keep bouncing back to the mobile one.

Off the top of my head, maybe you could swap the button for a mesage if cookies are disabled.....although this isn't easy because on first load you don't know (without javascript) if cookies are enabled or disabled.
Either that, or when they click the button, write their choice to the database?
Only other thing I can think of would be to amend the zen_href_link function in includes/functions/html_output.php to always pass the 'fullsiteoverride' in the URL in the section where it tacks the zenid to the URL?
Something like

if (isset($sid)) {
  $link .= $separator . zen_output_string($sid);
  if (isset($_GET['fullsiteoverride'])) $link .= '&fullsiteoverride=' . $_GET['fullsiteoverride'];
}

Not a big issue really but could be slightly annoying to users when they can't access the full website!

16 Aug 2012, 10:55 AM
#10
wtfbbq avatar

wtfbbq

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: goMobile Support Thread

Is this confirmed to work in v1.5?

19 Aug 2012, 8:06 PM
#11
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: goMobile Support Thread

Hi all sorry for the lack of replies, summer is our busiest time so it been difficult to get any time to get back on the forum, I'll try and be more prompt with my replies.

I've uploaded a new version which fixes the cookie issue (didn't seem to set the cookie correctly properly).

@damiantaylor, yes the JavaScript disabled is an issue but (possibly stupidly) I decided to worry about that later, something to add to the todo list. The new version uses a separate page to set the cookie so I should be able to do some kind of js detection test and offer up some kind of error message.

@kburner, you need to add whatever files you want to modify, in essence what you are doing with the goMobile is creating another custom template, but a custom template specifically for mobile devices.

@wtfbbq yes should work fine in 1.5, only overrides one file and adds one new file.

@shortysclimbin, @doggyjumper and the other people that have messaged me, I will attempt to put together a simple mobile template to get you started.

Steve

5 Sep 2012, 3:16 AM
#12
makenoiz avatar

makenoiz

Zen Follower

Join Date:
Mar 2006
Posts:
284
Plugin Contributions:
0

Re: goMobile Support Thread

Hi There... does anyone have this working on 1.3.8.a. Client does not wish to upgrade store version at this time but needs to go mobile.

Thank you

22 stores and counting! Ive been zenned.

18 Sep 2012, 8:35 AM
#14
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: goMobile Support Thread

Hi steve,

Thanks for the mod. I have installed it and it does detect if i am on a pc or a mobile device and shows the right template. But I don.t seem to be able to switch between the two. I made a link at the bottom of my page to switch, but it starts reloading my page in the template it was in.
I am using Zen Cart 1.5
I checked for the cookie, it is being set.

Erik

20 Sep 2012, 8:30 PM
#15
lunabug avatar

lunabug

New Zenner

Join Date:
Dec 2009
Posts:
94
Plugin Contributions:
0

Re: goMobile Support Thread

steveyork136:

@shortysclimbin, @doggyjumper and the other people that have messaged me, I will attempt to put together a simple mobile template to get you started.

Hey Steve, when you get this simple mobile template packaged, please let me know too. THANKS!

I was floating in a peaceful sea...rescued by a sinking ship.

27 Sep 2012, 3:53 PM
#16
steveyork136 avatar

steveyork136

New Zenner

Join Date:
Nov 2005
Posts:
84
Plugin Contributions:
0

Re: goMobile Support Thread

Hi Erik,
Have you got the updated version installed with the sitechoice.php file.

This fixes the original issue with the cookie not being set correctly, do you want to share a like so I can have look?

Steve

28 Sep 2012, 12:58 PM
#17
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: goMobile Support Thread

Hi Steve,
I have removed the mod for now. Maybe I will make a test setup this weekend. Ihad the latest version installed, with the sitechoice.php. The cookie was set, but is not used when the footer link is used.
I will report back as soon as the test site is up

30 Sep 2012, 10:14 AM
#18
mshutch avatar

mshutch

New Zenner

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
34
Plugin Contributions:
0

Re: goMobile Support Thread

Design75:

Hi steve,

Thanks for the mod. I have installed it and it does detect if i am on a pc or a mobile device and shows the right template. But I don.t seem to be able to switch between the two. I made a link at the bottom of my page to switch, but it starts reloading my page in the template it was in.
I am using Zen Cart 1.5
I checked for the cookie, it is being set.

Erik

I am also having this issue and am not sure how to correct the problem. Have you had any luck fixing it Erik?

--Colleen

--Colleen

1 Oct 2012, 6:51 PM
#20
mshutch avatar

mshutch

New Zenner

Join Date:
Feb 2007
Location:
Ontario, Canada
Posts:
34
Plugin Contributions:
0

Re: goMobile Support Thread

Well, you aren't alone! I cannot figure out why it won't work, grrrr!!!!!

--Colleen