The code below from post #115 is correct, works as intended and should be the ONLY code used. Using alternate code will only make future template upgrades that more difficult.
I personally updated the php-mobile-detect code within the html_header.php file of this DEMO first time around and did not inform Anne it should also be replaced in any file she used the php-mobile-detect code to call device specific code, my apologies.
I have just updated the rest of this DEMOS php-mobile-detect code and tested. I am confident that as soon as time permits, Anne will resubmit!
Again, my apologies.
Anne, my hat is off to you, this template is truly a masterpiece and most definitely the next generation of Zen Cart responsive templates.
Code:
if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
echo $responsive_mobile;
} else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
echo $responsive_tablet;
} else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
echo '';
} else {
echo $responsive_default;
}
Bookmarks