Forums / Templates, Stylesheets, Page Layout / Script to display standard or mobile browser template for 1.3.9?

Script to display standard or mobile browser template for 1.3.9?

Views: 1,172

Results 1 to 2 of 2
31 Oct 2013, 12:36 PM
#1
kavlito avatar

kavlito

New Zenner

Join Date:
Sep 2009
Posts:
40
Plugin Contributions:
0

Script to display standard or mobile browser template for 1.3.9?

I have an existing store based on a Zen Cart "PC browser" template. I just recently purchased a mobile device template. However, I cannot figure out how to have Zen Cart dynamically determine the browser type (PC vs. Mobile) and display the appropriate template.

27 Jan 2014, 3:34 PM
#2
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: Script to display standard or mobile browser template for 1.3.9?

put this in your httaccess folder

RewriteEngine On # Check for mime types commonly accepted by mobile devices RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC] RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^ http://m.domain.com%{REQUEST_URI} [R,L]

edit the last line appropriately

ZC v1.5.7 "I was so much older then...I'm younger than that now" Cut the umbilical cord with webhosts after 20 years. FREEDOM!