Jump to content

Making a custom 1.1 module work in 1.6


PresThib

Recommended Posts

Hello all,

 

(Hoping to post in the right section)

 

I just updated a shop that was in Prestashop 1.1.x to the latest version 1.6.x

I ran into a few issues but globally it's going well.

 

However, the shop has a few simple modules (that I didn't created myself), that were custom developed at the time of 1.1 by an other developer. Note : Most of these modules are only meant to display some text, saved in the Back Office.

 

Now that we're in 1.6, the modules don't display. Instead an error message is to be seen :

No template found for module mymodulename

For example, this mymodulename module only has 2 files in its folder : fr.php and mymodulename.tpl

fr.php :

<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{mymodulename}mystorename>mymodulename_dc2508eae360bffd9d2ed98bb27a3a3c'] = 'Titre';
$_MODULE['<{mymodulename}mystorename>mymodulename_71948aa4f6e12cdaa5e2e63a5eb8f142'] = '[+] d’infos';
$_MODULE['<{mymodulename}mystorename>mymodulename_71948aa4f6e12cdaa5e2e63a5eb8f142'] = '[+] d’infos';
?>

mymodulename.tpl

<!-- Module MyModuleName -->
<div id="mymodulename">
<div id="mymodulename_top"><h3 class="out">{l s='MyShopName Mymodulename' mod='mymodulename'}</h3></div>
<div id="mymodulename_content">
<div class="mymodulename_leftcolumn">
{if $xml->body->$title_left}<h4>{$xml->body->$title_left|stripslashes}</h4>{/if}
{if $xml->body->$subheading_left}<h5>{$xml->body->$subheading_left|stripslashes}</h5>{/if}
{if $xml->body->$paragraph_left}<div>{$xml->body->$paragraph_left|stripslashes}</div>{/if}
{if $xml->body->$link_left}<div class="nav text-right"><a href="{$xml->body->link_left|escape:'htmlall':'UTF-8'}" title="{$xml->body->$title_left|escape:'htmlall':'UTF-8'|stripslashes}">{l s='More info' mod='mymodulename'}</a></div>{/if}
</div>
[*2 OTHER SIMILAR DIVS]
<div id="mymodulename_bottom"></div>
</div>
<!-- /Module MyModuleName -->

 

I know / think modules are much more complex now, but how can I make them work ?

Display a module from 1.1 in 1.6

Thanks a lot in advance, I don't know how to deal with this !

Link to comment
Share on other sites

Ok mates, I resolved this...

 

Well I'm still not totally figuring out how modules in prestashop totally work, having a module folder both in root/modules/ and theme/modules/

anyway, I copy-pasted the corresponding .tpl that was in the theme/modules folder to the root/modules folder, and now it works !

 

Solved !

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