seok Posted May 9, 2018 Share Posted May 9, 2018 Hi all I want to show a different text in blockcontact file "nap.tpl" and the next variables dont worked with PS 1.6.1.13 : {if $isMobile}mobile resolution content{else}pc resolution content{/if} {if $mobile_device}mobile resolution content{else}pc resolution content{/if} {if isset($mobile_device)}mobile resolution{else}pc resolution content{/if} What variable works in PS 1.6.1.13 to show only in mobile device? regards Link to comment Share on other sites More sharing options...
seok Posted May 9, 2018 Author Share Posted May 9, 2018 (edited) Ok, the code {if $mobile_device} is working but there are a BIG CACHE ISSUE If I have Smarty Cache Enabled in "Performance" then on first device where I look website (mobile or pc) is cached and showned exactly in other device is If I have Smarty Cache Disabled in "Performance" then it is working and showning my standard code in pc and mobile code added {if $mobile_device} How solve this Smarty Cache issue for mobile and desktop views? Edited May 9, 2018 by seok (see edit history) Link to comment Share on other sites More sharing options...
Rodrigo B Laurindo Posted December 13, 2018 Share Posted December 13, 2018 Hi, I am with a similar problem. Did you manage to solve the issue? Link to comment Share on other sites More sharing options...
taniacr Posted December 14, 2018 Share Posted December 14, 2018 How about using CSS to hide or show elements by screen size? Link to comment Share on other sites More sharing options...
Jessica Valle Posted January 3, 2019 Share Posted January 3, 2019 The same issue. Someone knows how to fix this cache issue? Using prestashop 1.6.1.20 Link to comment Share on other sites More sharing options...
Joyplaz Posted March 8, 2020 Share Posted March 8, 2020 Same issue here. I'm getting a lot false positives: isMobile is firing off on desktop, but I think it's related to a cache issue. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now