Prestashop 1.5, force mobile theme display
I'm working on a prestashop mobile theme integration and i wondered how to force display in mobile context for a desktop browser (usefull for debugging and coding).
As I don't want to alter the standart User Agent, i found a simple way to do this with code.
Open classes/Context.php and edit getMobileDevice() function :
public function getMobileDevice()
{
if (is_dir('/Users/jefio')) return true;
// whatever code
Go back to code !
Naturally, it's a good idea to wrap this code in an override module like this one https://github.com/cahri/Prestashop-force-mobile-theme
Written by lefakir
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Prestashop
Authors
Related Tags
#prestashop
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#