Jump to content

Switch the theme depending on the browser


Recommended Posts

Hi All,

I have a store which I need to display on both desktop and mobile browsers. I have two themes for this. But don't know how to switch the theme depending on the browser. I understand that we can identify the browser using some methods. I'm not aware of the bit in the prestashop itself which needs to switch the theme.

Can anyone help? Your help is really appreciated.

Thank you in advance.

Link to comment
Share on other sites

  • 10 months later...

cant i join this conference, i am new in this forum...!nice to know you all

my name is vkonk... !!!

for script

function using_ie()

{

$u_agent = $_SERVER['HTTP_USER_AGENT'];

$ub = False;

if(preg_match('/MSIE/i',$u_agent))

{

$ub = True;

}

 

return $ub;

}

 

function ie_box() {

if (using_ie()) {

?>

 

This page is not designed for Intenet Explorer. If you want to see this webpage as intended, please use a standards compliant browser, such as Google Chrome.

<?php return; } }

 

where should I put this script...and can i chose the destination from themes if define browser is mobile

 

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...