Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 50
  1. #11
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,128
    Plugin Contributions
    0

    Default Re: Mobile template

    I don't understand what you are trying to point out?

    Viewing in Small Screen is still using a Browser?

    Anyway, I just ribbing you a bit in my earlier post.
    Creating a Mobile or mobi site has its own problems and quirks and to do it well, it takes time. And the practices of knowing Valid HTML & CSS still apply.
    The learning is in the doing.

    Potent Products

  2. #12
    Join Date
    Dec 2006
    Posts
    190
    Plugin Contributions
    0

    Default Re: Mobile template

    I had a friend surf my store with an iPhone using Safari. It came up exactly as the currently layout (he was doing it in front of a desktop to compare), but it was tiny. It allows zoom so he could access all of the text and images as needed.
    That said, I'd still prefer something optimized for mobile.

  3. #13
    Join Date
    Oct 2009
    Location
    Texas
    Posts
    199
    Plugin Contributions
    0

    Default Re: Mobile template

    Wow!
    I just happen to stumble upon this thread while searching for how to optimize my site for mobile browsers.
    This has to be the simplest tweaking of my Zen Cart that I've done to date!
    For those that want to apply this tweak here is just one of the numerous mobile browser emulator available.
    This is the Opera Mini 5 emulator. minu.me/378b

    Thanks you so much Clyde.
    Fine Jewelry For Any Budget
    Sterling Leaf Jewelry
    Rolling in the Zen

  4. #14
    Join Date
    Apr 2010
    Posts
    4
    Plugin Contributions
    0

    Default Re: Mobile template

    Site to 'test' your mobile templates

    ready.mobi/launch.jsp?locale=en_EN

    Dan

  5. #15

    Default Re: Mobile template

    I tried to install it but does not work, you probably should tell him to read the stylesheet mobile when you connect a mobile device, Thanks

  6. #16
    Join Date
    Feb 2009
    Posts
    240
    Plugin Contributions
    0

    Default Re: Mobile template

    Clyde's tweaks earlier in this thread are great, just what I needed.

    I have found that, by using various emulators, '@media handheld' doesn't always get recognised by every mobile manufacturer.

    So to play it safe I decided to use '@media all and (max-width: 320px)' instead, whereby the site view automatically switches to Clyde's alternative stylesheet once the viewport gets down to 320px wide.

    I've edited this alternative stylesheet to ensure everything relevant fits within the 320px width - not too much of a job once you get into it.

    I'm still tweaking and testing and may alter the 320px value. I'm working on the premise that any mobile with a larger resolution would be be able to navigate my normal site. Just started the process of moving on from emulators and onto differing mobiles.

    Obviously jscript is not possible on all mobiles and features like csshover don't seem to work, but my site has enough textual links to get around this.

    Anyway, just thought I'd share.

    Cheers

    Simon

  7. #17
    Join Date
    Nov 2007
    Location
    AZ
    Posts
    713
    Plugin Contributions
    5

    Default Re: Mobile template

    I am unable to log into admin with smartphone. Any ideas?
    Posted via Mobile Device

  8. #18
    Join Date
    Feb 2009
    Posts
    240
    Plugin Contributions
    0

    Default Re: Mobile template

    login to admin with ipod touch & safari browser works fine for me.

    This is using 'normal' website not 'mobilised' css. Haven't tried it on other devices .

  9. #19
    Join Date
    Mar 2006
    Posts
    1
    Plugin Contributions
    0

    Default Re: Mobile template

    Having a specific CSS stylesheet for mobile devices may solve the problem but most of the time having a specific Zen-Cart template would do a better job and allows admin to do some fine tuning for specific platform. The idea is to direct a visitor to a template or another depending on the device. For that, you can just override the init_templates.php.
    First make sure you have access to browscap.ini. This is is located in the php.ini file (check your server info). Adjust the value of this php variable and restart Apache. Browscap.ini file can be downloaded from browsers.garykeith.com/downloads.asp
    Second, duplicate the file init_templates.php from includes/init_includes to includes/init_includes/overrides and add this lines just before the comment "The actual template directory to use" :
    /**
    * BOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT
    */
    /**
    * Determine if client is a mobile device or not ($mobile = 1 ==> it is | $mobile = 0 ==> it is not)
    */
    $browser = get_browser($_SERVER['HTTP_USER_AGENT'], true);
    $mobile = ($browser['ismobiledevice'] == null ? 0 : $browser['ismobiledevice']);
    $platform = $browser['browser'];
    /**
    * Check if there is a specific template for this mobile platform and use it
    */
    if ($mobile == 1)
    {
    $exists_mobile = file_exists(DIR_WS_TEMPLATES . $template_dir . '_mobile');
    if ($exists_mobile)
    {
    $exists_platform = file_exists(DIR_WS_TEMPLATES . $template_dir . '_mobile_' . $platform);
    if ($exists_platform)
    {
    $template_dir .= '_mobile_' . $platform;
    }
    else
    {
    $template_dir .= '_mobile';
    }
    }
    else
    {
    // use regular template
    }
    }
    /**
    * EOF : SPECIFIC TEMPLATE FOR MOBILE CLIENT
    */
    If your template name is "mytpl" then the visitor using a mobile device will use a template called "mytpl_mobile" unless there is a specific template for its platform for example "mytpl_mobile_Android" or "mytpl_mobile_iPhone". With this, you can tweak the settings for a specific platform like Android, iPhone, BlackBerry, ... or have a generic template for all mobiles.
    Don't forget to duplicate the directories in languages, modules, ... for all the platforms you want to manage (see above, one directory for each platform) and to define the layout boxes as necessary (table layout_boxes) for each of your templates.
    Now you can define a template for mobiles (mytpl_mobile) and if you want for specific platforms (mytpl_mobile_Android, ...).
    Last : there are new mobile platforms almost every day, don't forget to update your browscap.ini from time to time.
    Hope this help ;-)

  10. #20
    Join Date
    Mar 2007
    Posts
    146
    Plugin Contributions
    6

    Default Re: Mobile template

    nice post, many thanks, works well!

 

 
Page 2 of 5 FirstFirst 1234 ... LastLast

Similar Threads

  1. Thinking of building a free Mobile Template
    By KThompson in forum Addon Templates
    Replies: 12
    Last Post: 20 Mar 2012, 04:37 PM
  2. Has anyone here gone MOBILE yet?
    By kevinmc3 in forum General Questions
    Replies: 19
    Last Post: 14 Dec 2010, 06:27 PM
  3. template for iphone/mobile userd
    By ballyc27 in forum Addon Templates
    Replies: 3
    Last Post: 6 Oct 2009, 01:58 AM
  4. PayPal Mobile
    By Adds in forum General Questions
    Replies: 0
    Last Post: 20 Mar 2007, 12:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •