Jump to content

mobile theme in a PC Desktop [SOLVED]


famar

Recommended Posts

Overview of the methods Context::getMobileDevice(), Context::checkMobileContext() and FrontController::init()

 

//Context::checkMobileContext()
protected function checkMobileContext()
{
return isset($_SERVER['HTTP_USER_AGENT'])
&& isset(Context::getContext()->cookie)
&& (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE')
&& @filemtime(_PS_THEME_MOBILE_DIR_)
&& !Context::getContext()->cookie->no_mobile;
}

 

 

//FrontController::init()
// Check mobile context
if (Tools::isSubmit('no_mobile_theme'))
$this->context->cookie->no_mobile = true;
else if (Tools::isSubmit('mobile_theme_ok'))
$this->context->cookie->no_mobile = false;

 

This parameters is necessary to enable/disable the mobile theme on mobile device

Link to comment
Share on other sites

Overview of the methods Context::getMobileDevice(), Context::checkMobileContext() and FrontController::init()

 

//Context::checkMobileContext()
protected function checkMobileContext()
{
return isset($_SERVER['HTTP_USER_AGENT'])
&& isset(Context::getContext()->cookie)
&& (bool)Configuration::get('PS_ALLOW_MOBILE_DEVICE')
&& @filemtime(_PS_THEME_MOBILE_DIR_)
&& !Context::getContext()->cookie->no_mobile;
}

 

 

//FrontController::init()
// Check mobile context
if (Tools::isSubmit('no_mobile_theme'))
$this->context->cookie->no_mobile = true;
else if (Tools::isSubmit('mobile_theme_ok'))
$this->context->cookie->no_mobile = false;

 

This parameters is necessary to enable/disable the mobile theme on mobile device

 

Yes it is true!

I understand.

thanks!

Link to comment
Share on other sites

  • 3 weeks later...

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...