nolis Posted March 15, 2013 Share Posted March 15, 2013 Hi I try to duplicate the TM Slider 1 in Prestashop 1.4 what I did: in /modules duplicate tmslider1 and renamed it tmslider2 changed in config.xml all TM Slider 1 and tmslider1 to TM Slider 2 and tmslider2 in the script changed tmslider1.php to tmslider2.php changed in tmslider1.php all TM Slider 1 and tmslider1 to TM Slider 2 and tmslider2 in the script changed tmslider1.tpl to tmslider2.tpl changed in tmslider1.tpl all TM Slider 1 and tmslider1 to TM Slider 2 and tmslider2 in the script Uploaded back to the modules as tmslider2 but doesn't appear in the Backoffice, shows only TM Slider #1 is it needed to change something else ??? Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2013 Share Posted March 15, 2013 it's legal? Link to comment Share on other sites More sharing options...
nolis Posted March 15, 2013 Author Share Posted March 15, 2013 what you mean ? I just need a second module doing exactly the same.... Link to comment Share on other sites More sharing options...
nolis Posted March 15, 2013 Author Share Posted March 15, 2013 the module was incl. with the template I bought... Link to comment Share on other sites More sharing options...
vekia Posted March 15, 2013 Share Posted March 15, 2013 I don't know the license for it, maybe module owner does not allow to duplicate module just saying if you want to duplicate module you must: 1) change directory and main module file name (.php) 2) change class name (it must be other than original) 3) change javascript slider object name and functions related to this object Link to comment Share on other sites More sharing options...
nolis Posted March 15, 2013 Author Share Posted March 15, 2013 yes I did this all... it's also very strange because even the css doesn't effect on that module.. I also tried to put in a style tag right into the module template for example modules/tmslider1/tmslider1.tpl <div id="tmslider1" style="margin-top:-400px;"> the output on page is: <div id="tmslider1"> I cleared /tools/smarty/cache and /tools/smarty/compiled also disabled Smarty cache and compile function in the back office performance tab. also my browser cache is empty... there is no extra config for this module in the temp folder.. whats going on here.. ?? why doesn't it show my edits... Link to comment Share on other sites More sharing options...
nolis Posted March 15, 2013 Author Share Posted March 15, 2013 I see that the tools/smarty/compile folder automatically fills be refreshing the page.. but the compiled modules are not the latest edits.. why ? Link to comment Share on other sites More sharing options...
nolis Posted March 15, 2013 Author Share Posted March 15, 2013 (edited) this is the module compiled php in the smarty/compile folder: File: 41e3058b4081728bfc154b413a08d5a1e17a2570.file.tmslider1.tpl <?php /* Smarty version Smarty-3.0.7, created on 2013-03-15 12:51:38 compiled from "/stykactt/www.blabla.xx/modules/tmslider1/tmslider1.tpl" */ ?> <?php /*%%SmartyHeaderCode:114779696051430b4af239a2-82837860%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '41e3058b4081728bfc154b413a08d5a1e17a2570' => array ( 0 => '/stykactt/www.blabla.xx/modules/tmslider1/tmslider1.tpl', 1 => 1363344944, 2 => 'file', ), ), 'nocache_hash' => '114779696051430b4af239a2-82837860', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?> <div id="tmslider1" style="margin-top:400px;"> <ul> <?php $_smarty_tpl->tpl_vars['home_link'] = new Smarty_Variable; $_from = $_smarty_tpl->getVariable('xml')->value->link; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} $_smarty_tpl->tpl_vars['smarty']->value['foreach']['links']['iteration']=0; if ($_smarty_tpl->_count($_from) > 0){ foreach ($_from as $_smarty_tpl->tpl_vars['home_link']->key => $_smarty_tpl->tpl_vars['home_link']->value){ $_smarty_tpl->tpl_vars['smarty']->value['foreach']['links']['iteration']++; ?> <li class="slide<?php echo $_smarty_tpl->getVariable('smarty')->value['foreach']['links']['iteration'];?> "> <a href="<?php echo $_smarty_tpl->getVariable('home_link')->value->url;?> "> <img src="modules/tmslider1/<?php echo $_smarty_tpl->getVariable('home_link')->value->img;?> " alt="" /> <span> <span class="txt1"><?php echo $_smarty_tpl->getVariable('home_link')->value->{$_smarty_tpl->getVariable('field1')->value};?> </span> <span class="txt2"><?php echo $_smarty_tpl->getVariable('home_link')->value->{$_smarty_tpl->getVariable('field2')->value};?> </span> </span> </a> </li> <?php [spam-filter] ?> </ul> </div> </ul> </div> and the code from: modules/tmslider1/tmslider1.tpl (take care just on the first line of the script and see what the compiled file shows up + what the html output shows up) <div id="tmslider1" style="margin-top:-600px;"> <ul> {foreach from=$xml->link item=home_link name=links} <li style="margin-top:-100px;" class="slide{$smarty.foreach.links.iteration}"> <a href="{$home_link->url}"> <img src="modules/tmslider1/{$home_link->img}" alt="" /> <span> <span class="txt1">{$home_link->$field1}</span> <span class="txt2">{$home_link->$field2}</span> </span> </a> </li> {/foreach} </ul> </div> and html frontoffice output is: <div id="tmslider1"> <ul> <li class="slide1"> <a href="category.php?id_category=2"> <img src="modules/tmslider1/slides/slide_00.jpg" alt="" /> <span>.....ans so on why the hell is this not working ? is there an extra cache anywhere ? Edited March 15, 2013 by nolis (see edit history) 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