Thread: Skin Switch

Results 1 to 10 of 47

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    368
    Plugin Contributions
    0

    Default Re: Skin Switch

    Hi,

    " I would also like to mask the url to remove the template name if possible--that way if I sent a link from a mobile device to a desktop user, they would not be directed to the wrong template. Any help you can provide is appreciated."

    I Would like to have an update regarding above question. Thx!

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,514
    Plugin Contributions
    126

    Default Re: Skin Switch

    Example2 in Skin Switch (just released in Sept) shows you how to do this.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    May 2007
    Posts
    84
    Plugin Contributions
    1

    Default Re: Skin Switch

    Great add-on . Now my templates switch from PC to mobile every Sunday.

    function use_nondefault_template() {
    // check whatever you want to here.
    if (date("D") == "Sun") {
    return true;
    }
    What I would really like them to do is switch whenever a mobile is detected. Would someone be kind enough to tell me how I can set up a mobile checking function in such a way as to operate this switch when ,

    if ($detect->isMobile()) {
    return true;

    Thanks.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,514
    Plugin Contributions
    126

    Default Re: Skin Switch

    Use a mobile detect library such as http://mobiledetect.net/.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    May 2007
    Posts
    84
    Plugin Contributions
    1

    Default Re: Skin Switch

    Thanks for replying. I've got the Mobile_Detect.php alright, but I can't figure out where to put it and how to get set_template.php to refer to it.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,514
    Plugin Contributions
    126

    Default Re: Skin Switch

    Look at example 2 - it shows how to use a single check.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    May 2007
    Posts
    84
    Plugin Contributions
    1

    Default Re: Skin Switch

    I'm using 1.5.4. The switch works fine on days of the week. I have includes/classes/Mobile_Checker.php ,and in the legacy template that I want to use as default I have , in common/html_header.php

    if (!class_exists('Mobile_Detect')) {
    include_once(DIR_WS_CLASSES . 'Mobile_Detect.php');
    $detect = new Mobile_Detect;
    }
    Then in set_template.php , I have ,

    function use_nondefault_template() {
    // check whatever you want to here.
    if($ismobile) {
    return true;
    }
    return false;
    }
    But this won't switch the template when the site is accessed by a mobile device , so I figure I must be missing something ?
    Last edited by cefyn; 13 Feb 2016 at 03:57 PM.

  8. #8
    Join Date
    Feb 2015
    Location
    USA
    Posts
    175
    Plugin Contributions
    0

    Default Re: Skin Switch

    First of all, thank you for the app. I was going nuts trying to make classic_resposive look good in mobile and desktop mode and this enabled me to work on the separately. Great work!

    I would like to have the link to the desktop view on the header when the mobile site is viewed on a desktop. It's working fine but I had to put in a sidebox with the desktop link so that if anyone gets to the mobile site on a desktop they can easily switch to the desktop view In other words I want to make the header uniform for both the mobile and desktop versions when they''re viewed on a desktop. Here's a link to the site.https://www.spminiatures.com/storetest2. So far it's in test mode. My concern is that many of my customers are not very computer literate and will get lost.
    I tried a few things but they they either didn't work or destroyed the site.

    Thanks for any help
    Carol

 

 

Similar Threads

  1. how to install free template skin into my old skin?
    By andrewmax81 in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 14 Nov 2009, 04:44 PM

Posting Permissions

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