Jump to content

Mobile and classic web prestashop module and caching


Recommended Posts

I work on a module designed to show contents both on mobile and regular theme with different layouts.


First, I created a mobile subfolder in the module folder.


Second, I created a smarty template for the mobile contents in the mobile subfolder mobile/mysmarty.tpl.


Third, I added this test in the mysmarty.tpl situated in the module folder :

{if $mobile_device} {include file='./mobile/mysmarty.tpl' inline} {else} ... {/if}

I have issues while activating the smarty caching feature in prestashop : the regular web contents is shown on the mobile template. Without cache activated, everything works well.

I tried without inline directive, it's the same.


Are there best practices to design these kind of modules? Some known examples?



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